From: Martin Schwenke Date: Sun, 11 Mar 2018 21:22:57 +0000 (+1100) Subject: ctdb-tests: Allow tests access to CTDB_BASE X-Git-Tag: talloc-2.1.12~116 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6127a6384de9bddda69a49437d656bb1bcd542a;p=thirdparty%2Fsamba.git ctdb-tests: Allow tests access to CTDB_BASE On the node where the tests are run, CTDB_BASE is always set. This applies to local daemons too. However, when tests are being run against a real cluster, there may be a need to access configuration files. However, CTDB_BASE will not be set in this case. So, provide a function to get CTDB_BASE, if set, or a real cluster node's configuration directory, if CTDB_BASE is not set. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash index eec9e3b20df..f159d0ef7be 100644 --- a/ctdb/tests/scripts/integration.bash +++ b/ctdb/tests/scripts/integration.bash @@ -611,6 +611,11 @@ get_ctdbd_command_line_option () echo "${t%% -*}" } +ctdb_base_show () +{ + echo "${CTDB_BASE:-${CTDB_SCRIPTS_BASE}}" +} + ####################################### wait_for_monitor_event ()