ctdb-tests: Continue running if a testcase is not executable
authorMartin Schwenke <martin@meltin.net>
Fri, 18 May 2018 01:44:11 +0000 (11:44 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 5 Jun 2018 18:37:15 +0000 (20:37 +0200)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Jun  5 20:37:15 CEST 2018 on sn-devel-144

ctdb/tests/run_tests.sh

index 3649d76e34e13c2b0c65d1179badd0c577f12f37..f1268a5f4046b8c1e2151fd94b09ea8dc8b70de5 100755 (executable)
@@ -142,7 +142,12 @@ ctdb_test_run ()
     $no_header || ctdb_test_begin "$name"
 
     local status=0
-    timeout $TEST_TIMEOUT "$@" || status=$?
+    if [ -x "$1" ] ; then
+           timeout $TEST_TIMEOUT "$@" || status=$?
+    else
+           echo "TEST IS NOT EXECUTABLE"
+           status=1
+    fi
 
     $no_header || ctdb_test_end "$name" "$status" "$*"
 
@@ -186,7 +191,6 @@ run_one_test ()
 {
     local f="$1"
 
-    [ -x "$f" ] || die "test \"$f\" is not executable"
     tests_total=$(($tests_total + 1))
 
     ctdb_test_run "$f" | tee "$tf" | show_progress