diff options
author | Tomi Ollila <tomi.ollila@iki.fi> | 2011-11-08 18:02:25 +0200 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2011-11-18 13:53:51 -0500 |
commit | 6237f3808cf8552f3c59939549cd4e9d85785ac1 (patch) | |
tree | 457522a5781193b5176d4115f243f7162bc24346 /test/notmuch-test | |
parent | 66247d26f364a6afbe113a5d6e84eec859b1193e (diff) |
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.
Diffstat (limited to 'test/notmuch-test')
-rwxr-xr-x | test/notmuch-test | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/notmuch-test b/test/notmuch-test index adfd589..6c65ed7 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/* |