unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: allow disabling timeout with NOTMUCH_TEST_TIMEOUT=0
@ 2019-05-20 23:25 Daniel Kahn Gillmor
  2019-05-22 11:52 ` David Bremner
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Kahn Gillmor @ 2019-05-20 23:25 UTC (permalink / raw)
  To: Notmuch Mail

Tests appear to be hanging when run under GNU timeout on debian
stretch.  To aid in diagnosing this or similar problems, it's handy to
be able to disable timeout from the command line at will.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
---
 test/notmuch-test | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/test/notmuch-test b/test/notmuch-test
index bbc2dc31..126c28d4 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -33,8 +33,13 @@ rm -rf $NOTMUCH_BUILDDIR/test/test-results
 # Test for timeout utility
 if command -v timeout >/dev/null; then
     TEST_TIMEOUT=${NOTMUCH_TEST_TIMEOUT:-2m}
-    TEST_TIMEOUT_CMD="timeout $TEST_TIMEOUT"
-    echo "INFO: using $TEST_TIMEOUT timeout for tests"
+    if [ "$TEST_TIMEOUT" = 0 ]; then
+        TEST_TIMEOUT_CMD=""
+        echo "INFO: timeout disabled"
+    else
+        TEST_TIMEOUT_CMD="timeout $TEST_TIMEOUT"
+        echo "INFO: using $TEST_TIMEOUT timeout for tests"
+    fi
 else
     TEST_TIMEOUT_CMD=""
 fi
-- 
2.20.1

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

end of thread, other threads:[~2019-05-25 11:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-20 23:25 [PATCH] test: allow disabling timeout with NOTMUCH_TEST_TIMEOUT=0 Daniel Kahn Gillmor
2019-05-22 11:52 ` David Bremner
2019-05-24 19:52   ` Daniel Kahn Gillmor
2019-05-25 11:32     ` 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).