unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH] test: allow disabling timeout with NOTMUCH_TEST_TIMEOUT=0
Date: Mon, 20 May 2019 19:25:35 -0400	[thread overview]
Message-ID: <20190520232535.4904-1-dkg@fifthhorseman.net> (raw)

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

             reply	other threads:[~2019-05-20 23:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 23:25 Daniel Kahn Gillmor [this message]
2019-05-22 11:52 ` [PATCH] test: allow disabling timeout with NOTMUCH_TEST_TIMEOUT=0 David Bremner
2019-05-24 19:52   ` Daniel Kahn Gillmor
2019-05-25 11:32     ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190520232535.4904-1-dkg@fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).