From: Michael G. Schwern Date: Wed, 22 May 2002 19:21:43 +0000 (-0400) Subject: Test::Harness 2.22 -> 2.23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c0bb2de79803fbbfe9a5966d43509add0c8bb4de;p=p5sagit%2Fp5-mst-13.2.git Test::Harness 2.22 -> 2.23 Message-id: <20020522232143.GS7147@ool-18b93024.dyn.optonline.net> p4raw-id: //depot/perl@16756 --- diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index ac3ac8e..0efaa53 100644 --- a/lib/Test/Harness.pm +++ b/lib/Test/Harness.pm @@ -1,5 +1,5 @@ # -*- Mode: cperl; cperl-indent-level: 4 -*- -# $Id: Harness.pm,v 1.29 2002/05/17 23:04:11 schwern Exp $ +# $Id: Harness.pm,v 1.31 2002/05/18 20:19:06 schwern Exp $ package Test::Harness; @@ -22,7 +22,7 @@ use vars qw($VERSION $Verbose $Switches $Have_Devel_Corestack $Curtest $Have_Devel_Corestack = 0; -$VERSION = '2.22'; +$VERSION = '2.23'; $ENV{HARNESS_ACTIVE} = 1; @@ -468,6 +468,7 @@ sub _run_all_tests { bonus => $results{bonus}, skipped => $results{skip}, skip_reason => $Strap->{_skip_reason}, + skip_all => $Strap->{skip_all}, ml => $ml, ); @@ -494,8 +495,8 @@ sub _run_all_tests { print "$test{ml}ok\n ".join(', ', @msg)."\n"; } elsif ($test{max}) { print "$test{ml}ok\n"; - } elsif (defined $test{skip_reason}) { - print "skipped\n all skipped: $test{skip_reason}\n"; + } elsif (defined $test{skip_all}) { + print "skipped\n all skipped: $test{skip_all}\n"; $tot{skipped}++; } else { print "\n skipped test on this platform\n"; diff --git a/lib/Test/Harness/Changes b/lib/Test/Harness/Changes index f715aec..1a24f94 100644 --- a/lib/Test/Harness/Changes +++ b/lib/Test/Harness/Changes @@ -1,5 +1,11 @@ Revision history for Perl extension Test::Harness +2.23 Wed May 22 12:59:47 EDT 2002 + - reason for all skip wasn't being displayed. Broken in 2.20. + - Changed the wait status tests to conform with POSIX standards. + - Quieted some SYSTEM$ABORT noise leaking out from dying test tests + on VMS. + 2.22 Fri May 17 19:01:35 EDT 2002 - Fixed parsing of #!/usr/bin/perl-current to not see a -t. (RT #574) diff --git a/lib/Test/Harness/t/strap-analyze.t b/lib/Test/Harness/t/strap-analyze.t index f7da98c..781ddd2 100644 --- a/lib/Test/Harness/t/strap-analyze.t +++ b/lib/Test/Harness/t/strap-analyze.t @@ -19,7 +19,9 @@ my $IsVMS = $^O eq 'VMS'; # VMS uses native, not POSIX, exit codes. my $die_exit = $IsVMS ? 44 : 1; -my $die_wait = $IsVMS ? 1024 : 256; + +# We can only predict that the wait status should be zero or not. +my $wait_non_zero = 1; my %samples = ( combined => { @@ -310,7 +312,7 @@ my %samples = ( passing => 0, 'exit' => $die_exit, - 'wait' => $die_wait, + 'wait' => $wait_non_zero, max => 0, seen => 0, @@ -327,7 +329,7 @@ my %samples = ( passing => 0, 'exit' => $die_exit, - 'wait' => $die_wait, + 'wait' => $wait_non_zero, max => 0, seen => 4, @@ -345,7 +347,7 @@ my %samples = ( passing => 0, 'exit' => $die_exit, - 'wait' => $die_wait, + 'wait' => $wait_non_zero, max => 4, seen => 4, @@ -396,7 +398,7 @@ my %samples = ( }, ); -plan tests => (keys(%samples) * 2) + 1; +plan tests => (keys(%samples) * 3) + 1; use_ok('Test::Harness::Straps'); @@ -421,5 +423,11 @@ while( my($test, $expect) = each %samples ) { delete $expect->{details}; delete $results{details}; + + # We can only check if it's zero or non-zero. + is( !!$results{'wait'}, !!$expect->{'wait'}, 'wait status' ); + delete $results{'wait'}; + delete $expect->{'wait'}; + is_deeply(\%results, $expect, " the rest $test" ); } diff --git a/lib/Test/Harness/t/test-harness.t b/lib/Test/Harness/t/test-harness.t index 5bfdb4e..6241818 100644 --- a/lib/Test/Harness/t/test-harness.t +++ b/lib/Test/Harness/t/test-harness.t @@ -39,7 +39,6 @@ my $IsVMS = $^O eq 'VMS'; # VMS uses native, not POSIX, exit codes. my $die_estat = $IsVMS ? 44 : 1; -my $die_wstat = $IsVMS ? 1024 : 256; my %samples = ( simple => { @@ -293,7 +292,6 @@ my %samples = ( }, failed => { estat => $die_estat, - wstat => $die_wstat, max => '??', failed => '??', canon => '??', @@ -316,7 +314,6 @@ my %samples = ( }, failed => { estat => $die_estat, - wstat => $die_wstat, max => '??', failed => '??', canon => '??', @@ -339,7 +336,6 @@ my %samples = ( }, failed => { estat => $die_estat, - wstat => $die_wstat, max => 4, failed => 0, canon => '??', diff --git a/t/lib/sample-tests/die b/t/lib/sample-tests/die index e5bbd44..ffd8e88 100644 --- a/t/lib/sample-tests/die +++ b/t/lib/sample-tests/die @@ -1 +1,3 @@ +use lib 'lib'; +use if ($^O eq 'VMS'), vmsish => 'hushed'; exit 1; # exit because die() can be noisy diff --git a/t/lib/sample-tests/die_head_end b/t/lib/sample-tests/die_head_end index f1f72e4..afcea1b 100644 --- a/t/lib/sample-tests/die_head_end +++ b/t/lib/sample-tests/die_head_end @@ -5,4 +5,5 @@ ok 3 ok 4 DUMMY_TEST +use if $^O eq 'VMS', vmsish => 'hushed'; exit 1; diff --git a/t/lib/sample-tests/die_last_minute b/t/lib/sample-tests/die_last_minute index 2f870d3..e421dd1 100644 --- a/t/lib/sample-tests/die_last_minute +++ b/t/lib/sample-tests/die_last_minute @@ -6,4 +6,5 @@ ok 4 1..4 DUMMY_TEST +use if $^O eq 'VMS', vmsish => 'hushed'; exit 1;