ctdb-protocol: Fix marshalling for ctdb_uptime
[vlendec/samba-autobuild/.git] / ctdb / tests / run_tests.sh
index c39b92dcd85dccc2ace64a282fe55dc6bf1d2247..ffc81d405a6760bc4a1aa33d8c1b287c7d4a6206 100755 (executable)
@@ -172,8 +172,8 @@ if ! which mktemp >/dev/null 2>&1 ; then
     }
 fi
 
-tf=$(mktemp)
-sf=$(mktemp)
+tf=$(mktemp) || die "mktemp failed for tf - is TMPDIR missing?"
+sf=$(mktemp) || die "mktemp failed for sf - is TMPDIR missing?"
 
 set -o pipefail
 
@@ -232,13 +232,13 @@ find_and_run_one_test ()
 
 # Following 2 lines may be modified by installation script
 export CTDB_TESTS_ARE_INSTALLED=false
-test_dir=$(dirname "$0")
+export CTDB_TEST_DIR=$(dirname "$0")
 
 if [ -z "$TEST_VAR_DIR" ] ; then
     if $CTDB_TESTS_ARE_INSTALLED ; then
        TEST_VAR_DIR=$(mktemp -d)
     else
-       TEST_VAR_DIR="${test_dir}/var"
+       TEST_VAR_DIR="${CTDB_TEST_DIR}/var"
     fi
 fi
 mkdir -p "$TEST_VAR_DIR"
@@ -252,12 +252,13 @@ if $socket_wrapper ; then
     mkdir -p "$SOCKET_WRAPPER_DIR"
 fi
 
-export TEST_SCRIPTS_DIR="${test_dir}/scripts"
+export TEST_SCRIPTS_DIR="${CTDB_TEST_DIR}/scripts"
 
 # If no tests specified then run some defaults
 if [ -z "$1" ] ; then
     if [ -n "$TEST_LOCAL_DAEMONS" ] ; then
-       set -- onnode takeover tool eventscripts cunit eventd shellcheck simple
+       set -- onnode takeover takeover_helper tool eventscripts \
+           cunit eventd shellcheck simple
     else
        set -- simple complex
     fi