Event scripts (well, statd_callout) can change directory, causing
stubs to be unable to locate EVENTSCRIPTS_TESTS_VAR_DIR if it is
relative.
Don't force TEST_VAR_DIR to be absolute because this can result in
Unix domain socket names that are too long.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
fi
mkdir -p "$EVENTSCRIPTS_TESTS_VAR_DIR"
+# Force this to be absolute - event scripts can change directory
+EVENTSCRIPTS_TESTS_VAR_DIR=$(cd "$EVENTSCRIPTS_TESTS_VAR_DIR" && echo "$PWD")
+
export CTDB_LOGGING="file:${EVENTSCRIPTS_TESTS_VAR_DIR}/log.ctdb"
touch "${CTDB_LOGGING#file:}" || \
die "Unable to setup logging for \"$CTDB_LOGGING\""