# Augment PATH with relevant stubs/ directories.
#
-stubs_dir="${TEST_SUBDIR}/stubs"
+stubs_dir="${CTDB_TEST_SUITE_DIR}/stubs"
[ -d "${stubs_dir}" ] || die "Failed to locate stubs/ subdirectory"
# Make the path absolute for tests that change directory
touch "${CTDB_LOGGING#file:}" || \
die "Unable to setup logging for \"$CTDB_LOGGING\""
-if [ -d "${TEST_SUBDIR}/etc" ] ; then
- cp -a "${TEST_SUBDIR}/etc" "$EVENTSCRIPTS_TESTS_VAR_DIR"
+if [ -d "${CTDB_TEST_SUITE_DIR}/etc" ] ; then
+ cp -a "${CTDB_TEST_SUITE_DIR}/etc" "$EVENTSCRIPTS_TESTS_VAR_DIR"
export CTDB_SYS_ETCDIR="${EVENTSCRIPTS_TESTS_VAR_DIR}/etc"
else
die "Unable to setup \$CTDB_SYS_ETCDIR"
printf "%-17s %-10s %-4s - %s\n\n" \
"$script_short" "$event" "$_num" "$desc"
- _f="${TEST_SUBDIR}/scripts/${script_short}.sh"
+ _f="${CTDB_TEST_SUITE_DIR}/scripts/${script_short}.sh"
if [ -r "$_f" ] ; then
. "$_f"
fi
fi
for _n in $(seq 0 $((_num_nodes - 1))) ; do
- # common.sh will set TEST_SUBDIR to a stupid value
- # when installed because common.sh is usually sourced
- # by a test. TEST_SUBDIR needs to be correctly set so
- # setup_ctdb_base() finds the etc-ctdb/ subdirectory
- # and the test event script is correctly installed, so
- # fix it.
+ # common.sh will set CTDB_TEST_SUITE_DIR to a stupid
+ # value when installed because common.sh is usually
+ # sourced by a test. CTDB_TEST_SUITE_DIR needs to be
+ # correctly set so setup_ctdb_base() finds the
+ # etc-ctdb/ subdirectory and the test event script is
+ # correctly installed, so fix it.
# shellcheck disable=SC2034
- TEST_SUBDIR="$CTDB_TEST_DIR" \
+ CTDB_TEST_SUITE_DIR="$CTDB_TEST_DIR" \
setup_ctdb_base "$directory" "node.${_n}" \
functions notify.sh debug-hung-script.sh
: ${ONNODE:=onnode}
# Augment PATH with relevant stubs/ directory
-stubs_dir="${TEST_SUBDIR}/stubs"
+stubs_dir="${CTDB_TEST_SUITE_DIR}/stubs"
[ -d "${stubs_dir}" ] || die "Failed to locate stubs/ subdirectory"
PATH="${stubs_dir}:${PATH}"
}
# This expands the most probable problem cases like "." and "..".
-TEST_SUBDIR=$(dirname "$0")
-if [ "$(dirname "$TEST_SUBDIR")" = "." ] ; then
- TEST_SUBDIR=$(cd "$TEST_SUBDIR" && pwd)
+CTDB_TEST_SUITE_DIR=$(dirname "$0")
+if [ "$(dirname "$CTDB_TEST_SUITE_DIR")" = "." ] ; then
+ CTDB_TEST_SUITE_DIR=$(cd "$CTDB_TEST_SUITE_DIR" && pwd)
fi
. "${TEST_SCRIPTS_DIR}/script_install_paths.sh"
mkdir -p "${CTDB_BASE}/events/legacy"
- if [ -z "$TEST_SUBDIR" ] ; then
+ if [ -z "$CTDB_TEST_SUITE_DIR" ] ; then
return
fi
- for _i in "${TEST_SUBDIR}/etc-ctdb/"* ; do
+ for _i in "${CTDB_TEST_SUITE_DIR}/etc-ctdb/"* ; do
# No/empty etc-ctdb directory
[ -e "$_i" ] || break
# Make sure that $CTDB is set.
: ${CTDB:=ctdb}
-local="${TEST_SUBDIR}/scripts/local.bash"
+local="${CTDB_TEST_SUITE_DIR}/scripts/local.bash"
if [ -r "$local" ] ; then
. "$local"
fi
trap 'eval $test_cleanup_hooks' 0
-local="${TEST_SUBDIR}/scripts/local.sh"
+local="${CTDB_TEST_SUITE_DIR}/scripts/local.sh"
if [ -r "$local" ] ; then
. "$local"
fi
mkdir -p "$SIMPLE_TESTS_VAR_DIR"
if [ -n "$TEST_LOCAL_DAEMONS" ] ; then
- . "${TEST_SUBDIR}/scripts/local_daemons.bash"
+ . "${CTDB_TEST_SUITE_DIR}/scripts/local_daemons.bash"
fi