END { cleanup() }
-exit 0;
+exit ($aggregator->failed > 0);
#
# Takes a test from the beginning of @testfiles and runs it.
}
sub cleanup {
+ my $exitcode = $?;
$_->() for our @CLEANUP;
- exit;
+ exit $exitcode;
}
# must be in a begin block because we C<exit 0> above