unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: make all tests terminable with Ctrl-c
@ 2011-11-08 16:02 Tomi Ollila
  2011-11-18 19:28 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Tomi Ollila @ 2011-11-08 16:02 UTC (permalink / raw)
  To: notmuch

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 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/test/notmuch-test b/test/notmuch-test
index 738f8f6..b38c2c6 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -57,10 +57,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/*
-- 
1.7.6.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] test: make all tests terminable with Ctrl-c
  2011-11-08 16:02 [PATCH] test: make all tests terminable with Ctrl-c Tomi Ollila
@ 2011-11-18 19:28 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2011-11-18 19:28 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

On Tue, 08 Nov 2011 18:02:25 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> 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.

Pushed to master

d

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-18 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-08 16:02 [PATCH] test: make all tests terminable with Ctrl-c Tomi Ollila
2011-11-18 19:28 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).