diff options
author | Xavi Hernandez <xhernandez@redhat.com> | 2019-06-26 17:34:23 +0200 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-06-28 04:55:42 +0000 |
commit | d4a4c4284317f3a51e2edfc218bfd030103f1110 (patch) | |
tree | 51869d607e4a2874dd542299e3b6334641215667 /run-tests.sh | |
parent | efa8477013d98a26283302ecb42d4ba606ce405e (diff) |
run-tests.sh: stop test on Ctrl-C
When a test is run through 'timeout' command, Ctrl-C becomes useless and
the test cannot be stopped.
Added '--foreground' option to 'timeout' command that makes it possible
to use Ctrl-C.
Updates: bz#1193929
Change-Id: I160984d1aba470e3a4a1135bd5fa57471046f52f
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-x | run-tests.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/run-tests.sh b/run-tests.sh index 5683b21640b..0ed1b69d23a 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -394,7 +394,7 @@ function run_tests() cmd_timeout=$(grep "SCRIPT_TIMEOUT=" ${t} | cut -f2 -d'='); echo "Timeout set is ${cmd_timeout}, default ${run_timeout}" fi - timeout -k ${kill_after_time} ${cmd_timeout} prove -vmfe '/bin/bash' ${t} + timeout --foreground -k ${kill_after_time} ${cmd_timeout} prove -vmfe '/bin/bash' ${t} else prove -vmfe '/bin/bash' ${t} fi @@ -418,7 +418,7 @@ function run_tests() echo "" if [ ${timeout_cmd_exists} == "yes" ]; then - timeout -k ${kill_after_time} ${cmd_timeout} prove -vmfe '/bin/bash' ${t} + timeout --foreground -k ${kill_after_time} ${cmd_timeout} prove -vmfe '/bin/bash' ${t} else prove -vmfe '/bin/bash' ${t} fi |