From: Tomi Ollila Date: Tue, 8 Nov 2011 16:02:25 +0000 (+0200) Subject: test: make all tests terminable with Ctrl-c X-Git-Tag: 0.11_rc1~125 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6237f3808cf8552f3c59939549cd4e9d85785ac1;p=notmuch.git 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. --- 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/*