tests: run_tests should exit with failed test status if running with -H
authorMartin Schwenke <martin@meltin.net>
Fri, 20 Apr 2012 04:09:43 +0000 (14:09 +1000)
committerMartin Schwenke <martin@meltin.net>
Fri, 27 Apr 2012 05:40:43 +0000 (15:40 +1000)
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6eb7fa572e7fc212332ddd68793e3f35161baf7c)

ctdb/tests/scripts/run_tests

index 2ad215dad95040c95c5007be0391efb692ab2409..7a86301c9515168c60964af3e2d439b7144d1e1a 100755 (executable)
@@ -199,5 +199,9 @@ fi
 rm -f "$sf"
 
 if [ $tests_failed -gt 0 ] ; then
-    exit 1
+    if $no_header ; then
+       exit $status
+    else
+       exit 1
+    fi
 fi