From: Tomi Ollila <tomi.ollila@iki.fi>
To: Jameson Graef Rollins <jrollins@finestructure.net>,
Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests
Date: Fri, 11 Nov 2011 22:49:02 +0200 [thread overview]
Message-ID: <yf639due669.fsf@taco2.nixu.fi> (raw)
In-Reply-To: <1320963737-1666-1-git-send-email-jrollins@finestructure.net>
dtach is simpler than screen and is not setuid/setgid program so
TMPDIR does not get cleared by dynamic loader when executed.
---
Updated version after discussion with DmitryKurochkin and amdragon
on IRC. Thank you.
test/test-lib.sh | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/test/test-lib.sh b/test/test-lib.sh
index c81c709..c232130 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -39,7 +39,7 @@ done,*)
;;
esac
-# Keep the original TERM for say_color
+# Keep the original TERM for say_color and emacs tests
ORIGINAL_TERM=$TERM
# For repeatability, reset the environment to known value.
@@ -843,12 +841,15 @@ EOF
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 \
- --eval "(setq server-name \"$EMACS_SERVER\")" \
- --eval '(server-start)' \
- --eval "(orphan-watchdog $$)" || return
+ # start a detached session with an emacs server
+ # user's TERM is given to dtach which assumes a minimally
+ # VT100-compatible terminal -- and emacs inherits that
+ TERM=$ORIGINAL_TERM dtach -n "$TMP_DIRECTORY/emacs-dtach-socket.$$" \
+ sh -c "stty rows 24 cols 80; exec '$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 '()' 2>/dev/null; do
sleep 1
--
1.7.6.1
prev parent reply other threads:[~2011-11-11 20:49 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <id:878vnomntf.fsf@servo.finestructure.net>
2011-11-10 16:59 ` [PATCH] test: Use env to set TMPDIR when running emacs in screen Jameson Graef Rollins
2011-11-10 17:09 ` Jameson Graef Rollins
2011-11-10 19:28 ` Austin Clements
2011-11-10 19:35 ` Jameson Graef Rollins
2011-11-10 22:03 ` [PATCH] test: use dtach(1) instead of screen(1) in emacs tests Tomi Ollila
2011-11-10 22:22 ` Jameson Graef Rollins
2011-11-11 0:17 ` Pieter Praet
2011-11-11 8:09 ` Tomi Ollila
2011-11-15 16:53 ` Pieter Praet
2011-11-11 0:17 ` [PATCH 1/2] debian: clean up Uploaders and Build-Depends fields in debian/control Jameson Graef Rollins
2011-11-11 0:17 ` [PATCH 2/2] debian: update build dependency on dtach instead of screen Jameson Graef Rollins
2011-11-12 4:27 ` David Bremner
2011-11-12 4:27 ` [PATCH 1/2] debian: clean up Uploaders and Build-Depends fields in debian/control David Bremner
2011-11-11 8:41 ` [PATCH] test: use dtach(1) instead of screen(1) in emacs tests Dmitry Kurochkin
2011-11-11 11:29 ` Tomi Ollila
2011-11-11 16:02 ` Dmitry Kurochkin
2011-11-11 22:51 ` Jameson Graef Rollins
2011-11-11 20:48 ` Tomi Ollila
2011-11-11 21:06 ` Dmitry Kurochkin
2011-11-11 21:15 ` Tomi Ollila
2011-11-11 21:33 ` Tomi Ollila
2011-11-12 4:26 ` David Bremner
2011-11-11 20:49 ` Tomi Ollila [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yf639due669.fsf@taco2.nixu.fi \
--to=tomi.ollila@iki.fi \
--cc=jrollins@finestructure.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).