diff options
-rw-r--r-- | ctdb/tests/tool/scripts/local.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ctdb/tests/tool/scripts/local.sh b/ctdb/tests/tool/scripts/local.sh index 77c5f16a6c..3b9670c8c1 100644 --- a/ctdb/tests/tool/scripts/local.sh +++ b/ctdb/tests/tool/scripts/local.sh @@ -1,5 +1,11 @@ # Hey Emacs, this is a -*- shell-script -*- !!! :-) +if "$TEST_VERBOSE" ; then + debug () { echo "$@" ; } +else + debug () { : ; } +fi + define_test () { _f=$(basename "$0" ".sh") @@ -22,6 +28,20 @@ define_test () printf "%-28s - %s\n" "$_f" "$1" } +setup_natgw () +{ + debug "Setting up NAT gateway" + + natgw_config_dir="${TEST_VAR_DIR}/natgw_config" + mkdir -p "$natgw_config_dir" + + # These will accumulate, 1 per test... but will be cleaned up at + # the end. + export CTDB_NATGW_NODES=$(mktemp --tmpdir="$natgw_config_dir") + + cat >"$CTDB_NATGW_NODES" +} + simple_test () { # Most of the tests when the tool fails will have a date/time/pid |