File: test_wrap

package info (click to toggle)
ctdb 2.5.4%2Bdebian0-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 6,084 kB
  • sloc: ansic: 53,406; sh: 18,954; xml: 6,545; python: 1,217; makefile: 443; perl: 228
file content (21 lines) | stat: -rwxr-xr-x 540 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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"

"$@"