diff options
author | Martin Schwenke <martin@meltin.net> | 2012-04-20 14:10:34 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2012-04-27 15:40:43 +1000 |
commit | 466ff20156bf220b6d67ac18898082635513d658 (patch) | |
tree | 6ff9476c54a8c0981609ff1b38edfb754eeecb96 /ctdb/tests/run_tests.sh | |
parent | c4606275c9c29a4abb257efbe815e9791de63449 (diff) | |
download | samba-466ff20156bf220b6d67ac18898082635513d658.tar.gz samba-466ff20156bf220b6d67ac18898082635513d658.tar.xz samba-466ff20156bf220b6d67ac18898082635513d658.zip |
tests: Update top-level wrapper scripts
* Add the unit tests to "make test"
* Make scripts run from anywhere
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 95947123eee687ed83eebc567397a5bc9d55a945)
Diffstat (limited to 'ctdb/tests/run_tests.sh')
-rwxr-xr-x | ctdb/tests/run_tests.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ctdb/tests/run_tests.sh b/ctdb/tests/run_tests.sh index 56f020575f..f3cc840fb0 100755 --- a/ctdb/tests/run_tests.sh +++ b/ctdb/tests/run_tests.sh @@ -1,6 +1,18 @@ #!/bin/sh -tests/scripts/run_tests -l -s ${*:-tests/simple/*.sh} || exit 1 +test_dir=$(dirname "$0") + +if [ -n "$1" ] ; then + "${test_dir}/scripts/run_tests" -l -s "$@" || exit 1 +else + cd "$test_dir" + + # By default, run all unit tests and the tests against local + # daemons + dirs="onnode takeover tool eventscripts simple" + + ./scripts/run_tests -l -s $dirs || exit 1 +fi echo "All OK" exit 0 |