1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
samba-mirror/ctdb/tests/eventscripts/run_tests.sh
Martin Schwenke f43ae500be Tests: initial eventscript unit tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit b675ca3c25b7155b9681128822d1280018ef68bb)
2011-08-08 13:38:07 +10:00

35 lines
551 B
Bash
Executable File

#!/bin/sh
# Eventscript unit test harness.
cd $(dirname "$0")
export EVENTSCRIPTS_TESTS_DIR=$(pwd)
test_dir=$(dirname "$EVENTSCRIPTS_TESTS_DIR")
opts="-d"
for i ; do
case "$i" in
-v)
export EVENTSCRIPT_TESTS_VERBOSE="yes"
shift
;;
-*)
opts="$opts $i"
shift
;;
*)
break
esac
done
tests=""
if [ -z "$*" ] ; then
tests=$(ls simple/[0-9][0-9].*.*.[0-9][0-9][0-9].sh simple/[0-9][0-9].*.*.[0-9][0-9][0-9]/run_test.sh 2>/dev/null)
fi
"$test_dir/scripts/run_tests" $opts "$@" $tests || exit 1
exit 0