Re: [PATCH v6 1/3] emacs: `notmuch-show-get-message-id': optionally return Message...
[notmuch-archives.git] / b4 / 53f17a4818809415a9353b1effc3545b7fc0a5
1 Return-Path: <pieter@praet.org>\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 67BDA429E45\r
6         for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 01:09:35 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 uyLhQouYVxv8 for <notmuch@notmuchmail.org>;\r
16         Sat, 14 Jan 2012 01:09:34 -0800 (PST)\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
18  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  9F1B3431FB6    for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 01:09:34 -0800\r
21  (PST)\r
22 Received: by wgbds11 with SMTP id ds11so3532902wgb.2\r
23         for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 01:09:33 -0800 (PST)\r
24 Received: by 10.180.107.134 with SMTP id hc6mr7243807wib.21.1326532173480;\r
25         Sat, 14 Jan 2012 01:09:33 -0800 (PST)\r
26 Received: from localhost ([109.131.75.86])\r
27         by mx.google.com with ESMTPS id 28sm14178111wby.3.2012.01.14.01.09.32\r
28         (version=TLSv1/SSLv3 cipher=OTHER);\r
29         Sat, 14 Jan 2012 01:09:32 -0800 (PST)\r
30 From: Pieter Praet <pieter@praet.org>\r
31 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
32 Subject: Re: [PATCH] test: don't bail out of `run_emacs' too early when\r
33         missing prereqs\r
34 In-Reply-To: <87zkdsg6ze.fsf@gmail.com>\r
35 References: <87d3aolu61.fsf@praet.org>\r
36         <1326388619-17422-1-git-send-email-pieter@praet.org>\r
37         <87zkdsg6ze.fsf@gmail.com>\r
38 User-Agent: Notmuch/0.10.2+115~gadd29f6 (http://notmuchmail.org) Emacs/23.3.1\r
39         (x86_64-unknown-linux-gnu)\r
40 Date: Sat, 14 Jan 2012 10:07:41 +0100\r
41 Message-ID: <87mx9qps82.fsf@praet.org>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain; charset=us-ascii\r
44 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Sat, 14 Jan 2012 09:09:35 -0000\r
58 \r
59 On Thu, 12 Jan 2012 21:34:29 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
60 > On Thu, 12 Jan 2012 18:16:59 +0100, Pieter Praet <pieter@praet.org> wrote:\r
61 > > When running the Emacs tests in verbose mode, only the first missing\r
62 > > prereq is reported because the `run_emacs' function is short-circuited\r
63 > > early:\r
64 > > \r
65 > >   #+begin_example\r
66 > >     emacs: Testing emacs interface\r
67 > >      missing prerequisites: [0]  emacs(1)\r
68 > >      skipping test: [0]  Basic notmuch-hello view in emacs\r
69 > >      SKIP   [0]  Basic notmuch-hello view in emacs\r
70 > >   #+end_example\r
71 > > \r
72 > > This can lead to situations reminiscent of "dependency hell", so instead\r
73 > > of returning based on each individual `test_require_external_prereq's exit\r
74 > > status, we now do so by checking $test_subtest_missing_external_prereqs_:\r
75 > > \r
76 > >   #+begin_example\r
77 > >     emacs: Testing emacs interface\r
78 > >      missing prerequisites: [0]  dtach(1) emacs(1) emacsclient(1)\r
79 > >      skipping test: [0]  Basic notmuch-hello view in emacs\r
80 > >      SKIP   [0]  Basic notmuch-hello view in emacs\r
81 > >   #+end_example\r
82 > > \r
83 > > Also add missing prereq for dtach(1).\r
84 > > \r
85 > > ---\r
86 > >  test/test-lib.sh |    6 ++++--\r
87 > >  1 files changed, 4 insertions(+), 2 deletions(-)\r
88 > > \r
89 > > diff --git a/test/test-lib.sh b/test/test-lib.sh\r
90 > > index 82767c0..6ec3882 100644\r
91 > > --- a/test/test-lib.sh\r
92 > > +++ b/test/test-lib.sh\r
93 > > @@ -907,8 +907,10 @@ EOF\r
94 > >  \r
95 > >  test_emacs () {\r
96 > >     # test dependencies beforehand to avoid the waiting loop below\r
97 > > -   test_require_external_prereq emacs || return\r
98 > > -   test_require_external_prereq emacsclient || return\r
99 > > +   test_require_external_prereq dtach\r
100 > > +   test_require_external_prereq emacs\r
101 > > +   test_require_external_prereq emacsclient\r
102 > > +   test -z "$test_subtest_missing_external_prereqs_" || return\r
103\r
104 > There may be other missing dependencies before test_emacs() is called\r
105 > and $test_subtest_missing_external_prereqs_ would not be blank.  [...]\r
106 \r
107 True, hadn't though of that...\r
108 \r
109 > [...] Also, I\r
110 > would like to keep the number of functions that use\r
111 > $test_subtest_missing_external_prereqs_ minimal.  [...]\r
112 \r
113 Could you elaborate on that?\r
114 \r
115 > [...] How about:\r
116\r
117 >   missing_dependencies=\r
118 >   test_require_... dtach || missing_dependencies=1\r
119 >   test_require_... emacs || missing_dependencies=1\r
120 >   ...\r
121 >   test -z "$missing_dependencies" || return\r
122\r
123 \r
124 Agreed!  Patch follows.\r
125 \r
126 > Regards,\r
127 >   Dmitry\r
128\r
129 > >  \r
130 > >     if [ -z "$EMACS_SERVER" ]; then\r
131 > >             server_name="notmuch-test-suite-$$"\r
132 > > -- \r
133 > > 1.7.8.1\r
134 > > \r
135 \r
136 \r
137 Peace\r
138 \r
139 -- \r
140 Pieter\r