From 8aacde3c5d86d8a0216b3bba200a39ca9a561653 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Thu, 30 Aug 2018 09:37:53 +1000 Subject: [PATCH] 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 Reviewed-by: Amitay Isaacs --- ctdb/tests/simple/scripts/local_daemons.bash | 23 +++++++++----------- 1 file 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" -- 2.34.1