aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Tomi Ollila <tomi.ollila@iki.fi>2011-11-08 18:02:25 +0200
committerGravatar David Bremner <bremner@debian.org>2011-11-18 13:53:51 -0500
commit6237f3808cf8552f3c59939549cd4e9d85785ac1 (patch)
tree457522a5781193b5176d4115f243f7162bc24346
parent66247d26f364a6afbe113a5d6e84eec859b1193e (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.
-rwxr-xr-xtest/notmuch-test5
1 files changed, 4 insertions, 1 deletions
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/*