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 8E15A429E25
\r
6 for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 12:48:23 -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 ToGncdtxlrne for <notmuch@notmuchmail.org>;
\r
16 Fri, 11 Nov 2011 12:48:22 -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 9BCE4431FB6
\r
21 for <notmuch@notmuchmail.org>; Fri, 11 Nov 2011 12:48:22 -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 pABKmDWT010355; Fri, 11 Nov 2011 22:48:15 +0200
\r
25 From: Tomi Ollila <too@iki.fi>
\r
26 To: Jameson Graef Rollins <jrollins@finestructure.net>,
\r
27 Notmuch Mail <notmuch@notmuchmail.org>
\r
28 Subject: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests
\r
29 In-Reply-To: <1320963737-1666-1-git-send-email-jrollins@finestructure.net>
\r
30 References: <yf6mxc3ab4t.fsf@taco2.nixu.fi>
\r
31 <1320963737-1666-1-git-send-email-jrollins@finestructure.net>
\r
32 User-Agent: Notmuch/0.9+23~g556c5fa (http://notmuchmail.org) Emacs/23.3.1
\r
34 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
35 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
36 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
37 Date: Fri, 11 Nov 2011 22:48:13 +0200
\r
38 Message-ID: <yf64nyae67m.fsf@taco2.nixu.fi>
\r
40 Content-Type: text/plain; charset=us-ascii
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Fri, 11 Nov 2011 20:48:23 -0000
\r
55 dtach is simpler than screen and is not setuid/setgid program so
\r
56 TMPDIR does not get cleared by dynamic loader when executed.
\r
59 Updated version after discussion with DmitryKurochkin and amdragon
\r
62 test/test-lib.sh | 25 +++++++++++++------------
\r
63 1 files changed, 13 insertions(+), 12 deletions(-)
\r
65 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
66 index c81c709..c232130 100755
\r
67 --- a/test/test-lib.sh
\r
68 +++ b/test/test-lib.sh
\r
69 @@ -39,7 +39,7 @@ done,*)
\r
73 -# Keep the original TERM for say_color
\r
74 +# Keep the original TERM for say_color and emacs tests
\r
77 # For repeatability, reset the environment to known value.
\r
78 @@ -843,12 +841,15 @@ EOF
\r
80 if [ -z "$EMACS_SERVER" ]; then
\r
81 EMACS_SERVER="notmuch-test-suite-$$"
\r
82 - # start a detached screen session with an emacs server
\r
83 - screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \
\r
84 - --no-window-system \
\r
85 - --eval "(setq server-name \"$EMACS_SERVER\")" \
\r
86 - --eval '(server-start)' \
\r
87 - --eval "(orphan-watchdog $$)" || return
\r
88 + # start a detached session with an emacs server
\r
89 + # user's TERM is given to dtach which assumes a minimally
\r
90 + # VT100-compatible terminal -- and emacs inherits that
\r
91 + TERM=$ORIGINAL_TERM dtach -n "$TMP_DIRECTORY/emacs-dtach-socket.$$" \
\r
92 + sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \
\r
93 + --no-window-system \
\r
94 + --eval '(setq server-name \"$EMACS_SERVER\")' \
\r
95 + --eval '(server-start)' \
\r
96 + --eval '(orphan-watchdog $$)'" || return
\r
97 # wait until the emacs server is up
\r
98 until test_emacs '()' 2>/dev/null; do
\r