aboutsummaryrefslogtreecommitdiff
path: root/test/notmuch-test
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2019-05-20 19:25:35 -0400
committerDavid Bremner <david@tethera.net>2019-05-25 08:26:41 -0300
commitfa9d8b702666adc5fe5759c352a9e8467c436804 (patch)
treee3a64a868e322d37be888376dea3cfc823198f10 /test/notmuch-test
parent9dedb23b47961047d75ef08210481018042d0baf (diff)
test: allow disabling timeout with NOTMUCH_TEST_TIMEOUT=0
To aid in diagnosing test suite tooling that interacts poorly with coreutils' timeout, it's handy to be able to bypass it entirely. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'test/notmuch-test')
-rwxr-xr-xtest/notmuch-test9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/notmuch-test b/test/notmuch-test
index 8e483383..50ed8721 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