3 # The ability of ctdb_test_env to take tests on the command-line is
4 # nice, but here we need to hack around it with that colon to reset
5 # the arguments that it sees.
6 . $(dirname $0)/ctdb_test_env :
8 . ctdb_test_functions.bash
12 Usage: run_tests [OPTIONS] [TESTS]
18 ######################################################################
22 temp=$(getopt -n "$prog" -o "xhs" -l help -- "$@")
31 -s) with_summary=true ; shift ;;
37 ######################################################################
43 rows=$(if tty -s ; then stty size ; else echo x 80 ; fi | sed -e 's@.* @@' -e 's@^0$@80@')
47 [ -x $f ] || fail "test \"$f\" is not executable"
48 tests_total=$(($tests_total + 1))
49 if ctdb_test_run "$f" ; then
50 tests_passed=$(($tests_passed + 1))
55 summary=$(printf "%s\n%-${ww}s%s" "$summary" "$f" "$t")
58 if $with_summary ; then
61 echo "${tests_passed}/${tests_total} tests passed"