[PATCH] test: use dtach(1) instead of screen(1) in emacs tests.

Jameson Graef Rollins jrollins at finestructure.net
Thu Nov 10 14:22:17 PST 2011


From: Tomi Ollila <tomi.ollila at iki.fi>

dtach is lighter than screen and is not setuid/setgid program so
TMPDIR does not get reset by dynamic loader when executed.

Signed-off-by: Jameson Graef Rollins <jrollins at finestructure.net>
---
This tweaks the original patch slightly by removing the no-longer needed
screenrc variables.

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

diff --git a/test/test-lib.sh b/test/test-lib.sh
index c81c709..c0fe037 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -50,8 +50,6 @@ TZ=UTC
 TERM=dumb
 export LANG LC_ALL PAGER TERM TZ
 GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}
-export SCREENRC=/dev/null
-export SYSSCREENRC=/dev/null
 
 # Protect ourselves from common misconfiguration to export
 # CDPATH into the environment
@@ -844,7 +842,8 @@ test_emacs () {
 	if [ -z "$EMACS_SERVER" ]; then
 		EMACS_SERVER="notmuch-test-suite-$$"
 		# start a detached screen session with an emacs server
-		screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \
+		TERM=xterm dtach -n "$TMP_DIRECTORY/dtach-emacs-socket-$$" \
+			"$TMP_DIRECTORY/run_emacs" \
 			--no-window-system \
 			--eval "(setq server-name \"$EMACS_SERVER\")" \
 			--eval '(server-start)' \
-- 
1.7.7.1



More information about the notmuch mailing list