summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/UNIT/takeover/scripts/local.sh
blob: 0db3d904a5f91ae0ab917448fb98073ca26cb1d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Hey Emacs, this is a -*- shell-script -*- !!!  :-)

test_prog="ctdb_takeover_tests ipalloc"

define_test ()
{
    _f=$(basename "$0" ".sh")

    export CTDB_IP_ALGORITHM="${_f%%.*}"
    case "$CTDB_IP_ALGORITHM" in
	lcp2|nondet|det) : ;;
	*) die "Unknown algorithm for testcase \"$_f\"" ;;
    esac

    printf "%-12s - %s\n" "$_f" "$1"
}

extra_footer ()
{
    cat <<EOF
--------------------------------------------------
Algorithm: $CTDB_IP_ALGORITHM
--------------------------------------------------
EOF
}

simple_test ()
{
    unit_test $VALGRIND $test_prog "$@"
}