diff options
| author | Stefan Metzmacher <metze@samba.org> | 2013-11-13 14:17:32 +0100 |
|---|---|---|
| committer | Michael Adam <obnox@samba.org> | 2013-11-13 14:18:52 +0100 |
| commit | f087a8e2b81fae82fa571ef09d2d1cb682cc8ff8 (patch) | |
| tree | d4a6b14a1594958150b733180d995b5c32025017 /ctdb/tests/scripts/test_wrap | |
| parent | e80a5aba3db8e81173fa443991e08ef4a300ea5c (diff) | |
| parent | 25f3c8b5269863aadbe72e304da7012782ef5b25 (diff) | |
Merge branch 'master' of ctdb into 'master' of samba
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'ctdb/tests/scripts/test_wrap')
| -rwxr-xr-x | ctdb/tests/scripts/test_wrap | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ctdb/tests/scripts/test_wrap b/ctdb/tests/scripts/test_wrap new file mode 100755 index 0000000000..176310e9a1 --- /dev/null +++ b/ctdb/tests/scripts/test_wrap @@ -0,0 +1,21 @@ +#!/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" + +"$@" |
