Revert "ctdb-tests: Continue running if a testcase is not executable"
authorMartin Schwenke <martin@meltin.net>
Fri, 18 May 2018 01:39:49 +0000 (11:39 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 5 Jun 2018 15:47:27 +0000 (17:47 +0200)
This reverts commit 36e7043fb16ac996793545022147f696caedee9c.

An recent change broke this and I forgot to test before posting. :-(

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

index be7b0f9..3649d76 100755 (executable)
@@ -29,12 +29,6 @@ die ()
     echo "$1" >&2 ; exit ${2:-1}
 }
 
-# Print a message and return failure
-fail ()
-{
-    echo "$1" >&2 ; return ${2:-1}
-}
-
 ######################################################################
 
 with_summary=true
@@ -192,13 +186,10 @@ run_one_test ()
 {
     local f="$1"
 
+    [ -x "$f" ] || die "test \"$f\" is not executable"
     tests_total=$(($tests_total + 1))
 
-    if [ -x "$f" ] ; then
-       ctdb_test_run "$f" | tee "$tf" | show_progress
-    else
-       ctdb_test_run "$f" fail "TEST NOT EXECUTABLE"
-    fi
+    ctdb_test_run "$f" | tee "$tf" | show_progress
     status=$?
     if [ $status -eq 0 ] ; then
        tests_passed=$(($tests_passed + 1))