[PATCH v5] test: add machinery to download and verify databases
authorJani Nikula <jani@nikula.org>
Mon, 10 Mar 2014 06:24:50 +0000 (08:24 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:00:33 +0000 (10:00 -0800)
72/75c6f7bf61d70f019ea96f37db4a0a5cd4ce03 [new file with mode: 0644]

diff --git a/72/75c6f7bf61d70f019ea96f37db4a0a5cd4ce03 b/72/75c6f7bf61d70f019ea96f37db4a0a5cd4ce03
new file mode 100644 (file)
index 0000000..ff6e797
--- /dev/null
@@ -0,0 +1,164 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id F2897431FBD\r
+       for <notmuch@notmuchmail.org>; Sun,  9 Mar 2014 23:25:06 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id pyr7RLEYuFGb for <notmuch@notmuchmail.org>;\r
+       Sun,  9 Mar 2014 23:24:58 -0700 (PDT)\r
+Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com\r
+ [74.125.83.54])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 646A3431FBC   for <notmuch@notmuchmail.org>; Sun,  9 Mar 2014 23:24:58 -0700\r
+ (PDT)\r
+Received: by mail-ee0-f54.google.com with SMTP id d49so2911617eek.27\r
+       for <notmuch@notmuchmail.org>; Sun, 09 Mar 2014 23:24:54 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+       :references;\r
+       bh=KAmHh6bYdUkNW/YM9wXxxHBbxWPUgF6rhlGdAhNa6/Q=;\r
+       b=bSIINZUkJJj2ryWE/SlNSmVY4rGPuF5KPr5Sof2UtZ7G3P3IVWzau9/zOFtFq7CmW7\r
+       WMoMv8EdSa0zXSnlQLcWvSlkLxxwyWLEaelx7xTtp93n8DkTr0hebc/jVJlboUoDLxL+\r
+       QBZjNfgSIjDwA43gzzifdNXZ6FLv0rz0hsiqbNe1KiK8C2pCHebNpVrR03tfQakeeGsP\r
+       lqmvJinafNz49wQWQ/M7PCLZVpmtrAA+4Lnr5Vq5uCadTZfZajD7RKqTj6ctb7S7GYcz\r
+       UujhZEhuEd00+6YWlQqJ8KfVYPvlfzFXgwzliGK2dpEyDqUS1HdxghmvqrDJ/0GjKbRj\r
+       vY0Q==\r
+X-Gm-Message-State:\r
+ ALoCoQm+v0QhORQbfQopTqGmh1EZYJUCXhts3j9Bdg16IQ/HKJUqyxLmhyotYMjrYJxmAUyf0PFz\r
+X-Received: by 10.15.56.130 with SMTP id y2mr33295555eew.17.1394432693155;\r
+       Sun, 09 Mar 2014 23:24:53 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+       [88.195.111.91])\r
+       by mx.google.com with ESMTPSA id o5sm41217913eeg.8.2014.03.09.23.24.51\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sun, 09 Mar 2014 23:24:52 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v5] test: add machinery to download and verify databases\r
+Date: Mon, 10 Mar 2014 08:24:50 +0200\r
+Message-Id: <1394432690-3208-1-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 1.9.0\r
+In-Reply-To:\r
+ <aa1f5c1f9a06736c01065b01525625408cc2adbf.1394400503.git.jani@nikula.org>\r
+References:\r
+ <aa1f5c1f9a06736c01065b01525625408cc2adbf.1394400503.git.jani@nikula.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 10 Mar 2014 06:25:07 -0000\r
+\r
+From: David Bremner <david@tethera.net>\r
+\r
+Note that it is intentional that the checksum file is not\r
+downloaded. The intent is to check those into git.\r
+---\r
+ Makefile                           |  3 ++-\r
+ test/README                        |  8 ++++++++\r
+ test/T530-upgrade.sh               |  2 +-\r
+ test/test-databases/Makefile       |  7 +++++++\r
+ test/test-databases/Makefile.local | 14 ++++++++++++++\r
+ 5 files changed, 32 insertions(+), 2 deletions(-)\r
+ create mode 100644 test/test-databases/Makefile\r
+ create mode 100644 test/test-databases/Makefile.local\r
+\r
+diff --git a/Makefile b/Makefile\r
+index f53bec0ea401..061c55a1948a 100644\r
+--- a/Makefile\r
++++ b/Makefile\r
+@@ -5,7 +5,8 @@ all:\r
+ # List all subdirectories here. Each contains its own Makefile.local.\r
+ # Use of '=', without '+=', seems to be required for out-of-tree\r
+ # builds to work.\r
+-subdirs = compat completion doc emacs lib parse-time-string performance-test util test\r
++subdirs = compat completion doc emacs lib parse-time-string   \\r
++      performance-test util test test/test-databases\r
\r
+ # We make all targets depend on the Makefiles themselves.\r
+ global_deps = Makefile Makefile.config Makefile.local \\r
+diff --git a/test/README b/test/README\r
+index 79a9b1b2f9a1..81a1c82dcdbd 100644\r
+--- a/test/README\r
++++ b/test/README\r
+@@ -64,6 +64,14 @@ The following command-line options are available when running tests:\r
+       Pointing this argument at a tmpfs filesystem can improve the\r
+       speed of the test suite for some users.\r
\r
++Certain tests require precomputed databases to complete. You can fetch these\r
++databases with\r
++\r
++      make download-test-databases\r
++\r
++If you do not download the test databases, the relevant tests will be\r
++skipped.\r
++\r
+ When invoking the test suite via "make test" any of the above options\r
+ can be specified as follows:\r
\r
+diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh\r
+index 1d883986db83..6cbbb860998a 100755\r
+--- a/test/T530-upgrade.sh\r
++++ b/test/T530-upgrade.sh\r
+@@ -7,7 +7,7 @@ dbtarball=folders-v1.tar.xz\r
\r
+ # XXX: Accomplish the same with test lib helpers\r
+ if [ ! -e ${TEST_DIRECTORY}/test-databases/${dbtarball} ]; then\r
+-    test_subtest_missing_external_prereq_["${dbtarball}"]=t\r
++    test_subtest_missing_external_prereq_["${dbtarball} - fetch with 'make download-test-databases'"]=t\r
+ fi\r
\r
+ test_expect_success \\r
+diff --git a/test/test-databases/Makefile b/test/test-databases/Makefile\r
+new file mode 100644\r
+index 000000000000..b250a8bea31d\r
+--- /dev/null\r
++++ b/test/test-databases/Makefile\r
+@@ -0,0 +1,7 @@\r
++# See Makefile.local for the list of files to be compiled in this\r
++# directory.\r
++all:\r
++      $(MAKE) -C ../.. all\r
++\r
++.DEFAULT:\r
++      $(MAKE) -C ../.. $@\r
+diff --git a/test/test-databases/Makefile.local b/test/test-databases/Makefile.local\r
+new file mode 100644\r
+index 000000000000..e777ada71667\r
+--- /dev/null\r
++++ b/test/test-databases/Makefile.local\r
+@@ -0,0 +1,14 @@\r
++# -*- makefile -*-\r
++\r
++TEST_DATABASE_MIRROR=http://notmuchmail.org/releases/test-databases\r
++\r
++dir := test/test-databases\r
++\r
++test_databases := $(dir)/folders-v1.tar.xz\r
++\r
++%.tar.xz:\r
++      wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@);\r
++\r
++download-test-databases: ${test_databases}\r
++\r
++DISTCLEAN := $(DISTCLEAN) ${test_databases}\r
+-- \r
+1.9.0\r
+\r