ctdb-tests: Simplify test_wrap script
[vlendec/samba-autobuild/.git] / ctdb / tests / scripts / test_wrap
index 3db3180ae98964264880bfc4b789bb923b4c9054..d9a6d09e202213f1992b2d5997131be351eb7c8d 100755 (executable)
@@ -1,20 +1,10 @@
 #!/bin/bash
 
-# Execute the given command.  The intention is that it is a function
-# from "${TEST_SCRIPTS_DIR}/integration.bash".
+# Execute the given command.  The intention is that it is either
+# * a function from "${TEST_SCRIPTS_DIR}/integration.bash"; or
+# * a test helper binary
 
-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="fetch_ring"
-if [ ! $(which $f >/dev/null 2>&1) ] ; then
-    d=$(dirname "$TEST_SCRIPTS_DIR")/bin
-    [ -x "$d/$f" ] && PATH="$d:$PATH"
-fi
+TEST_SCRIPTS_DIR=$(dirname "$0")
 
 . "${TEST_SCRIPTS_DIR}/integration.bash"