diff options
author | David Bremner <david@tethera.net> | 2014-03-01 16:12:44 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-03-11 19:51:22 -0300 |
commit | 8413582b6edc859285d68c9f7ad83236788567c0 (patch) | |
tree | bdaf24bb76118273af3817cd132261cea24fa51d /test | |
parent | b6606421019daebbe62645c2dbc2fcdd0f32c1e2 (diff) |
test: add machinery to download and verify databases
Note that it is intentional that the checksum file is not
downloaded. The intent is to check those into git.
Diffstat (limited to 'test')
-rw-r--r-- | test/README | 8 | ||||
-rwxr-xr-x | test/T530-upgrade.sh | 2 | ||||
-rw-r--r-- | test/test-databases/Makefile | 7 | ||||
-rw-r--r-- | test/test-databases/Makefile.local | 14 |
4 files changed, 30 insertions, 1 deletions
diff --git a/test/README b/test/README index 79a9b1b2..81a1c82d 100644 --- a/test/README +++ b/test/README @@ -64,6 +64,14 @@ The following command-line options are available when running tests: 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: diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh index 2139618c..67bbf319 100755 --- a/test/T530-upgrade.sh +++ b/test/T530-upgrade.sh @@ -7,7 +7,7 @@ dbtarball=database-v1.tar.xz # 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 \ diff --git a/test/test-databases/Makefile b/test/test-databases/Makefile new file mode 100644 index 00000000..b250a8be --- /dev/null +++ b/test/test-databases/Makefile @@ -0,0 +1,7 @@ +# See Makefile.local for the list of files to be compiled in this +# directory. +all: + $(MAKE) -C ../.. all + +.DEFAULT: + $(MAKE) -C ../.. $@ diff --git a/test/test-databases/Makefile.local b/test/test-databases/Makefile.local new file mode 100644 index 00000000..0572e784 --- /dev/null +++ b/test/test-databases/Makefile.local @@ -0,0 +1,14 @@ +# -*- 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} |