geoff 2004/05/05 18:10:22
Modified: perl-framework/Apache-Test/lib/Apache TestRun.pm
Log:
make sure that die() messages from Test::Harness::_show_results() make it
back to the user, particularly the summary printed when some tests fail
Revision Changes Path
1.167 +6 -0
httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm
Index: TestRun.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- TestRun.pm 16 Apr 2004 20:29:23 -0000 1.166
+++ TestRun.pm 6 May 2004 01:10:22 -0000 1.167
@@ -347,6 +347,12 @@
$SIG{__DIE__} = sub {
return unless $_[0] =~ /^Failed/i; #dont catch Test::ok failures
+
+ # _show_results() calls uses calls die() under a few conditions,
+ # such as when no tests are run or when tests fail. make sure
+ # the message is propagated back to the user.
+ print $_[0] if (caller(1))[3]||'' eq 'Test::Harness::_show_results';
+
$server->stop(1) if $opts->{'start-httpd'};
$server->failed_msg("error running tests");
exit_perl 0;