Thread (43 messages) flat view 43 messages, 4 authors, 2017-12-28

Re: [PATCH v2 8/8] travis-ci: only print test failures if there are

From: Eric Sunshine <hidden>
Date: 2017-12-17 00:03:08

On Sat, Dec 16, 2017 at 5:48 PM, SZEDER Gábor [off-list ref] wrote:
On Sat, Dec 16, 2017, Eric Sunshine [off-list ref] wrote:
quoted
I'd think you'd want to capture the result of the expansion of
t/test-result/*.exit as a string and compare that instead.
I'm not sure how the result of the expansion could be captured in the
shell, because the shell performs the expansion only just before it
executes a command.  And if we do have to execute a command anyway,
then we can simply rely on the command exiting with an error code upon
not finding any files, and there's no need to capture the expansion or
for the comparison for that matter.
So I propose this updated patch, using 'ls' instead of 'test':
To capture the expansion as a string, I was thinking along the lines of:

    x=$(echo t/test-results/*.exit)

but that's a minor point. Checking the explicit exit code of a
command, as you suggest, is probably cleaner.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help