5 # Copyright (c) 2005 Junio C Hamano
7 # Adapted from a Makefile to a shell script by Carl Worth (2010)
9 if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
10 echo "Error: The notmuch test suite requires a bash version >= 4.0"
11 echo "due to use of associative arrays within the test suite."
12 echo "Please try again with a newer bash (or help us fix the"
13 echo "test suite to be more portable). Thanks."
27 search-position-overlap-bug
28 search-insufficient-from-quoting
44 emacs-large-search-buffer
45 emacs-subject-to-filename
49 search-folder-coherence
55 TESTS=${NOTMUCH_TESTS:=$TESTS}
57 # Clean up any results from a previous run
58 rm -r test-results >/dev/null 2>/dev/null
60 # test for timeout utility
61 if command -v timeout >/dev/null; then
62 TEST_TIMEOUT_CMD="timeout 2m "
63 echo "INFO: using 2 minute timeout for tests"
68 trap 'e=$?; kill $!; exit $e' HUP INT TERM
70 for test in $TESTS; do
71 $TEST_TIMEOUT_CMD ./$test "$@" &
77 ./aggregate-results.sh test-results/*
80 rm -rf test-results corpus.mail