]> git.notmuchmail.org Git - notmuch/blobdiff - test/notmuch-test
test: add tests for notmuch count
[notmuch] / test / notmuch-test
index 0ea4f4f732534ca68be1430c7cebd131a032beaf..29de30d7652c3fc6bc7889c44cc450b8b92086cc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 
 # Run tests
 #
@@ -19,11 +19,13 @@ cd $(dirname "$0")
 TESTS="
   basic
   new
+  count
   search
   search-output
   search-by-folder
   search-position-overlap-bug
   search-insufficient-from-quoting
+  tagging
   json
   multipart
   thread-naming
@@ -39,15 +41,27 @@ TESTS="
   emacs
   emacs-large-search-buffer
   maildir-sync
+  crypto
+  symbol-hiding
+  search-folder-coherence
+  atomicity
 "
 TESTS=${NOTMUCH_TESTS:=$TESTS}
 
 # Clean up any results from a previous run
 rm -r test-results >/dev/null 2>/dev/null
 
+# test for timeout utility
+if command -v timeout >/dev/null; then
+    TEST_TIMEOUT_CMD="timeout 2m "
+    echo "INFO: using 2 minute timeout for tests"
+else
+    TEST_TIMEOUT_CMD=""
+fi
+
 # Run the tests
 for test in $TESTS; do
-       ./$test "$@"
+    $TEST_TIMEOUT_CMD ./$test "$@"
 done
 
 # Report results