2010-10-28 21:07:42 +02:00
|
|
|
#!/bin/bash
|
2010-01-23 19:36:39 +01:00
|
|
|
|
2010-09-17 21:10:54 +02:00
|
|
|
# Run tests
|
|
|
|
#
|
|
|
|
# Copyright (c) 2005 Junio C Hamano
|
|
|
|
#
|
|
|
|
# Adapted from a Makefile to a shell script by Carl Worth (2010)
|
|
|
|
|
2010-10-28 21:07:42 +02:00
|
|
|
if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
|
|
|
|
echo "Error: The notmuch test suite requires a bash version >= 4.0"
|
|
|
|
echo "due to use of associative arrays within the test suite."
|
|
|
|
echo "Please try again with a newer bash (or help us fix the"
|
|
|
|
echo "test suite to be more portable). Thanks."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2010-09-17 21:10:54 +02:00
|
|
|
cd $(dirname "$0")
|
|
|
|
|
2011-01-23 12:12:24 +01:00
|
|
|
TESTS="
|
|
|
|
basic
|
|
|
|
new
|
|
|
|
search
|
|
|
|
search-output
|
|
|
|
search-by-folder
|
|
|
|
search-position-overlap-bug
|
2011-01-28 21:21:25 +01:00
|
|
|
search-insufficient-from-quoting
|
2011-01-23 12:12:24 +01:00
|
|
|
json
|
|
|
|
thread-naming
|
|
|
|
raw
|
|
|
|
reply
|
|
|
|
dump-restore
|
|
|
|
uuencode
|
|
|
|
thread-order
|
|
|
|
author-order
|
|
|
|
from-guessing
|
|
|
|
long-id
|
|
|
|
encoding
|
|
|
|
emacs
|
|
|
|
maildir-sync
|
2011-02-03 00:56:38 +01:00
|
|
|
emacs-forgetfulness
|
2011-01-23 12:12:24 +01:00
|
|
|
"
|
2010-09-18 00:58:39 +02:00
|
|
|
|
2010-09-17 21:10:54 +02:00
|
|
|
# Clean up any results from a previous run
|
2010-12-08 00:28:44 +01:00
|
|
|
rm -r test-results >/dev/null 2>/dev/null
|
2010-09-17 21:10:54 +02:00
|
|
|
|
|
|
|
# Run the tests
|
2010-09-18 00:58:39 +02:00
|
|
|
for test in $TESTS; do
|
2010-09-20 22:45:29 +02:00
|
|
|
./$test "$@"
|
2010-09-17 21:10:54 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# Report results
|
2010-09-18 00:58:39 +02:00
|
|
|
./aggregate-results.sh test-results/*
|
2010-09-17 21:10:54 +02:00
|
|
|
|
|
|
|
# Clean up
|
2010-09-21 01:40:35 +02:00
|
|
|
rm -r test-results corpus.mail
|