summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/tool/run_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/tests/tool/run_tests.sh')
-rwxr-xr-xctdb/tests/tool/run_tests.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/ctdb/tests/tool/run_tests.sh b/ctdb/tests/tool/run_tests.sh
new file mode 100755
index 0000000000..b4ad737d58
--- /dev/null
+++ b/ctdb/tests/tool/run_tests.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Run some IP allocation unit tests.
+
+cd $(dirname "$0")
+export TESTS_SUBDIR=$(pwd)
+
+test_dir=$(dirname "$TESTS_SUBDIR")
+
+opts="-d"
+
+for i ; do
+ case "$i" in
+ -*)
+ opts="$opts $i"
+ shift
+ ;;
+ *)
+ break
+ esac
+done
+
+tests=""
+if [ -z "$*" ] ; then
+ tests=$(ls testcases/*.[0-9][0-9][0-9].sh 2>/dev/null)
+fi
+
+"$test_dir/scripts/run_tests" $opts "$@" $tests || exit 1
+
+echo "All OK"
+exit 0