# List all subdirectories here. Each contains its own Makefile.local.
# Use of '=', without '+=', seems to be required for out-of-tree
# builds to work.
-subdirs = compat completion doc emacs lib parse-time-string performance-test util test
+subdirs = compat completion doc emacs lib parse-time-string \
+ performance-test util test test/test-databases
# We make all targets depend on the Makefiles themselves.
global_deps = Makefile Makefile.config Makefile.local \
Pointing this argument at a tmpfs filesystem can improve the
speed of the test suite for some users.
+Certain tests require precomputed databases to complete. You can fetch these
+databases with
+
+ make download-test-databases
+
+If you do not download the test databases, the relevant tests will be
+skipped.
+
When invoking the test suite via "make test" any of the above options
can be specified as follows:
# XXX: Accomplish the same with test lib helpers
if [ ! -e ${TEST_DIRECTORY}/test-databases/${dbtarball} ]; then
- test_subtest_missing_external_prereq_["${dbtarball}"]=t
+ test_subtest_missing_external_prereq_["${dbtarball} - fetch with 'make download-test-databases'"]=t
fi
test_expect_success \
--- /dev/null
+# See Makefile.local for the list of files to be compiled in this
+# directory.
+all:
+ $(MAKE) -C ../.. all
+
+.DEFAULT:
+ $(MAKE) -C ../.. $@
--- /dev/null
+# -*- makefile -*-
+
+TEST_DATABASE_MIRROR=http://notmuchmail.org/releases/test-databases
+
+dir := test/test-databases
+
+test_databases := $(dir)/database-v1.tar.xz
+
+%.tar.xz:
+ wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@);
+
+download-test-databases: ${test_databases}
+
+DISTCLEAN := $(DISTCLEAN) ${test_databases}