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 625e0c5aea Tests - add -T (trace) option to eventscripts run_test.sh
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 08eeb788523afe19760b00f40339b702eb193712)
2011-08-30 16:51:54 +10:00

41 lines
723 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
;;
-T)
# This will cause tests to fail but is good for debugging
# individual tests when they fail.
export EVENTSCRIPTS_TESTS_TRACE="sh -x"
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