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