tests/simple: Add test to check recovery daemon IP verification
[ctdb.git] / tests / run_tests.sh
1 #!/bin/sh
2
3 test_dir=$(dirname "$0")
4
5 case $(basename "$0") in
6     *run_cluster_tests*)
7         # Running on a cluster:
8         # * print summary, run any integration tests against cluster
9         # * default to running: all integration tests, no unit tests
10         opts="-s"
11         tests="simple complex"
12         ;;
13     *)
14         # Running on local machine:
15         # * print summary, run any integration tests against local daemons
16         # * default to running: all unit tests, simple integration tests
17         opts="-s -l"
18         tests="onnode takeover tool eventscripts simple"
19 esac
20
21 # Allow options to be passed to this script.  However, if any options
22 # are passed there must be a "--" between the options and the tests.
23 # This makes it easy to handle options that take arguments.
24 case "$1" in
25     -*)
26         while [ -n "$1" ] ; do
27             case "$1" in
28                 --) shift ; break ;;
29                 *) opts="$opts $1" ; shift ;;
30             esac
31         done
32 esac
33
34 # If no tests are specified, then run the defaults.
35 [ -n "$1" ] || set -- $tests
36
37 "${test_dir}/scripts/run_tests" $opts "$@" || exit 1
38
39 echo "All OK"
40 exit 0