1 Return-Path: <tomi.ollila@nixu.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id DE764429E27
\r
6 for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 13:34:07 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 4RRIlMAuoF6U for <notmuch@notmuchmail.org>;
\r
16 Fri, 11 Nov 2011 13:34:07 -0800 (PST)
\r
17 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 38461429E25
\r
21 for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 13:34:07 -0800 (PST)
\r
22 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])
\r
23 by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id
\r
24 pABLXwtg017050; Fri, 11 Nov 2011 23:33:58 +0200
\r
25 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
26 To: Tomi Ollila <tomi.ollila@iki.fi>,
\r
27 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>,
\r
28 Notmuch Mail <notmuch@notmuchmail.org>
\r
29 Subject: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests
\r
30 In-Reply-To: <yf6y5vmcqeh.fsf@taco2.nixu.fi>
\r
31 References: <yf6mxc3ab4t.fsf@taco2.nixu.fi>
\r
32 <1320963737-1666-1-git-send-email-jrollins@finestructure.net>
\r
33 <yf64nyae67m.fsf@taco2.nixu.fi> <87fwhu2wtb.fsf@gmail.com>
\r
34 <yf6y5vmcqeh.fsf@taco2.nixu.fi>
\r
35 User-Agent: Notmuch/0.9+23~g556c5fa (http://notmuchmail.org) Emacs/23.3.1
\r
37 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
38 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
39 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
40 Date: Fri, 11 Nov 2011 23:33:58 +0200
\r
41 Message-ID: <yf6vcqqcpix.fsf@taco2.nixu.fi>
\r
43 Content-Type: text/plain; charset=us-ascii
\r
44 X-BeenThere: notmuch@notmuchmail.org
\r
45 X-Mailman-Version: 2.1.13
\r
47 List-Id: "Use and development of the notmuch mail system."
\r
48 <notmuch.notmuchmail.org>
\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
52 List-Post: <mailto:notmuch@notmuchmail.org>
\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
55 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
56 X-List-Received-Date: Fri, 11 Nov 2011 21:34:08 -0000
\r
58 dtach is simpler than screen and is not setuid/setgid program so
\r
59 TMPDIR does not get cleared by dynamic loader when executed
\r
62 The 2 Fixes based Dmitry's comments + Jameson's one too.
\r
64 test/test-lib.sh | 19 ++++++++++---------
\r
65 1 files changed, 10 insertions(+), 9 deletions(-)
\r
67 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
68 index c81c709..d88548b 100755
\r
69 --- a/test/test-lib.sh
\r
70 +++ b/test/test-lib.sh
\r
71 @@ -39,7 +39,7 @@ done,*)
\r
75 -# Keep the original TERM for say_color
\r
76 +# Keep the original TERM for say_color and test_emacs
\r
79 # For repeatability, reset the environment to known value.
\r
80 @@ -50,8 +50,6 @@ TZ=UTC
\r
82 export LANG LC_ALL PAGER TERM TZ
\r
83 GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}
\r
84 -export SCREENRC=/dev/null
\r
85 -export SYSSCREENRC=/dev/null
\r
87 # Protect ourselves from common misconfiguration to export
\r
88 # CDPATH into the environment
\r
89 @@ -843,12 +841,15 @@ EOF
\r
91 if [ -z "$EMACS_SERVER" ]; then
\r
92 EMACS_SERVER="notmuch-test-suite-$$"
\r
93 - # start a detached screen session with an emacs server
\r
94 - screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \
\r
95 - --no-window-system \
\r
96 - --eval "(setq server-name \"$EMACS_SERVER\")" \
\r
97 - --eval '(server-start)' \
\r
98 - --eval "(orphan-watchdog $$)" || return
\r
99 + # start a detached session with an emacs server
\r
100 + # user's TERM is given to dtach which assumes a minimally
\r
101 + # VT100-compatible terminal -- and emacs inherits that
\r
102 + TERM=$ORIGINAL_TERM dtach -n "$TMP_DIRECTORY/emacs-dtach-socket.$$" \
\r
103 + sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \
\r
104 + --no-window-system \
\r
105 + --eval '(setq server-name \"$EMACS_SERVER\")' \
\r
106 + --eval '(server-start)' \
\r
107 + --eval '(orphan-watchdog $$)'" || return
\r
108 # wait until the emacs server is up
\r
109 until test_emacs '()' 2>/dev/null; do
\r