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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 16, 2017 at 5:48 PM, SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote:
> On Sat, Dec 16, 2017, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>> 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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux