1 # Hey Emacs, this is a -*- shell-script -*- !!! :-)
3 test_bin="$(dirname ${TEST_SUBDIR})/bin"
7 _f=$(basename "$0" ".sh")
12 _func="${_func%.*}" # Strip test number
13 test_prog="${test_bin}/ctdb_tool_libctdb ${_func}"
17 _cmd="${_cmd%.*}" # Strip test number
18 test_prog="${test_bin}/ctdb_tool_stubby ${_cmd}"
21 die "Unknown pattern for testcase \"$_f\""
24 printf "%-28s - %s\n" "$_f" "$1"
29 # Most of the tests when the tool fails will have a date/time/pid
30 # prefix. Strip that because it isn't possible to match it.
31 if [ $required_rc -ne 0 ] ; then
32 OUT_FILTER='s@^[0-9/]+\ [0-9:\.]+\ \[[\ 0-9]+\]:@DATE\ TIME\ \[PID\]:@'
35 _out=$($test_prog "$@" 2>&1)