implement --timeout

This commit is contained in:
Thomas Levine 2016-02-29 03:40:27 +00:00
parent 34a065c074
commit 8aab5dad0d

9
urchin
View File

@ -155,15 +155,15 @@ recurse() {
{
if $cycle_shell &&
has_sh_or_no_shebang_line "$potential_test"; then
TEST_SHELL="$the_test_shell" "$the_test_shell" \
"$potential_test"
TEST_SHELL="$the_test_shell" $TIMEOUT \
"$the_test_shell" "$potential_test"
else
# Shell cycling is disabled with -n; use the present value of
# TEST_SHELL or default to /bin/sh
if [ -n "$TEST_SHELL" ]; then
"$potential_test"
$TIMEOUT "$potential_test"
else
TEST_SHELL=/bin/sh "$potential_test"
TEST_SHELL=/bin/sh $TIMEOUT "$potential_test"
fi
fi
} > "$(stdout_file "$potential_test" "$the_test_shell")" 2>&1
@ -370,7 +370,6 @@ The following flags affect how Urchin processes tests.
configuration files with Urchin.
-T, --timeout <seconds> Kill a test if it runs for longer than the
specified duration. The default is no timeout.
XXX Not yet implemented
-f, --force Force running even if the test directory's name
does not contain the word "test".