unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/6] test: run emacs inside screen
@ 2011-06-29 19:42 Dmitry Kurochkin
  2011-06-29 19:42 ` [PATCH 2/6] test: do not set frame width in emacs Dmitry Kurochkin
                   ` (7 more replies)
  0 siblings, 8 replies; 31+ messages in thread
From: Dmitry Kurochkin @ 2011-06-29 19:42 UTC (permalink / raw)
  To: notmuch

Before the change, emacs run in daemon mode without any visible
buffers.  Turns out that this affects emacs behavior in some
cases.  In particular, `window-end' function returns `point-max'
instead of the last visible position.  That makes it hard or
impossible to implement some tests.  The patch runs emacs in a
detached screen(1) session.  So that it works exactly as if it
has a visible window.

Note: screen terminates when emacs exits.  So the patch does not
introduce new "running processes left behind" issues.
---
 test/test-lib.sh |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 079d7db..8d7c98d 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -873,10 +873,16 @@ EOF
 test_emacs () {
 	if [ -z "$EMACS_SERVER" ]; then
 		EMACS_SERVER="notmuch-test-suite-$$"
-		"$TMP_DIRECTORY/run_emacs" \
-			--daemon \
+		# start a detached screen session with an emacs server
+		screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \
+			--no-window-system \
 			--eval "(setq server-name \"$EMACS_SERVER\")" \
+			--eval '(server-start)' \
 			--eval "(orphan-watchdog $$)" || return
+		# wait until the emacs server is up
+		until test_emacs '()'; do
+			sleep 1
+		done
 	fi
 
 	emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"
-- 
1.7.5.4

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

end of thread, other threads:[~2011-11-08  0:50 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 19:42 [PATCH 1/6] test: run emacs inside screen Dmitry Kurochkin
2011-06-29 19:42 ` [PATCH 2/6] test: do not set frame width in emacs Dmitry Kurochkin
2011-06-29 19:42 ` [PATCH 3/6] test: `notmuch-show-advance-and-archive' with invisible signature Dmitry Kurochkin
2011-06-29 19:42 ` [PATCH 4/6] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive Dmitry Kurochkin
2011-06-29 19:42 ` [PATCH 5/6] emacs: remove no longer used functions from notmuch-show.el Dmitry Kurochkin
2011-06-29 19:42 ` [PATCH 6/6] emacs: remove unused `point-invisible-p' function Dmitry Kurochkin
2011-06-29 20:16 ` [PATCH 1/6] test: run emacs inside screen Jim Paris
2011-06-29 21:27   ` Dmitry Kurochkin
2011-06-29 21:26 ` [PATCH] test: avoid using screen(1) configuration files Dmitry Kurochkin
2011-07-01  4:55 ` [PATCH v2 0/7] advance-and-archive bugfix, run emacs inside screen Dmitry Kurochkin
2011-07-01  4:55   ` [PATCH v2 1/7] test: " Dmitry Kurochkin
2011-07-20 12:36     ` [PATCH] test: run emacs inside tmux if screen is not available Thomas Jost
2011-07-20 13:37       ` Dmitry Kurochkin
2011-07-20 17:28         ` Jameson Graef Rollins
2011-07-20 18:12           ` Thomas Jost
2011-07-20 18:25             ` Dmitry Kurochkin
2011-07-01  4:55   ` [PATCH v2 2/7] test: avoid using screen(1) configuration files Dmitry Kurochkin
2011-07-01  4:55   ` [PATCH v2 3/7] test: do not set frame width in emacs Dmitry Kurochkin
2011-07-01  4:55   ` [PATCH v2 4/7] test: `notmuch-show-advance-and-archive' with invisible signature Dmitry Kurochkin
2011-11-06  1:06     ` David Bremner
2011-11-06  9:02       ` Dmitry Kurochkin
2011-11-06  9:03         ` [PATCH v3 1/4] " Dmitry Kurochkin
2011-11-06  9:03           ` [PATCH v3 2/4] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive Dmitry Kurochkin
2011-11-06  9:04           ` [PATCH v3 3/4] emacs: remove no longer used functions from notmuch-show.el Dmitry Kurochkin
2011-11-06  9:04           ` [PATCH v3 4/4] emacs: remove unused `point-invisible-p' function Dmitry Kurochkin
2011-11-08  0:50         ` [PATCH v2 4/7] test: `notmuch-show-advance-and-archive' with invisible signature David Bremner
2011-07-01  4:55   ` [PATCH v2 5/7] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive Dmitry Kurochkin
2011-09-07  9:13     ` Jani Nikula
2011-09-07 11:09       ` Dmitry Kurochkin
2011-07-01  4:55   ` [PATCH v2 6/7] emacs: remove no longer used functions from notmuch-show.el Dmitry Kurochkin
2011-07-01  4:55   ` [PATCH v2 7/7] emacs: remove unused `point-invisible-p' function Dmitry Kurochkin

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).