diff options
-rw-r--r-- | test/testrunner.pl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/testrunner.pl b/test/testrunner.pl index 7faca23..d7878e7 100644 --- a/test/testrunner.pl +++ b/test/testrunner.pl @@ -116,7 +116,7 @@ sub run_test my $pid = open3("&<NULL", \*OUT, \*ERR, @_); - $SIG{CHLD} = sub { waitpid($pid, 0); }; + $SIG{CHLD} = sub { }; my $selector = IO::Select->new(); $selector->add(*OUT, *ERR); @@ -140,6 +140,18 @@ sub run_test } } + waitpid($pid, 0); + + # Catch non-zero exit status and turn it into failure + if ($? != 0) { + my $status = $? & 127; + + if ($status != 0) { + print LOG " FAIL: Exit status $status\n"; + } + $last = "FAIL"; + } + print substr($last, 0, 4) . "\n"; # Bail, noisily, on failure |