ctdb-protocol: Fix marshalling for ctdb_uptime
[vlendec/samba-autobuild/.git] / ctdb / tests / scripts / test_wrap
1 #!/bin/bash
2
3 # Execute the given command.  The intention is that it is a function
4 # from "${TEST_SCRIPTS_DIR}/integration.bash".
5
6 PATH="$(dirname $0):${PATH}"
7
8 TEST_SCRIPTS_DIR=$(dirname $0)
9
10 # We need the test binaries (i.e. tests/bin/) to be in $PATH.  If they
11 # aren't already in $PATH then we know that tests/bin/ sits alongside
12 # tests/scripts/.
13 f="ctdb_bench"
14 if [ ! $(which $f >/dev/null 2>&1) ] ; then
15     d=$(dirname "$TEST_SCRIPTS_DIR")/bin
16     [ -x "$d/$f" ] && PATH="$d:$PATH"
17 fi
18
19 . "${TEST_SCRIPTS_DIR}/integration.bash"
20
21 "$@"