]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tests: Allow tests access to CTDB_BASE
authorMartin Schwenke <martin@meltin.net>
Sun, 11 Mar 2018 21:22:57 +0000 (08:22 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 19 Mar 2018 01:23:19 +0000 (02:23 +0100)
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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/scripts/integration.bash

index eec9e3b20dff9e506b9bc949ea6456d8c4ef3431..f159d0ef7be5771398bbde5b5a737e2d435bcec3 100644 (file)
@@ -611,6 +611,11 @@ get_ctdbd_command_line_option ()
     echo "${t%% -*}"
 }
 
+ctdb_base_show ()
+{
+       echo "${CTDB_BASE:-${CTDB_SCRIPTS_BASE}}"
+}
+
 #######################################
 
 wait_for_monitor_event ()