[PATCH v2] cli: abstract dump file open from the dump command
[notmuch-archives.git] / f0 / 472d3e08458ae4468ac7129fa56e8de12f9df3
1 Return-Path: <m.walters@qmul.ac.uk>\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 DEEBB431FB6\r
6         for <notmuch@notmuchmail.org>; Fri,  6 Sep 2013 10:15:56 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 WjUWa41RTL0u for <notmuch@notmuchmail.org>;\r
17         Fri,  6 Sep 2013 10:15:52 -0700 (PDT)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 31718431FAE\r
22         for <notmuch@notmuchmail.org>; Fri,  6 Sep 2013 10:15:52 -0700 (PDT)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1VHzdJ-0001yB-UU; Fri, 06 Sep 2013 18:15:48 +0100\r
27 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
28         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
29         (envelope-from <m.walters@qmul.ac.uk>)\r
30         id 1VHzdJ-0003NX-LU; Fri, 06 Sep 2013 18:15:45 +0100\r
31 From: Mark Walters <markwalters1009@gmail.com>\r
32 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH 1/1] test: exit with nonzero value when not all tests\r
34         completed successfully\r
35 In-Reply-To: <1378479935-26312-1-git-send-email-tomi.ollila@iki.fi>\r
36 References: <1378479935-26312-1-git-send-email-tomi.ollila@iki.fi>\r
37 User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/23.4.1\r
38         (x86_64-pc-linux-gnu)\r
39 Date: Fri, 06 Sep 2013 18:15:44 +0100\r
40 Message-ID: <87d2olg9bz.fsf@qmul.ac.uk>\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain; charset=us-ascii\r
43 X-Sender-Host-Address: 93.97.24.31\r
44 X-QM-SPAM-Info: Sender has good ham record.  :)\r
45 X-QM-Body-MD5: f4844b81d397858306e470ad6d7b96c9 (of first 20000 bytes)\r
46 X-SpamAssassin-Score: 0.0\r
47 X-SpamAssassin-SpamBar: /\r
48 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
49         determine if it is\r
50         spam. We require at least 5.0 points to mark a message as spam.\r
51         This message scored 0.0 points. Summary of the scoring: \r
52         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
53         provider *      (markwalters1009[at]gmail.com)\r
54         *  0.0 AWL AWL: From: address is in the auto white-list\r
55 X-QM-Scan-Virus: ClamAV says the message is clean\r
56 Cc: tomi.ollila@iki.fi\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Fri, 06 Sep 2013 17:15:57 -0000\r
70 \r
71 \r
72 Hi\r
73 \r
74 On Fri, 06 Sep 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
75 > If any of the tests in our test system is not passing the execution\r
76 > of the test suite completes with nonzero exit value.\r
77 >\r
78 > It is better to rely on the exit value of the test system instead\r
79 > of some arbitrary strings in test output (or use both).\r
80 \r
81 This is obviously a good thing to do: my only query is whether having a\r
82 single line setting ev would be clearer. Something along the lines of\r
83 \r
84 if [ "$fixed" = "0 ] && [ "$failed" = "0 ] && [ "$broken" = "0 ] && ["$skipped" = "0 ]; then\r
85  ev=1\r
86 else \r
87  ev=0\r
88 fi\r
89 \r
90 But I am happy with it as is too. (I haven't actually tested it\r
91 currently).\r
92 \r
93 Best wishes\r
94 \r
95 Mark\r
96 \r
97 \r
98 > ---\r
99 >  test/aggregate-results.sh |    5 +++++\r
100 >  test/notmuch-test         |    3 +++\r
101 >  2 files changed, 8 insertions(+)\r
102 >\r
103 > diff --git a/test/aggregate-results.sh b/test/aggregate-results.sh\r
104 > index 732d6ca..5193d7f 100755\r
105 > --- a/test/aggregate-results.sh\r
106 > +++ b/test/aggregate-results.sh\r
107 > @@ -49,10 +49,12 @@ pluralize () {\r
108 >  }\r
109 >  \r
110 >  echo "Notmuch test suite complete."\r
111 > +ev=1\r
112 >  if [ "$fixed" = "0" ] && [ "$failed" = "0" ]; then\r
113 >      tests=$(pluralize "test" $total)\r
114 >      printf "All $total $tests "\r
115 >      if [ "$broken" = "0" ]; then\r
116 > +     ev=0\r
117 >       echo "passed."\r
118 >      else\r
119 >       failures=$(pluralize "failure" $broken)\r
120 > @@ -76,6 +78,9 @@ fi\r
121 >  \r
122 >  skipped=$(($total - $fixed - $success - $failed - $broken))\r
123 >  if [ "$skipped" != "0" ]; then\r
124 > +    ev=1\r
125 >      tests=$(pluralize "test" $skipped)\r
126 >      echo "$skipped $tests skipped."\r
127 >  fi\r
128 > +\r
129 > +exit $ev\r
130 > diff --git a/test/notmuch-test b/test/notmuch-test\r
131 > index 6db7979..aa28bb0 100755\r
132 > --- a/test/notmuch-test\r
133 > +++ b/test/notmuch-test\r
134 > @@ -97,6 +97,9 @@ trap - HUP INT TERM\r
135 >  \r
136 >  # Report results\r
137 >  ./aggregate-results.sh test-results/*\r
138 > +ev=$?\r
139 >  \r
140 >  # Clean up\r
141 >  rm -rf test-results corpus.mail\r
142 > +\r
143 > +exit $ev\r
144 > -- \r
145 > 1.7.10.4\r
146 >\r
147 > _______________________________________________\r
148 > notmuch mailing list\r
149 > notmuch@notmuchmail.org\r
150 > http://notmuchmail.org/mailman/listinfo/notmuch\r