ctdb:tests: Rework unit test result filtering
[vlendec/samba-autobuild/.git] / ctdb / tests / takeover / scripts / local.sh
1 # Hey Emacs, this is a -*- shell-script -*- !!!  :-)
2
3 test_prog="ctdb_takeover_tests ctdb_takeover_run_core"
4
5 define_test ()
6 {
7     _f=$(basename "$0" ".sh")
8
9     export CTDB_IP_ALGORITHM="${_f%%.*}"
10     case "$CTDB_IP_ALGORITHM" in
11         lcp2|nondet|det) : ;;
12         *) die "Unknown algorithm for testcase \"$_f\"" ;;
13     esac
14
15     printf "%-12s - %s\n" "$_f" "$1"
16 }
17
18 simple_test ()
19 {
20     _out=$($VALGRIND $test_prog "$@" 2>&1)
21
22     result_check "Algorithm: $CTDB_IP_ALGORITHM"
23 }