3 test_dir=$(dirname "$0")
5 case $(basename "$0") in
7 # Running on a cluster:
8 # * print summary, run any integration tests against cluster
9 # * default to running: all integration tests, no unit tests
11 tests="simple complex"
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
18 tests="onnode takeover tool eventscripts simple"
19 # If running in the source tree then use a fixed TEST_VAR_DIR.
20 # If this script is installed using the INSTALL script then
21 # TEST_BIN_DIR will be set, so use this as the test.
22 if [ -z "$TEST_BIN_DIR" ] ; then
23 opts="${opts} -V ${test_dir}/var"
27 # Allow options to be passed to this script. However, if any options
28 # are passed there must be a "--" between the options and the tests.
29 # This makes it easy to handle options that take arguments.
32 while [ -n "$1" ] ; do
35 *) opts="$opts $1" ; shift ;;
40 # If no tests are specified, then run the defaults.
41 [ -n "$1" ] || set -- $tests
43 "${test_dir}/scripts/run_tests" $opts "$@" || exit 1