summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/scripts
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-04-20 13:57:01 +1000
committerMartin Schwenke <martin@meltin.net>2012-04-27 15:40:43 +1000
commit05062d874a1becac026cefa78149aee1587e7da8 (patch)
treee99901abbcfb3599b5b07cd1d98ce00664bd032f /ctdb/tests/scripts
parent2f2e341370640713ff9cb707b6a84ae78109e84e (diff)
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)
Diffstat (limited to 'ctdb/tests/scripts')
-rwxr-xr-xctdb/tests/scripts/test_wrap5
1 files changed, 4 insertions, 1 deletions
diff --git a/ctdb/tests/scripts/test_wrap b/ctdb/tests/scripts/test_wrap
index d5085fda81..176310e9a1 100755
--- a/ctdb/tests/scripts/test_wrap
+++ b/ctdb/tests/scripts/test_wrap
@@ -7,9 +7,12 @@ 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 $(dirname $0))/bin
+ d=$(dirname "$TEST_SCRIPTS_DIR")/bin
[ -x "$d/$f" ] && PATH="$d:$PATH"
fi