diff options
author | Andy Lester <andy@petdance.com> | 2006-05-23 16:07:48 -0500 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2006-05-24 02:56:23 +0000 |
commit | ade55ef48b26f40fc7a848c0ee1b6c616d1a3911 (patch) | |
tree | fe098064cab40ab03aaa0b79ffa2caa63621a13e /t | |
parent | a24cc0c03d2211980be311ac40a0e038f157d31f (diff) | |
download | perl-ade55ef48b26f40fc7a848c0ee1b6c616d1a3911.tar.gz |
Make t/TEST more helpful
Message-ID: <20060524020748.GA16729@petdance.com>
p4raw-id: //depot/perl@28294
Diffstat (limited to 't')
-rwxr-xr-x | t/TEST | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -261,6 +261,7 @@ EOT my $good_files = 0; my $tested_files = 0; my $totmax = 0; + my %failed_tests; while (my $test = shift @tests) { my $test_start_time = $show_elapsed_time ? Time::HiRes::time() : 0; @@ -564,10 +565,10 @@ EOT if (defined $failure) { print "${te}$failure\n"; $::bad_files++; - $_ = $test; - if (/^base/) { - die "Failed a basic test--cannot continue.\n"; + if ($test =~ /^base/) { + die "Failed a basic test ($test) -- cannot continue.\n"; } + ++$failed_tests{$test}; } else { if ($max) { @@ -599,11 +600,10 @@ EOT } else { my $pct = $tested_files ? sprintf("%.2f", ($tested_files - $::bad_files) / $tested_files * 100) : "0.00"; - if ($::bad_files == 1) { - warn "Failed 1 test script out of $tested_files, $pct% okay.\n"; - } - else { - warn "Failed $::bad_files test scripts out of $tested_files, $pct% okay.\n"; + my $s = $::bad_files == 1 ? "" : "s"; + warn "Failed $::bad_files test$s out of $tested_files, $pct% okay.\n"; + for my $test ( sort keys %failed_tests ) { + print "\t$test\n"; } warn <<'SHRDLU_1'; ### Since not all tests were successful, you may want to run some of @@ -650,3 +650,5 @@ SHRDLU_5 } } exit ($::bad_files != 0); + +# ex: set ts=8 sts=4 sw=4 noet: |