From: Michael Stapelberg Date: Sat, 14 Mar 2015 11:34:34 +0000 (+0100) Subject: tests: exit with status 1 when tests fail X-Git-Tag: 4.10.1~54 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f0ef712ed046554ebc5ad66fe4e3d9f511f4a1e9;p=i3%2Fi3 tests: exit with status 1 when tests fail --- diff --git a/testcases/complete-run.pl b/testcases/complete-run.pl index 61f2ef52..eaf57bde 100755 --- a/testcases/complete-run.pl +++ b/testcases/complete-run.pl @@ -227,7 +227,7 @@ if ($numtests == 1) { END { cleanup() } -exit 0; +exit ($aggregator->failed > 0); # # Takes a test from the beginning of @testfiles and runs it. @@ -324,8 +324,9 @@ sub take_job { } sub cleanup { + my $exitcode = $?; $_->() for our @CLEANUP; - exit; + exit $exitcode; } # must be in a begin block because we C above