ctdb-tests: Don't print summary on failure if -e option is specified
authorMartin Schwenke <martin@meltin.net>
Mon, 5 Aug 2019 01:52:16 +0000 (11:52 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 14 Aug 2019 09:11:36 +0000 (09:11 +0000)
If there is a failure it will always be the last test run.  Don't
obscure this by following it with a summary.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/run_tests.sh

index 0caec8f7c0471f71bdaff6da446de4a80f6041cf..2f692c1b90b8e43eb46b80a3adbd303f739876b3 100755 (executable)
@@ -357,10 +357,12 @@ done
 rm -f "$tf"
 
 if $with_summary ; then
-    echo
-    cat "$sf"
-    echo
-    echo "${tests_passed}/${tests_total} tests passed"
+       if [ $status -eq 0 ] || ! $exit_on_fail ; then
+               echo
+               cat "$sf"
+               echo
+               echo "${tests_passed}/${tests_total} tests passed"
+       fi
 fi
 
 rm -f "$sf"