[PATCH 2/2] test: use sh.config for configuration
authorJani Nikula <jani@nikula.org>
Fri, 30 May 2014 07:43:05 +0000 (10:43 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:03:04 +0000 (10:03 -0800)
42/a35db43d03fdfd37504cd4ceec7e384e5c471c [new file with mode: 0644]

diff --git a/42/a35db43d03fdfd37504cd4ceec7e384e5c471c b/42/a35db43d03fdfd37504cd4ceec7e384e5c471c
new file mode 100644 (file)
index 0000000..946f779
--- /dev/null
@@ -0,0 +1,161 @@
+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 9FA62431FC3\r
+       for <notmuch@notmuchmail.org>; Fri, 30 May 2014 00:43:15 -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 zjtfcbMfDk87 for <notmuch@notmuchmail.org>;\r
+       Fri, 30 May 2014 00:43:11 -0700 (PDT)\r
+Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com\r
+       [209.85.212.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id E50D1431FBD\r
+       for <notmuch@notmuchmail.org>; Fri, 30 May 2014 00:43:10 -0700 (PDT)\r
+Received: by mail-wi0-f176.google.com with SMTP id n15so593036wiw.3\r
+       for <notmuch@notmuchmail.org>; Fri, 30 May 2014 00:43:09 -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=lp8K2qD2ZX6CKrreJE46A+y6mKpTB3npUr4hw8aVKTA=;\r
+       b=CWfiS5+jM3T1l8h4ioFJ8+H9WD94GjBpMnR2p6s+968Q6TyHqJp20XVfJ6ddZTrwCV\r
+       DZOboy45dig8lOj95W4XrzW5A2NrkQ/jz7APuOzMy29cFtoSnZdyE/69+ZlXgtO9qAnQ\r
+       +xs3iD0coDqvcOiiAmpkTvMTr9KQBvHMqeCOJg9DG3bpG49xt4J+4NF2Le1etAGRHQfG\r
+       Iy74GQunWEBQWfS+AaUkhz7sET0WTLCZtCivFDDkMD1aALS3I/E1fAO+I0v3vOp+uzB3\r
+       VwyH2LOIwJZzuf7OnjPO+rwPnI0phYh3BY46yzN/lJelKwQ6QmR02I0qnBoex6ZLWAft\r
+       CTyg==\r
+X-Gm-Message-State:\r
+ ALoCoQmTofDgxmBwM2qCCdNq8ExK5/gK3NKUsz97AvW3L9sYZ3ZbMCunUInsmsWachwevKPJ8oFk\r
+X-Received: by 10.180.74.203 with SMTP id w11mr3873223wiv.27.1401435789693;\r
+       Fri, 30 May 2014 00:43:09 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+       [88.195.111.91]) by mx.google.com with ESMTPSA id\r
+       ch16sm7990218wjb.43.2014.05.30.00.43.08 for <multiple recipients>\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Fri, 30 May 2014 00:43:09 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] test: use sh.config for configuration\r
+Date: Fri, 30 May 2014 10:43:05 +0300\r
+Message-Id: <1401435785-2894-2-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 2.0.0.rc2\r
+In-Reply-To: <1401435785-2894-1-git-send-email-jani@nikula.org>\r
+References: <m2lhtphn1b.fsf@guru.guru-group.fi>\r
+       <1401435785-2894-1-git-send-email-jani@nikula.org>\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\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: Fri, 30 May 2014 07:43:15 -0000\r
+\r
+---\r
+ test/.gitignore         |  2 --\r
+ test/Makefile.local     | 16 ----------------\r
+ test/T010-help-test.sh  |  2 +-\r
+ test/T020-compact.sh    |  2 +-\r
+ test/test-lib-common.sh |  4 ++++\r
+ 5 files changed, 6 insertions(+), 20 deletions(-)\r
+\r
+diff --git a/test/.gitignore b/test/.gitignore\r
+index 4081cee6da18..b3b706d85188 100644\r
+--- a/test/.gitignore\r
++++ b/test/.gitignore\r
+@@ -1,7 +1,5 @@\r
+ arg-test\r
+ corpus.mail\r
+-have-compact\r
+-have-man\r
+ hex-xcode\r
+ parse-time\r
+ random-corpus\r
+diff --git a/test/Makefile.local b/test/Makefile.local\r
+index d622eafee786..1c85b18adc41 100644\r
+--- a/test/Makefile.local\r
++++ b/test/Makefile.local\r
+@@ -35,25 +35,9 @@ $(dir)/symbol-test: $(dir)/symbol-test.o lib/$(LINKER_NAME)\r
+ $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o\r
+       $(call quiet,CC) $^ -o $@\r
\r
+-$(dir)/have-compact: Makefile.config\r
+-ifeq ($(HAVE_XAPIAN_COMPACT),1)\r
+-      ln -sf /bin/true $@\r
+-else\r
+-      ln -sf /bin/false $@\r
+-endif\r
+-\r
+-$(dir)/have-man: Makefile.config\r
+-ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00)\r
+-      ln -sf /bin/false $@\r
+-else\r
+-      ln -sf /bin/true $@\r
+-endif\r
+-\r
+ .PHONY: test check\r
\r
+ TEST_BINARIES=$(dir)/arg-test \\r
+-            $(dir)/have-compact \\r
+-            $(dir)/have-man \\r
+             $(dir)/hex-xcode \\r
+             $(dir)/random-corpus \\r
+             $(dir)/parse-time \\r
+diff --git a/test/T010-help-test.sh b/test/T010-help-test.sh\r
+index 77410bc54e66..f0ca4549dc8b 100755\r
+--- a/test/T010-help-test.sh\r
++++ b/test/T010-help-test.sh\r
+@@ -7,7 +7,7 @@ test_expect_success 'notmuch --help' 'notmuch --help'\r
+ test_expect_success 'notmuch help' 'notmuch help'\r
+ test_expect_success 'notmuch --version' 'notmuch --version'\r
\r
+-if ${TEST_DIRECTORY}/have-man; then\r
++if [ $_HAVE_MAN -eq 1 ]; then\r
+     test_expect_success 'notmuch --help tag' 'notmuch --help tag'\r
+     test_expect_success 'notmuch help tag' 'notmuch help tag'\r
+ else\r
+diff --git a/test/T020-compact.sh b/test/T020-compact.sh\r
+index 77bb9632cb11..19d81c5fc77d 100755\r
+--- a/test/T020-compact.sh\r
++++ b/test/T020-compact.sh\r
+@@ -10,7 +10,7 @@ notmuch tag +tag1 \*\r
+ notmuch tag +tag2 subject:Two\r
+ notmuch tag -tag1 +tag3 subject:Three\r
\r
+-if ! ${TEST_DIRECTORY}/have-compact; then\r
++if [ $_HAVE_XAPIAN_COMPACT -eq 0 ]; then\r
+     test_begin_subtest "Compact unsupported: error message"\r
+     output=$(notmuch compact --quiet 2>&1)\r
+     test_expect_equal "$output" "notmuch was compiled against a xapian version lacking compaction support.\r
+diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh\r
+index 892991e2bd03..4903038dd9ce 100644\r
+--- a/test/test-lib-common.sh\r
++++ b/test/test-lib-common.sh\r
+@@ -38,6 +38,10 @@ find_notmuch_path ()\r
+ # test/ subdirectory and are run in 'trash directory' subdirectory.\r
+ TEST_DIRECTORY=$(pwd)\r
+ notmuch_path=`find_notmuch_path "$TEST_DIRECTORY"`\r
++\r
++# configure output\r
++. $notmuch_path/sh.config\r
++\r
+ if test -n "$valgrind"\r
+ then\r
+       make_symlink () {\r
+-- \r
+2.0.0.rc2\r
+\r