]> git.sur5r.net Git - i3/i3/blobdiff - testcases/complete-run.pl
tests: exit with status 1 when tests fail
[i3/i3] / testcases / complete-run.pl
index 61f2ef52451115e3051e3a6d88d0945fb41350f7..eaf57bde1620495c3ef168018a76189c39c32bf5 100755 (executable)
@@ -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<exit 0> above