1 Return-Path: <schnouki@schnouki.net>
\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 78C1C429E21
\r
6 for <notmuch@notmuchmail.org>; Mon, 3 Oct 2011 09:48:49 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5
\r
13 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]
\r
15 Received: from olra.theworths.org ([127.0.0.1])
\r
16 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
17 with ESMTP id YlWU2EAbLnzW for <notmuch@notmuchmail.org>;
\r
18 Mon, 3 Oct 2011 09:48:48 -0700 (PDT)
\r
19 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])
\r
20 by olra.theworths.org (Postfix) with ESMTP id A12D1429E29
\r
21 for <notmuch@notmuchmail.org>; Mon, 3 Oct 2011 09:48:45 -0700 (PDT)
\r
22 Received: from localhost.localdomain (thor.loria.fr [152.81.12.250])
\r
23 by ks3536.kimsufi.com (Postfix) with ESMTPSA id 3EA986A06B4;
\r
24 Mon, 3 Oct 2011 18:48:44 +0200 (CEST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;
\r
26 s=key-schnouki; t=1317660524;
\r
27 bh=X+Q6BT3OrKQc6B9LlF8eovfLrx8ierHb3GZgfye6X24=;
\r
28 h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
\r
29 In-Reply-To:References;
\r
30 b=SDZGkTArTRpCghBjpmrkxVNTncRxZVxQT2yZ8JdXqE8G+ZmTmi277fEcn0hyTb8wR
\r
31 5SNl9efoZ0GxEUdIOEBdeJv140XB7RuUpVB6NPDDFagNrlNl6HvgaWSdDYew1Quw9N
\r
32 oNWIdaQ7o56l3iWssweYe9zMKtaufwqGWfZfQBg4=
\r
33 From: Thomas Jost <schnouki@schnouki.net>
\r
34 To: notmuch@notmuchmail.org
\r
35 Subject: [PATCH 06/13] test: run emacs inside screen
\r
36 Date: Mon, 3 Oct 2011 18:47:20 +0200
\r
37 Message-Id: <1317660447-27520-7-git-send-email-schnouki@schnouki.net>
\r
38 X-Mailer: git-send-email 1.7.6.4
\r
39 In-Reply-To: <1317660447-27520-1-git-send-email-schnouki@schnouki.net>
\r
40 References: <1317660447-27520-1-git-send-email-schnouki@schnouki.net>
\r
41 In-Reply-To: <871uuuywtt.fsf@convex-new.cs.unb.ca>
\r
42 References: <871uuuywtt.fsf@convex-new.cs.unb.ca>
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Mon, 03 Oct 2011 16:48:49 -0000
\r
57 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
59 Before the change, emacs run in daemon mode without any visible
\r
60 buffers. Turns out that this affects emacs behavior in some
\r
61 cases. In particular, `window-end' function returns `point-max'
\r
62 instead of the last visible position. That makes it hard or
\r
63 impossible to implement some tests. The patch runs emacs in a
\r
64 detached screen(1) session. So that it works exactly as if it
\r
65 has a visible window.
\r
67 Note: screen terminates when emacs exits. So the patch does not
\r
68 introduce new "running processes left behind" issues.
\r
70 test/test-lib.sh | 16 ++++++++++++----
\r
71 1 files changed, 12 insertions(+), 4 deletions(-)
\r
73 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
74 index 8e16a7e..f9fd73e 100755
\r
75 --- a/test/test-lib.sh
\r
76 +++ b/test/test-lib.sh
\r
77 @@ -852,14 +852,22 @@ EOF
\r
80 if [ -z "$EMACS_SERVER" ]; then
\r
81 + # start a detached screen session with an emacs server
\r
82 + which screen &>/dev/null || return
\r
83 EMACS_SERVER="notmuch-test-suite-$$"
\r
84 - "$TMP_DIRECTORY/run_emacs" \
\r
86 + screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \
\r
87 + --no-window-system \
\r
88 --eval "(setq server-name \"$EMACS_SERVER\")" \
\r
89 + --eval '(server-start)' \
\r
90 --eval "(orphan-watchdog $$)" || return
\r
91 + # wait until the emacs server is up
\r
92 + until test_emacs '()' 2>/dev/null; do
\r
96 + if [ "$EMACS_SERVER" ]; then
\r
97 + emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"
\r
100 - emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"
\r