Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
EOF
}
- _shell=""
- if $TEST_COMMAND_TRACE ; then
- _shell="sh -x"
- else
- _shell="sh"
- fi
- _out=$($_shell "${script_dir}/${script}" "$event" "$@" 2>&1)
-
- result_check
+ script_test "${script_dir}/${script}" "$event" "$@"
reset_test_header
reset_extra_header
simple_test_command ()
{
- # If something has previously failed then don't continue.
- : ${_passed:=true}
- $_passed || return 1
-
- echo "=================================================="
- echo "Running command \"$*\""
- _out=$("$@" 2>&1)
-
- result_check
+ unit_test "$@"
}
# Run an eventscript iteratively.
simple_test ()
{
- _out=$($VALGRIND $test_prog "$@" 2>&1)
-
- result_check
+ unit_test $test_prog "$@"
}
: ${CTDB_DEBUGLEVEL:=3}
export CTDB_DEBUGLEVEL
- _out=$($VALGRIND $test_prog "$@" 2>&1)
-
- result_check
+ unit_test $test_prog "$@"
}