ctdb-tests: Add a special failure code when a test error occurs
authorMartin Schwenke <martin@meltin.net>
Wed, 18 Sep 2019 02:31:10 +0000 (12:31 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 4 Oct 2019 09:41:28 +0000 (09:41 +0000)
Use it when a test is not executable.

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

index 8994c6d801e54b8d7e7523875be53203d63fde39..3c13df36f4c392a47b774cc1c80522ab31683788 100755 (executable)
@@ -129,7 +129,7 @@ ctdb_test_run ()
                status=$?
        else
                echo "TEST IS NOT EXECUTABLE"
-               status=1
+               status=99
        fi
 
        tests_total=$((tests_total + 1))
@@ -140,6 +140,10 @@ ctdb_test_run ()
                interp="PASSED"
                tests_passed=$((tests_passed + 1))
                ;;
+       99)
+               interp="ERROR"
+               tests_failed=$((tests_failed + 1))
+               ;;
        124)
                interp="TIMEDOUT"
                tests_failed=$((tests_failed + 1))
index 1165fcadb47a657f76b7b8f8d24912294e7292f9..1efb1f34e013eba5e76cd9edfa9a37fcb8b4b814 100644 (file)
@@ -28,7 +28,7 @@ ctdb_test_error ()
        if [ $# -gt 0 ] ; then
                echo "$*"
        fi
-       exit 1
+       exit 99
 }
 
 ctdb_test_fail ()