unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] test-lib: Use --no-window-system in run_emacs to help diagnose problems.
@ 2011-12-28 16:18 David Edmondson
  2011-12-28 16:18 ` [PATCH 2/2] test-lib: Allow the user to override which emacs binary is used David Edmondson
  0 siblings, 1 reply; 6+ messages in thread
From: David Edmondson @ 2011-12-28 16:18 UTC (permalink / raw)
  To: notmuch

---
 test/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index b5e346c..41a3144 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -898,6 +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 \
+	--no-window-system \
 	--directory "$TEST_DIRECTORY/../emacs" --load notmuch.el \
 	--directory "$TEST_DIRECTORY" --load test-lib.el \
 	"\$@"
@@ -917,7 +918,6 @@ test_emacs () {
 		# VT100-compatible terminal -- and emacs inherits that
 		TERM=$ORIGINAL_TERM dtach -n "$TEST_TMPDIR/emacs-dtach-socket.$$" \
 			sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \
-				--no-window-system \
 				--eval '(setq server-name \"$server_name\")' \
 				--eval '(server-start)' \
 				--eval '(orphan-watchdog $$)'" || return
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] test-lib: Allow the user to override which emacs binary is used.
  2011-12-28 16:18 [PATCH 1/2] test-lib: Use --no-window-system in run_emacs to help diagnose problems David Edmondson
@ 2011-12-28 16:18 ` David Edmondson
  2011-12-28 17:08   ` [PATCH] test: allow user to choose which emacs to run tests with David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: David Edmondson @ 2011-12-28 16:18 UTC (permalink / raw)
  To: notmuch

Specify when running the tests:
	make EMACS=emacs23 test
---
 test/test-lib.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 41a3144..53aa885 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -897,7 +897,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 ${EMACS:-emacs} --no-init-file --no-site-file \
 	--no-window-system \
 	--directory "$TEST_DIRECTORY/../emacs" --load notmuch.el \
 	--directory "$TEST_DIRECTORY" --load test-lib.el \
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] test: allow user to choose which emacs to run tests with.
  2011-12-28 16:18 ` [PATCH 2/2] test-lib: Allow the user to override which emacs binary is used David Edmondson
@ 2011-12-28 17:08   ` David Bremner
  2011-12-28 17:17     ` David Edmondson
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Bremner @ 2011-12-28 17:08 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

From: David Bremner <bremner@debian.org>

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] test: allow user to choose which emacs to run tests with.
  2011-12-28 17:08   ` [PATCH] test: allow user to choose which emacs to run tests with David Bremner
@ 2011-12-28 17:17     ` David Edmondson
  2011-12-28 19:37     ` Tomi Ollila
  2011-12-28 20:06     ` David Bremner
  2 siblings, 0 replies; 6+ messages in thread
From: David Edmondson @ 2011-12-28 17:17 UTC (permalink / raw)
  To: David Bremner, notmuch; +Cc: David Bremner

[-- Attachment #1: Type: text/plain, Size: 12 bytes --]

Looks good.

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] test: allow user to choose which emacs to run tests with.
  2011-12-28 17:08   ` [PATCH] test: allow user to choose which emacs to run tests with David Bremner
  2011-12-28 17:17     ` David Edmondson
@ 2011-12-28 19:37     ` Tomi Ollila
  2011-12-28 20:06     ` David Bremner
  2 siblings, 0 replies; 6+ messages in thread
From: Tomi Ollila @ 2011-12-28 19:37 UTC (permalink / raw)
  To: David Bremner, notmuch; +Cc: David Bremner

On Wed, 28 Dec 2011 13:08:21 -0400, David Bremner <david@tethera.net> wrote:
> From: David Bremner <bremner@debian.org>
> 
> 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
> 

+1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] test: allow user to choose which emacs to run tests with.
  2011-12-28 17:08   ` [PATCH] test: allow user to choose which emacs to run tests with David Bremner
  2011-12-28 17:17     ` David Edmondson
  2011-12-28 19:37     ` Tomi Ollila
@ 2011-12-28 20:06     ` David Bremner
  2 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2011-12-28 20:06 UTC (permalink / raw)
  To: notmuch

On Wed, 28 Dec 2011 13:08:21 -0400, David Bremner <david@tethera.net> wrote:
> From: David Bremner <bremner@debian.org>
> 
> 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.

pushed.

d

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-28 20:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-28 16:18 [PATCH 1/2] test-lib: Use --no-window-system in run_emacs to help diagnose problems David Edmondson
2011-12-28 16:18 ` [PATCH 2/2] test-lib: Allow the user to override which emacs binary is used David Edmondson
2011-12-28 17:08   ` [PATCH] test: allow user to choose which emacs to run tests with David Bremner
2011-12-28 17:17     ` David Edmondson
2011-12-28 19:37     ` Tomi Ollila
2011-12-28 20:06     ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).