tests: exit with status 1 when tests fail
This commit is contained in:
parent
aa4aec41f5
commit
f0ef712ed0
@ -227,7 +227,7 @@ if ($numtests == 1) {
|
|||||||
|
|
||||||
END { cleanup() }
|
END { cleanup() }
|
||||||
|
|
||||||
exit 0;
|
exit ($aggregator->failed > 0);
|
||||||
|
|
||||||
#
|
#
|
||||||
# Takes a test from the beginning of @testfiles and runs it.
|
# Takes a test from the beginning of @testfiles and runs it.
|
||||||
@ -324,8 +324,9 @@ sub take_job {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub cleanup {
|
sub cleanup {
|
||||||
|
my $exitcode = $?;
|
||||||
$_->() for our @CLEANUP;
|
$_->() for our @CLEANUP;
|
||||||
exit;
|
exit $exitcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
# must be in a begin block because we C<exit 0> above
|
# must be in a begin block because we C<exit 0> above
|
||||||
|
Loading…
Reference in New Issue
Block a user