1 Return-Path: <amdragon@mit.edu>
\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 491E2431FC4
\r
6 for <notmuch@notmuchmail.org>; Wed, 4 Dec 2013 08:19:06 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 UgQ5SofP4Zj8 for <notmuch@notmuchmail.org>;
\r
16 Wed, 4 Dec 2013 08:18:58 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (dmz-mailsec-scanner-2.mit.edu
\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 41ED9431FC2
\r
22 for <notmuch@notmuchmail.org>; Wed, 4 Dec 2013 08:18:58 -0800 (PST)
\r
23 X-AuditID: 1209190d-b7ef66d000000c40-6c-529f55ee8d92
\r
24 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
25 (using TLS with cipher AES256-SHA (256/256 bits))
\r
26 (Client did not present a certificate)
\r
27 by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP
\r
28 id 03.BC.03136.EE55F925; Wed, 4 Dec 2013 11:18:54 -0500 (EST)
\r
29 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
\r
30 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id rB4GIrsb008045;
\r
31 Wed, 4 Dec 2013 11:18:53 -0500
\r
32 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
33 (authenticated bits=0)
\r
34 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
35 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id rB4GIom7001226
\r
36 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
\r
37 Wed, 4 Dec 2013 11:18:52 -0500
\r
38 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)
\r
39 (envelope-from <amdragon@mit.edu>)
\r
40 id 1VoFA2-0000WV-7x; Wed, 04 Dec 2013 11:18:50 -0500
\r
41 From: Austin Clements <amdragon@MIT.EDU>
\r
42 To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
\r
43 Subject: Re: [PATCH 3/3] test: implement and document NOTMUCH_TEST_QUIET
\r
45 In-Reply-To: <1385399299-12936-3-git-send-email-tomi.ollila@iki.fi>
\r
46 References: <1384288868-23903-1-git-send-email-tomi.ollila@iki.fi>
\r
47 <1385399299-12936-1-git-send-email-tomi.ollila@iki.fi>
\r
48 <1385399299-12936-3-git-send-email-tomi.ollila@iki.fi>
\r
49 User-Agent: Notmuch/0.16+154~g96c0ce2 (http://notmuchmail.org) Emacs/23.4.1
\r
51 Date: Wed, 04 Dec 2013 11:18:49 -0500
\r
52 Message-ID: <87vbz437yu.fsf@awakening.csail.mit.edu>
\r
54 Content-Type: text/plain; charset=us-ascii
\r
55 X-Brightmail-Tracker:
\r
56 H4sIAAAAAAAAA+NgFnrDIsWRmVeSWpSXmKPExsUixG6nrvsudH6QwfVP5hbXb85ktnizch6r
\r
57 A5PH4a8LWTyerbrFHMAUxWWTkpqTWZZapG+XwJXxesdGxoKjShXP555namBskuli5OSQEDCR
\r
58 6LlzgB3CFpO4cG89WxcjF4eQwGwmiYlT+6CcDYwS3Wt+M0M4p5gk3i+7wAThLGGUaNrymBmk
\r
59 n01AQ2Lb/uWMILaIgK3ElSUnWbsYOTiYgea2zwsBCQsLhEss7TvOCBLmFHCWmPZcGG7BkW87
\r
60 mUBqRAXiJaYt3Ak2kkVAVWL99gcsIPW8QKf+2K4CEuYVEJQ4OfMJC4jNLKAlcePfS6YJjIKz
\r
61 kKRmIUktYGRaxSibklulm5uYmVOcmqxbnJyYl5dapGukl5tZopeaUrqJERSonJK8OxjfHVQ6
\r
62 xCjAwajEw5vAOS9IiDWxrLgy9xCjJAeTkiivYPD8ICG+pPyUyozE4oz4otKc1OJDjBIczEoi
\r
63 vJMDgXK8KYmVValF+TApaQ4WJXHemxz2QUIC6YklqdmpqQWpRTBZGQ4OJQneXyFAjYJFqemp
\r
64 FWmZOSUIaSYOTpDhPEDDZUNBhhcXJOYWZ6ZD5E8xKkqJ8x4GaRYASWSU5sH1whLJK0ZxoFeE
\r
65 ed+DVPEAkxBc9yugwUxAg5sfzAMZXJKIkJJqYOS5v6N94d75X/dNerTCuHVZ6LbiGde/F6/h
\r
66 dPkXI9BW7KCW+tg0V04n9vLtjpTJWitjjzXu59mygyvxxuTJC9ta9X6yqzTcO/16YcqWPKY+
\r
67 m2f/7oS0XT3960YR592afb/txA6WnvERjZ7YEHjlSOlLs1lf8hU2N9ae5Q/Mv7ra9+KKYr1M
\r
68 iZlKLMUZiYZazEXFiQDVWxqj/wIAAA==
\r
69 Cc: tomi.ollila@iki.fi
\r
70 X-BeenThere: notmuch@notmuchmail.org
\r
71 X-Mailman-Version: 2.1.13
\r
73 List-Id: "Use and development of the notmuch mail system."
\r
74 <notmuch.notmuchmail.org>
\r
75 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
76 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
77 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
78 List-Post: <mailto:notmuch@notmuchmail.org>
\r
79 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
80 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
81 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
82 X-List-Received-Date: Wed, 04 Dec 2013 16:19:06 -0000
\r
84 I just tried to use this and realized it hadn't been pushed yet.
\r
86 This series LGTM except one minor nit below and the fact that it
\r
87 introduces a lot of tab-indented code in sections of test-lib.sh that
\r
88 appear to be space-indented. Given that test-lib.sh is already a mess
\r
89 of indentation styles, I don't know if we care, but it would be nice if
\r
90 its entropy were at least non-increasing.
\r
92 On Mon, 25 Nov 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:
\r
93 > When NOTMUCH_TEST_QUIET environment variable is set to non-null value
\r
94 > messages when new test script starts and when test PASSes are disabled.
\r
95 > This eases picking the cases when tests FAIL (as those are still printed).
\r
97 > test/README | 8 ++++++++
\r
98 > test/basic | 4 ++--
\r
99 > test/test-lib.sh | 11 ++++++++++-
\r
100 > 3 files changed, 20 insertions(+), 3 deletions(-)
\r
102 > diff --git a/test/README b/test/README
\r
103 > index d12cff2..79a9b1b 100644
\r
104 > --- a/test/README
\r
105 > +++ b/test/README
\r
106 > @@ -74,10 +74,18 @@ the tests in one of the following ways.
\r
108 > TEST_EMACS=my-special-emacs TEST_EMACSCLIENT=my-emacsclient make test
\r
109 > TEST_EMACS=my-special-emacs TEST_EMACSCLIENT=my-emacsclient ./emacs
\r
110 > make test TEST_EMACS=my-special-emacs TEST_EMACSCLIENT=my-emacsclient
\r
115 > +Normally, when new script starts and when test PASSes you get a message
\r
116 > +printed on screen. This printing can be disabled by setting the
\r
117 > +NOTMUCH_TEST_QUIET variable to a non-null value. Message on test
\r
118 > +failures and skips are still printed.
\r
122 > If, for any reason, you need to skip one or more tests, you can do so
\r
123 > by setting the NOTMUCH_SKIP_TESTS variable to the name of one or more
\r
124 > sections of tests.
\r
125 > diff --git a/test/basic b/test/basic
\r
126 > index 64eb7d7..f7eed32 100755
\r
129 > @@ -72,16 +72,16 @@ suppress_diff_date() {
\r
130 > sed -e 's/\(.*\-\-\- test-verbose\.4\.\expected\).*/\1/' \
\r
131 > -e 's/\(.*\+\+\+ test-verbose\.4\.\output\).*/\1/'
\r
134 > test_begin_subtest "Ensure that test output is suppressed unless the test fails"
\r
135 > -output=$(cd $TEST_DIRECTORY; ./test-verbose 2>&1 | suppress_diff_date)
\r
136 > +output=$(cd $TEST_DIRECTORY; NOTMUCH_TEST_QUIET= ./test-verbose 2>&1 | suppress_diff_date)
\r
137 > expected=$(cat $EXPECTED/test-verbose-no | suppress_diff_date)
\r
138 > test_expect_equal "$output" "$expected"
\r
140 > test_begin_subtest "Ensure that -v does not suppress test output"
\r
141 > -output=$(cd $TEST_DIRECTORY; ./test-verbose -v 2>&1 | suppress_diff_date)
\r
142 > +output=$(cd $TEST_DIRECTORY; NOTMUCH_TEST_QUIET= ./test-verbose -v 2>&1 | suppress_diff_date)
\r
143 > expected=$(cat $EXPECTED/test-verbose-yes | suppress_diff_date)
\r
144 > # Do not include the results of test-verbose in totals
\r
145 > rm $TEST_DIRECTORY/test-results/test-verbose
\r
146 > rm -r $TEST_DIRECTORY/tmp.test-verbose
\r
147 > test_expect_equal "$output" "$expected"
\r
148 > diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
149 > index 34e0db6..9d4a807 100644
\r
150 > --- a/test/test-lib.sh
\r
151 > +++ b/test/test-lib.sh
\r
152 > @@ -196,11 +196,14 @@ print_test_description ()
\r
153 > test -z "$test_description_printed" || return 0
\r
155 > echo $this_test: "Testing ${test_description}"
\r
156 > test_description_printed=1
\r
158 > -print_test_description
\r
159 > +if [ -z "$NOTMUCH_TEST_QUIET" ]
\r
161 > + print_test_description
\r
168 > @@ -715,20 +718,26 @@ test_ok_ () {
\r
169 > if test "$test_subtest_known_broken_" = "t"; then
\r
170 > test_known_broken_ok_
\r
173 > test_success=$(($test_success + 1))
\r
174 > + if test -n "$NOTMUCH_TEST_QUIET"; then
\r
177 > say_color pass "%-6s" "PASS"
\r
178 > echo " $test_subtest_name"
\r
181 > test_failure_ () {
\r
182 > if test "$test_subtest_known_broken_" = "t"; then
\r
183 > test_known_broken_failure_ "$@"
\r
186 > test_failure=$(($test_failure + 1))
\r
187 > + if test -n "$NOTMUCH_TEST_QUIET"; then
\r
189 Strictly speaking, this test isn't necessary, right?
\r
191 > + print_test_description
\r
193 > test_failure_message_ "FAIL" "$test_subtest_name" "$@"
\r
194 > test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }
\r
201 > _______________________________________________
\r
202 > notmuch mailing list
\r
203 > notmuch@notmuchmail.org
\r
204 > http://notmuchmail.org/mailman/listinfo/notmuch
\r