1 Return-Path: <dmitry.kurochkin@gmail.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 174F7429E28
\r
6 for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 05:23:01 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id AxR0puQ31Alj for <notmuch@notmuchmail.org>;
\r
17 Thu, 17 Nov 2011 05:23:00 -0800 (PST)
\r
18 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com
\r
19 [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 42BCF429E27
\r
22 for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 05:23:00 -0800 (PST)
\r
23 Received: by bkaq10 with SMTP id q10so2131907bka.26
\r
24 for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 05:22:59 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
27 :mime-version:content-type;
\r
28 bh=AGeJ/BdZFM5VjNJ5Ur3WmLeY9xeEZWq9XMmkWv5SNaE=;
\r
29 b=oPphR0gaTUEIzoeBsvyrzh3vZyth8Y1eja/6cQ6ctIBHkTB+MIDn7JgP+CXAow0Jj9
\r
30 btMM9V9btEPSThoZwJVcgmfM/4bM+BYrXm1CjPxF0Ld3EcDh/57fghW7kcX1GQoLH5HY
\r
31 r2FuF1Jcii9EcXto+kn6PlB8ksHLWO3FjRTj0=
\r
32 Received: by 10.205.120.145 with SMTP id fy17mr22955868bkc.124.1321536178717;
\r
33 Thu, 17 Nov 2011 05:22:58 -0800 (PST)
\r
34 Received: from localhost ([91.144.186.21])
\r
35 by mx.google.com with ESMTPS id j16sm3850622bkv.14.2011.11.17.05.22.56
\r
36 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Thu, 17 Nov 2011 05:22:57 -0800 (PST)
\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
39 To: Tomi Ollila <tomi.ollila@iki.fi>,
\r
40 Jameson Graef Rollins <jrollins@finestructure.net>, notmuch@notmuchmail.org
\r
41 Subject: Re: [PATCH 0/9] test: (hopefully) better test prerequisites
\r
42 In-Reply-To: <yf64ny3gcu4.fsf@taco2.nixu.fi>
\r
43 References: <1321494986-18998-1-git-send-email-dmitry.kurochkin@gmail.com>
\r
44 <874ny36rhc.fsf@servo.finestructure.net>
\r
45 <yf64ny3gcu4.fsf@taco2.nixu.fi>
\r
46 User-Agent: Notmuch/0.10_rc1+9~g8270095 (http://notmuchmail.org) Emacs/23.3.1
\r
47 (x86_64-pc-linux-gnu)
\r
48 Date: Thu, 17 Nov 2011 17:22:41 +0400
\r
49 Message-ID: <8739dmopcu.fsf@gmail.com>
\r
51 Content-Type: text/plain; charset=us-ascii
\r
52 X-BeenThere: notmuch@notmuchmail.org
\r
53 X-Mailman-Version: 2.1.13
\r
55 List-Id: "Use and development of the notmuch mail system."
\r
56 <notmuch.notmuchmail.org>
\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
58 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
60 List-Post: <mailto:notmuch@notmuchmail.org>
\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
64 X-List-Received-Date: Thu, 17 Nov 2011 13:23:01 -0000
\r
68 On Thu, 17 Nov 2011 14:20:19 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
\r
69 > On Thu, 17 Nov 2011 01:14:07 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
\r
71 > > However, when I tried to test the tests with the patch applied I ran
\r
72 > > into one problem. If I try to run the test suite with dtach
\r
73 > > uninstalled, it looks like I'm experiencing a hang on
\r
74 > > emacs_deliver_message call. I wonder if either emacs_deliver_message or
\r
75 > > test_emacs is not doing the right thing in the case of no dtach. I
\r
76 > > think emacs_deliver_message should somehow not require dtach, since it's
\r
77 > > not actually testing any display stuff, but because it's currently using
\r
78 > > test_emacs, it is somehow implicitly depending on it. Any thoughts on
\r
79 > > how to fix that?
\r
83 > mk_skip_test_emacs ()
\r
92 > mk_run_test_emacs ()
\r
95 > emacsclient --socket-name="$EMACS_SERVER" --eval "(progn $@)"
\r
102 > which dtach >/dev/null 2>&1 || { mk_skip_test_emacs; return; }
\r
103 > which emacs >/dev/null 2>&1 || { mk_skip_test_emacs; return; }
\r
104 > which emacsclient >/dev/null 2>&1 || { mk_skip_test_emacs; return; }
\r
106 > EMACS_SERVER="notmuch-test-suite-$$"
\r
107 > # start a detached session with an emacs server
\r
108 > # user's TERM is given to dtach which assumes a minimally
\r
109 > # VT100-compatible terminal -- and emacs inherits that
\r
110 > TERM=$ORIGINAL_TERM dtach -n "$TMP_DIRECTORY/emacs-dtach-socket.$$" \
\r
111 > sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \
\r
112 > --no-window-system \
\r
113 > --eval '(setq server-name \"$EMACS_SERVER\")' \
\r
114 > --eval '(server-start)' \
\r
115 > --eval '(orphan-watchdog $$)'" ||
\r
116 > { mk_skip_test_emacs; return; }
\r
117 > # wait until the emacs server is up
\r
118 > for _ in 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 20 1 2 3 4 5 6 7 8 9 30
\r
120 > if test_emacs '()' 2>/dev/null
\r
122 > mk_run_test_emacs
\r
126 > mk_skip_test_emacs
\r
129 > I.e. dynamically, at run-time, re-create test_emacs function...
\r
132 Could you please add some human-friendly description on what benefits
\r
133 the code above has? :)
\r
135 The only change I see (besides code refactoring) is 30sec timeout (BTW
\r
136 you can replace the list of numbers with "seq 30") instead of infinite
\r
137 wait loop. Which may be a good, but unrelated change.
\r
139 As for re-creating functions dynamically, I find the above code more
\r
140 complex than the existing one. I think the current code is more
\r
141 shell-style and easier to understand. Just IMHO.
\r