From 6237f3808cf8552f3c59939549cd4e9d85785ac1 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Tue, 8 Nov 2011 18:02:25 +0200 Subject: [PATCH] test: make all tests terminable with Ctrl-c Some tests don't break when HUP signal is sent tho those (by pressing ctrl-c on the terminal). Therefore, the top-level test script catches the HUP and sends TERM signal to the started test script. --- test/notmuch-test | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/notmuch-test b/test/notmuch-test index adfd589f..6c65ed7a 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -60,10 +60,13 @@ else TEST_TIMEOUT_CMD="" fi +trap 'e=$?; kill $!; exit $e' HUP INT TERM # Run the tests for test in $TESTS; do - $TEST_TIMEOUT_CMD ./$test "$@" + $TEST_TIMEOUT_CMD ./$test "$@" & + wait $! done +trap - HUP INT TERM # Report results ./aggregate-results.sh test-results/* -- 2.43.0