Patchworkβ test: use dtach(1) instead of screen(1) in emacs tests.

login
register
about
Submitter Tomi Ollila
Date 2011-11-10 22:03:14
Message ID <yf6mxc3ab4t.fsf@taco2.nixu.fi>
Download mbox | patch
Permalink /patch/1482/
State New
Headers show

Comments

Tomi Ollila - 2011-11-10 22:03:14
dtach is lighter than screen and is not setuid/setgid program so
TMPDIR does not get reset by dynamic loader when executed.
---
 test/test-lib.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/test/test-lib.sh b/test/test-lib.sh
index c81c709..af723ad 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -844,8 +844,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" \
-			--no-window-system \
+		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)' \
 			--eval "(orphan-watchdog $$)" || return