From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [Patch v3 15/15] test: add machinery to download and verify databases
Date: Sat, 8 Mar 2014 17:19:45 -0400 [thread overview]
Message-ID: <1394313585-28422-16-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1394313585-28422-1-git-send-email-david@tethera.net>
Note that it is intentional that the checksum file is not
downloaded. The intent is to check those into git.
---
Makefile | 3 ++-
test/Makefile.local | 2 +-
test/README | 8 ++++++++
test/T530-upgrade.sh | 2 +-
test/test-databases/Makefile | 7 +++++++
test/test-databases/Makefile.local | 14 ++++++++++++++
6 files changed, 33 insertions(+), 3 deletions(-)
create mode 100644 test/test-databases/Makefile
create mode 100644 test/test-databases/Makefile.local
diff --git a/Makefile b/Makefile
index 0428160..97084b1 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,8 @@ all:
# 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 emacs lib man parse-time-string performance-test util test
+subdirs = compat completion emacs lib man 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 \
diff --git a/test/Makefile.local b/test/Makefile.local
index 40aa7d8..bfabd15 100644
--- a/test/Makefile.local
+++ b/test/Makefile.local
@@ -46,7 +46,7 @@ TEST_BINARIES=$(dir)/arg-test \
test-binaries: $(TEST_BINARIES)
-test: all test-binaries
+test: all test-binaries fetch-test-databases
@${test_src_dir}/notmuch-test $(OPTIONS)
check: test
diff --git a/test/README b/test/README
index 79a9b1b..81a1c82 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 a3c2ed1..e1e8ac5 100755
--- a/test/T530-upgrade.sh
+++ b/test/T530-upgrade.sh
@@ -7,7 +7,7 @@ dbtarball=folders-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 0000000..b250a8b
--- /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 0000000..e777ada
--- /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)/folders-v1.tar.xz
+
+%.tar.xz:
+ wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@);
+
+download-test-databases: ${test_databases}
+
+DISTCLEAN := $(DISTCLEAN) ${test_databases}
--
1.8.5.3
next prev parent reply other threads:[~2014-03-08 21:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-08 21:19 v3 of boolean folder: patches David Bremner
2014-03-08 21:19 ` [Patch v3 01/15] lib: refactor folder term update after filename removal David Bremner
2014-03-08 21:19 ` [Patch v3 02/15] lib: add support for path: prefix searches David Bremner
2014-03-08 21:19 ` [Patch v3 03/15] test: make insert test use the path: prefix David Bremner
2014-03-08 21:19 ` [Patch v3 04/15] lib: make folder: prefix literal David Bremner
2014-03-08 23:51 ` Austin Clements
2014-03-09 8:45 ` Jani Nikula
2014-03-09 16:15 ` Austin Clements
2014-03-08 21:19 ` [Patch v3 05/15] test: fix test for literal folder: search David Bremner
2014-03-08 21:19 ` [Patch v3 08/15] test: add tests for the new boolean folder: and path: prefixes David Bremner
2014-03-09 2:55 ` Austin Clements
2014-03-08 21:19 ` [Patch v3 09/15] test: add database upgrade test from format version 1 to 2 David Bremner
2014-03-08 21:19 ` [Patch v3 10/15] man: update man pages for folder: and path: search terms David Bremner
2014-03-09 3:52 ` Austin Clements
2014-03-08 21:19 ` [Patch v3 11/15] man: try to clarify the folder: and path: vs. --output=files confusion David Bremner
2014-03-08 21:19 ` [Patch v3 12/15] test: don't use $(dir) in recipes David Bremner
2014-03-08 21:19 ` [Patch v3 13/15] devel: add script to generate test databases David Bremner
2014-03-08 21:19 ` [Patch v3 14/15] test: commit folders-v1.tar.xz checksum, ignore actual databases David Bremner
2014-03-08 21:19 ` David Bremner [this message]
2014-03-08 21:40 ` v3 of boolean folder: patches David Bremner
2014-03-10 18:10 ` W. Trevor King
2014-03-10 18:24 ` Jani Nikula
2014-03-10 18:31 ` W. Trevor King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394313585-28422-16-git-send-email-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).