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.
This commit is contained in:
Tomi Ollila 2011-11-08 18:02:25 +02:00 committed by David Bremner
parent 66247d26f3
commit 6237f3808c

View file

@ -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/*