diff options
| author | Martin Schwenke <martin@meltin.net> | 2008-12-03 15:48:24 +1100 |
|---|---|---|
| committer | Martin Schwenke <martin@meltin.net> | 2008-12-03 15:48:24 +1100 |
| commit | 3cdc0cb7083474b414c4dd41ee39c8c1864cce9b (patch) | |
| tree | 8eb13a7fd58dd28a9f076ea782b6c6a867f78ee8 /ctdb/tests/scripts | |
| parent | a04094659cc85718129468a382dd6c1d50798b51 (diff) | |
$PATH only inludes $CTDB_DIR/bin if we're using local sockets. Rename
$TEST_WRAP to $CTDB_TEST_WRAPPER - value now set using
$CTDB_TEST_REMOTE_SCRIPTS_DIR if that is set.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a69545d7dec78eefb85a1598e5db4667cc210bf9)
Diffstat (limited to 'ctdb/tests/scripts')
| -rwxr-xr-x | ctdb/tests/scripts/ctdb_test_env | 25 | ||||
| -rw-r--r-- | ctdb/tests/scripts/ctdb_test_functions.bash | 6 |
2 files changed, 20 insertions, 11 deletions
diff --git a/ctdb/tests/scripts/ctdb_test_env b/ctdb/tests/scripts/ctdb_test_env index 4fa3e30f79..9c35fedd0f 100755 --- a/ctdb/tests/scripts/ctdb_test_env +++ b/ctdb/tests/scripts/ctdb_test_env @@ -7,21 +7,30 @@ export CTDB_NUM_NODES=3 ###################################################################### +ctdb_bin_dir=$CTDB_DIR/bin +ctdb_tools_dir=$CTDB_DIR/tools +ctdb_test_scripts_dir=$(cd $(dirname $0) ; pwd) + +PATH="${ctdb_test_scripts_dir}:${ctdb_tools_dir}:${PATH}" + +###################################################################### + +if [ -n "$CTDB_TEST_REMOTE_SCRIPTS_DIR" ] ; then + CTDB_TEST_WRAPPER="${CTDB_TEST_REMOTE_SCRIPTS_DIR}/test_wrap" +else + CTDB_TEST_WRAPPER="${ctdb_test_scripts_dir}/test_wrap" +fi +export CTDB_TEST_WRAPPER + if [ ! -n "$CTDB_TEST_REAL_CLUSTER" ] ; then export CTDB_NODES_SOCKETS="" for i in $(seq 1 $CTDB_NUM_NODES) ; do CTDB_NODES_SOCKETS="${CTDB_NODES_SOCKETS}${CTDB_NODES_SOCKETS:+ }${var_dir}/sock.${i}" done -fi - -###################################################################### -ctdb_bin_dir=$CTDB_DIR/bin -ctdb_tools_dir=$CTDB_DIR/tools -ctdb_test_scripts_dir=$(cd $(dirname $0) ; pwd) -PATH="${ctdb_test_scripts_dir}:${ctdb_bin_dir}:${ctdb_tools_dir}:${PATH}" + PATH="${ctdb_bin_dir}:${PATH}" +fi -export TEST_WRAP="${ctdb_test_scripts_dir}/test_wrap" "$@" diff --git a/ctdb/tests/scripts/ctdb_test_functions.bash b/ctdb/tests/scripts/ctdb_test_functions.bash index 4df3729f42..9fb5aacf8c 100644 --- a/ctdb/tests/scripts/ctdb_test_functions.bash +++ b/ctdb/tests/scripts/ctdb_test_functions.bash @@ -57,7 +57,7 @@ test_exit () ctdb_test_exit () { - if ! onnode 0 $TEST_WRAP cluster_is_healthy ; then + if ! onnode 0 $CTDB_TEST_WRAPPER cluster_is_healthy ; then echo "Restarting ctdb on all nodes to get back into known state..." restart_ctdb fi @@ -429,10 +429,10 @@ restart_ctdb () stop_daemons start_daemons $CTDB_NUM_NODES else - onnode -pq all $TEST_WRAP _restart_ctdb + onnode -pq all $CTDB_TEST_WRAPPER _restart_ctdb fi || return 1 - onnode -q 1 $TEST_WRAP wait_until_healthy || return 1 + onnode -q 1 $CTDB_TEST_WRAPPER wait_until_healthy || return 1 echo "Setting RerecoveryTimeout to 1" onnode -pq all "ctdb setvar RerecoveryTimeout 1" |
