diff options
author | Martin Schwenke <martin@meltin.net> | 2018-08-30 09:37:53 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2018-09-03 10:52:12 +0200 |
commit | 8aacde3c5d86d8a0216b3bba200a39ca9a561653 (patch) | |
tree | 9eb136fcbc8e5ee6e4b26ae3dcdfe154a87c77aa | |
parent | eed738a37a6f40ca259153979f364c17e77f52ea (diff) | |
download | samba-8aacde3c5d86d8a0216b3bba200a39ca9a561653.tar.gz |
ctdb-tests: Use known install paths in local daemon tests
The in-tree local daemons tests don't work from a top-level Samba
compile. The simple test suite was the first test suite and things
have generally worked, so it has been slow to adopt general test
infrastructure changes.
Instead of re-calculating script and helper locations, use the paths
from script_install_paths.sh. The bin/ directory is already added to
PATH in common.sh, so don't add it here.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rw-r--r-- | ctdb/tests/simple/scripts/local_daemons.bash | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/ctdb/tests/simple/scripts/local_daemons.bash b/ctdb/tests/simple/scripts/local_daemons.bash index c7a5ee05fc6..f4a32aa5289 100644 --- a/ctdb/tests/simple/scripts/local_daemons.bash +++ b/ctdb/tests/simple/scripts/local_daemons.bash @@ -1,19 +1,16 @@ # If we're not running on a real cluster then we need a local copy of # ctdb (and other stuff) in $PATH and we will use local daemons. -# Use in-tree binaries if running against local daemons. -# Otherwise CTDB need to be installed on all nodes. -if [ -n "$ctdb_dir" -a -d "${ctdb_dir}/bin" ] ; then - # ctdbd_wrapper is in config/ directory - PATH="${ctdb_dir}/bin:${ctdb_dir}/config:${PATH}" - hdir="${ctdb_dir}/bin" - export CTDB_EVENTD="${hdir}/ctdb-eventd" - export CTDB_EVENT_HELPER="${hdir}/ctdb-event" - export CTDB_LOCK_HELPER="${hdir}/ctdb_lock_helper" - export CTDB_RECOVERY_HELPER="${hdir}/ctdb_recovery_helper" - export CTDB_TAKEOVER_HELPER="${hdir}/ctdb_takeover_helper" - export CTDB_CLUSTER_MUTEX_HELPER="${hdir}/ctdb_mutex_fcntl_helper" -fi +# For ctdbd_wrapper +PATH="${CTDB_SCRIPTS_BASE}:${PATH}" + +hdir="$CTDB_SCRIPTS_HELPER_BINDIR" +export CTDB_EVENTD="${hdir}/ctdb-eventd" +export CTDB_EVENT_HELPER="${hdir}/ctdb-event" +export CTDB_LOCK_HELPER="${hdir}/ctdb_lock_helper" +export CTDB_RECOVERY_HELPER="${hdir}/ctdb_recovery_helper" +export CTDB_TAKEOVER_HELPER="${hdir}/ctdb_takeover_helper" +export CTDB_CLUSTER_MUTEX_HELPER="${hdir}/ctdb_mutex_fcntl_helper" if [ -n "$TEST_SOCKET_WRAPPER_SO_PATH" ] ; then export LD_PRELOAD="$TEST_SOCKET_WRAPPER_SO_PATH" |