1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00
Martin Schwenke 05062d874a tests: test_wrap can use $TEST_SCRIPTS_DIR for a little extra clarity
Also add a comment to explain what is being added to $PATH.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 704a3e3b83aff63e8f7b0650c141776ed2c1f047)
2012-04-27 15:40:43 +10:00

22 lines
540 B
Bash
Executable File

#!/bin/bash
# Execute the given command. The intention is that it is a function
# from "${TEST_SCRIPTS_DIR}/integration.bash".
PATH="$(dirname $0):${PATH}"
TEST_SCRIPTS_DIR=$(dirname $0)
# We need the test binaries (i.e. tests/bin/) to be in $PATH. If they
# aren't already in $PATH then we know that tests/bin/ sits alongside
# tests/scripts/.
f="ctdb_bench"
if [ ! $(which $f >/dev/null 2>&1) ] ; then
d=$(dirname "$TEST_SCRIPTS_DIR")/bin
[ -x "$d/$f" ] && PATH="$d:$PATH"
fi
. "${TEST_SCRIPTS_DIR}/integration.bash"
"$@"