Re: [PATCH] t0051: use "skip_all" under !MINGW in single-test file

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

 



On Tue, Feb 01 2022, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:
>
>> Have this file added in 06ba9d03e34 (t0051: test GIT_TRACE to a
>> windows named pipe, 2018-09-11) use the same "skip_all" pattern as an
>> existing Windows-only test added in 0e218f91c29 (mingw: unset PERL5LIB
>> by default, 2018-10-30) uses.
>>
>> This way TAP consumers like "prove" will show a nice summary when the
>> test is skipped, e.g.:
>
> ... as opposed to?  A failure?  A different appearance of the log
> message?  Something else?

In "prove" we go from simply showing "ok":
    
    $ prove t0051-windows-named-pipe.sh
    t0051-windows-named-pipe.sh .. ok   
    All tests successful.
    Files=1, Tests=1,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.03 cusr  0.01 csys =  0.06 CPU)
    Result: PASS
    
To showing the skip message quoted here:

>>
>>     $ prove t0051-windows-named-pipe.sh
>>     [...]
>>     t0051-windows-named-pipe.sh ... skipped: skipping Windows-specific tests
>>     [...]

But YMMV. We're now making use of the right TAP-y way to communicate
this to the consumer. I.e. skipping the whole test file, v.s. skipping
individual tests (in this case there's only one test).

>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
>> ---
>>
>> A trivial UX improvement for the "prove" output, so that we'll show a
>> notice in the same way as e.g. t0029-core-unsetenvvars.sh and
>> t5580-unc-paths.sh do (which are both Windows-specific).
>>
>>  t/t0051-windows-named-pipe.sh | 7 ++++++-
>>  1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/t/t0051-windows-named-pipe.sh b/t/t0051-windows-named-pipe.sh
>> index 10ac92d2250..412f413360d 100755
>> --- a/t/t0051-windows-named-pipe.sh
>> +++ b/t/t0051-windows-named-pipe.sh
>> @@ -3,8 +3,13 @@
>>  test_description='Windows named pipes'
>>  
>>  . ./test-lib.sh
>> +if ! test_have_prereq MINGW
>> +then
>> +	skip_all='skipping Windows-specific tests'
>> +	test_done
>> +fi
>>  
>> -test_expect_success MINGW 'o_append write to named pipe' '
>> +test_expect_success 'o_append write to named pipe' '
>>  	GIT_TRACE="$(pwd)/expect" git status >/dev/null 2>&1 &&
>>  	{ test-tool windows-named-pipe t0051 >actual 2>&1 & } &&
>>  	pid=$! &&





[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