]> git.notmuchmail.org Git - notmuch/commitdiff
test: allow user to choose which emacs to run tests with.
authorDavid Bremner <bremner@debian.org>
Wed, 28 Dec 2011 17:08:21 +0000 (13:08 -0400)
committerDavid Bremner <bremner@debian.org>
Wed, 28 Dec 2011 19:50:04 +0000 (15:50 -0400)
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.

test/README
test/test-lib.sh

index 7b2e96d466a7a1403fa78f03940ffacf15abdd14..bde6db0c04a4979ea29ac1451e5d0e6b80b8fb50 100644 (file)
@@ -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
index b5e346c0c544abdfdfe7700b7b14385123d72719..8edf256ed9143fe193278a5072c46777fac67138 100644 (file)
@@ -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 \
        "\$@"