[PATCH] test: allow user to choose which emacs to run tests with.
authorDavid Bremner <david@tethera.net>
Wed, 28 Dec 2011 17:08:21 +0000 (13:08 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:41:22 +0000 (09:41 -0800)
55/1474cd5458a7ad51108becc9b35c6b084465c3 [new file with mode: 0644]

diff --git a/55/1474cd5458a7ad51108becc9b35c6b084465c3 b/55/1474cd5458a7ad51108becc9b35c6b084465c3
new file mode 100644 (file)
index 0000000..e44806f
--- /dev/null
@@ -0,0 +1,115 @@
+Return-Path: <bremner@tethera.net>\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 41D61431FD0\r
+       for <notmuch@notmuchmail.org>; Wed, 28 Dec 2011 09:08:47 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] 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 rbXMf7K71TpX for <notmuch@notmuchmail.org>;\r
+       Wed, 28 Dec 2011 09:08:46 -0800 (PST)\r
+Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id ACE35431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 28 Dec 2011 09:08:46 -0800 (PST)\r
+Received: from zancas.localnet\r
+       (fctnnbsc36w-156034079193.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
+       [156.34.79.193]) (authenticated bits=0)\r
+       by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id pBSH8cSd011228\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);\r
+       Wed, 28 Dec 2011 13:08:41 -0400\r
+Received: from bremner by zancas.localnet with local (Exim 4.77)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1RfwzV-0007Ja-DD; Wed, 28 Dec 2011 13:08:37 -0400\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] test: allow user to choose which emacs to run tests with.\r
+Date: Wed, 28 Dec 2011 13:08:21 -0400\r
+Message-Id: <1325092101-28085-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.7.3\r
+In-Reply-To: <1325089128-32010-2-git-send-email-dme@dme.org>\r
+References: <1325089128-32010-2-git-send-email-dme@dme.org>\r
+Cc: David Bremner <bremner@debian.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: Wed, 28 Dec 2011 17:08:47 -0000\r
+\r
+From: David Bremner <bremner@debian.org>\r
+\r
+As we start to pay more attention to emacs24, it helps to be able to\r
+select a different version of emacs to run the tests with to verify\r
+version specific bugs.\r
+\r
+A separate variable TEST_EMACS is needed to avoid being overwritten by the\r
+make variable EMACS in Makefile.config\r
+\r
+For what it's worth, the value of emacs is chosen at the time\r
+tmp.emacs/run_emacs is created, so is fixed for all subtests.\r
+---\r
+\r
+This version allows the emacs version to be passed either from the\r
+environment or via a make argument. It also adds some brief documentation\r
+\r
+ test/README      |    7 +++++++\r
+ test/test-lib.sh |    3 ++-\r
+ 2 files changed, 9 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/test/README b/test/README\r
+index 7b2e96d..bde6db0 100644\r
+--- a/test/README\r
++++ b/test/README\r
+@@ -56,6 +56,13 @@ can be specified as follows:\r
\r
+       make test OPTIONS="--verbose"\r
\r
++You can choose an emacs binary to run the tests in one of the\r
++following ways.\r
++\r
++      TEST_EMACS=my-special-emacs make test\r
++      TEST_EMACS=my-special-emacs ./emacs\r
++      make test TEST_EMACS=my-special-emacs\r
++\r
+ Skipping Tests\r
+ --------------\r
+ If, for any reason, you need to skip one or more tests, you can do so\r
+diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+index b5e346c..8edf256 100644\r
+--- a/test/test-lib.sh\r
++++ b/test/test-lib.sh\r
+@@ -50,6 +50,7 @@ TZ=UTC\r
+ TERM=dumb\r
+ export LANG LC_ALL PAGER TERM TZ\r
+ GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}\r
++TEST_EMACS=${TEST_EMACS:-${EMACS:-emacs}}\r
\r
+ # Protect ourselves from common misconfiguration to export\r
+ # CDPATH into the environment\r
+@@ -897,7 +898,7 @@ export NOTMUCH_CONFIG=$NOTMUCH_CONFIG\r
+ #\r
+ # --load              Force loading of notmuch.el and test-lib.el\r
\r
+-exec emacs --no-init-file --no-site-file \\r
++exec ${TEST_EMACS} --no-init-file --no-site-file \\r
+       --directory "$TEST_DIRECTORY/../emacs" --load notmuch.el \\r
+       --directory "$TEST_DIRECTORY" --load test-lib.el \\r
+       "\$@"\r
+-- \r
+1.7.7.3\r
+\r