Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 3c / a4abdb898a148226514197596cb3a6bf587ded
1 Return-Path: <too@guru-group.fi>\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 51757431FBC\r
6         for <notmuch@notmuchmail.org>; Sun,  8 Sep 2013 08:53:45 -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: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 HabxIQnpw6mA for <notmuch@notmuchmail.org>;\r
16         Sun,  8 Sep 2013 08:53:38 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id AC749431FAE\r
19         for <notmuch@notmuchmail.org>; Sun,  8 Sep 2013 08:53:38 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 85213100093; Sun,  8 Sep 2013 18:53:32 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH v2] test: exit with nonzero value when not all tests completed\r
25         successfully\r
26 Date: Sun,  8 Sep 2013 18:53:30 +0300\r
27 Message-Id: <1378655610-21497-1-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.8.0\r
29 Cc: tomi.ollila@iki.fi\r
30 X-BeenThere: notmuch@notmuchmail.org\r
31 X-Mailman-Version: 2.1.13\r
32 Precedence: list\r
33 List-Id: "Use and development of the notmuch mail system."\r
34         <notmuch.notmuchmail.org>\r
35 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
36         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
37 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
38 List-Post: <mailto:notmuch@notmuchmail.org>\r
39 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
40 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
42 X-List-Received-Date: Sun, 08 Sep 2013 15:53:45 -0000\r
43 \r
44 If any of the tests in our test system is not passing the execution\r
45 of the test suite completes with nonzero exit value.\r
46 \r
47 It is better to rely on the exit value of the test system instead\r
48 of some arbitrary strings in test output (or use both).\r
49 ---\r
50 \r
51 This is v2 of id:1378479935-26312-1-git-send-email-tomi.ollila@iki.fi\r
52 thanks to Mark's observation in id:87d2olg9bz.fsf@qmul.ac.uk\r
53 which widened my thought region :D\r
54 \r
55 Tomi\r
56 \r
57  test/aggregate-results.sh | 9 +++++++++\r
58  test/notmuch-test         | 3 +++\r
59  2 files changed, 12 insertions(+)\r
60 \r
61 diff --git a/test/aggregate-results.sh b/test/aggregate-results.sh\r
62 index 732d6ca..b016edb 100755\r
63 --- a/test/aggregate-results.sh\r
64 +++ b/test/aggregate-results.sh\r
65 @@ -1,5 +1,7 @@\r
66  #!/usr/bin/env bash\r
67  \r
68 +set -eu\r
69 +\r
70  fixed=0\r
71  success=0\r
72  failed=0\r
73 @@ -79,3 +81,10 @@ if [ "$skipped" != "0" ]; then\r
74      tests=$(pluralize "test" $skipped)\r
75      echo "$skipped $tests skipped."\r
76  fi\r
77 +\r
78 +if [ $success -gt 0 -a $fixed -eq 0 -a $failed -eq 0 -a $skipped -eq 0 ]\r
79 +then\r
80 +    exit 0\r
81 +else\r
82 +    exit 1\r
83 +fi\r
84 diff --git a/test/notmuch-test b/test/notmuch-test\r
85 index 6db7979..aa28bb0 100755\r
86 --- a/test/notmuch-test\r
87 +++ b/test/notmuch-test\r
88 @@ -97,6 +97,9 @@ trap - HUP INT TERM\r
89  \r
90  # Report results\r
91  ./aggregate-results.sh test-results/*\r
92 +ev=$?\r
93  \r
94  # Clean up\r
95  rm -rf test-results corpus.mail\r
96 +\r
97 +exit $ev\r
98 -- \r
99 1.8.0\r
100 \r