Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 2D474429E44 for ; Sun, 9 Mar 2014 14:42:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gOHPC20IYG-6 for ; Sun, 9 Mar 2014 14:42:03 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id D5F40431FCB for ; Sun, 9 Mar 2014 14:41:10 -0700 (PDT) Received: by mail-lb0-f180.google.com with SMTP id 10so4175926lbg.11 for ; Sun, 09 Mar 2014 14:41:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=FjdV0juwo85rcb/rHUr7qHjM17I1NwQS937yZmpinFI=; b=lxw0kxvUdlXvhHhjEb9/fyeQcWxWqDbtImaDH5izry4yCz3NeCp1IM6jOT2dzj+b/n 1xaww/ZEUs9bIMgAsVER2MQyZPRP9IlwsvIFHwiia6U/IckNAgWsDgma/AbHX3EQ6fLj nMo90OAPQU1LlYmG/+QQxoRh7R5PB3v09ZoRDJkmnsiGTScZh/8sKT5b54cYi4dVZn2H 7OCj1MCuCks+Gbl3FKwRIpesZk0toqEJJhIY8g0v7rx0M/jPvgXdUNTZLJTIuY8/63an G+vuXWG8XBlDjwoILGzoNFbDuzeVgf1ByQ3NaLQXGTA0cepQ7Egdh6GzBwNqBxod08RO gDvA== X-Gm-Message-State: ALoCoQnT1y4kZ5bZ3+GBV9QzE5vEEEv580IoYKx1UKiFgDJykUWyznR91EA1yW2zEpv7wjGjC+sG X-Received: by 10.152.18.229 with SMTP id z5mr21155475lad.27.1394401269412; Sun, 09 Mar 2014 14:41:09 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. [88.195.111.91]) by mx.google.com with ESMTPSA id v5sm26918875laj.0.2014.03.09.14.41.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Mar 2014 14:41:08 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v4 13/13] test: add machinery to download and verify databases Date: Sun, 9 Mar 2014 23:40:34 +0200 Message-Id: X-Mailer: git-send-email 1.9.0 In-Reply-To: References: In-Reply-To: References: X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2014 21:42:08 -0000 From: David Bremner Note that it is intentional that the checksum file is not downloaded. The intent is to check those into git. --- Makefile | 3 ++- test/README | 8 ++++++++ test/T530-upgrade.sh | 2 +- test/test-databases/Makefile | 7 +++++++ test/test-databases/Makefile.local | 14 ++++++++++++++ 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 test/test-databases/Makefile create mode 100644 test/test-databases/Makefile.local diff --git a/Makefile b/Makefile index 0428160b80c2..97084b1c1cd0 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/README b/test/README index 79a9b1b2f9a1..81a1c82dcdbd 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 1d883986db83..6cbbb860998a 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 000000000000..b250a8bea31d --- /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 000000000000..e777ada71667 --- /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.9.0