From d4a4c4284317f3a51e2edfc218bfd030103f1110 Mon Sep 17 00:00:00 2001 From: Xavi Hernandez Date: Wed, 26 Jun 2019 17:34:23 +0200 Subject: 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 --- run-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'run-tests.sh') 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 -- cgit