blob: 4ab443f671c4172c10050abfe981067c79d1cd08 (
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
31
32
33
34
35
36
37
38
39
40
|
#!/bin/sh
test_dir=$(dirname "$0")
case $(basename "$0") in
*run_cluster_tests*)
# Running on a cluster:
# * print summary, run any integration tests against cluster
# * default to running: all integration tests, no unit tests
opts="-s"
tests="simple complex"
;;
*)
# Running on local machine:
# * print summary, run any integration tests against local daemons
# * default to running: all unit tests, simple integration tests
opts="-s -l"
tests="onnode takeover tool eventscripts simple"
esac
# Allow options to be passed to this script. However, if any options
# are passed there must be a "--" between the options and the tests.
# This makes it easy to handle options that take arguments.
case "$1" in
-*)
while [ -n "$1" ] ; do
case "$1" in
--) shift ; break ;;
*) opts="$opts $1" ; shift ;;
esac
done
esac
# If no tests are specified, then run the defaults.
[ -n "$1" ] || set -- $tests
"${test_dir}/scripts/run_tests" $opts "$@" || exit 1
echo "All OK"
exit 0
|