From 96b235849d8ea35827bc99cd8c2fc94108e4d4d5 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 18 Jun 2008 08:29:03 +0000 Subject: Catch non-zero exit status and treat it as a failure svn path=/trunk/hubbub/; revision=4379 --- test/testrunner.pl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'test/testrunner.pl') 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("&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 -- cgit v1.2.3