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 20147431FD2
\r
6 for <notmuch@notmuchmail.org>; Wed, 4 Dec 2013 12:15:21 -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 yTSzDuYJ03tz for <notmuch@notmuchmail.org>;
\r
16 Wed, 4 Dec 2013 12:15:13 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.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 1F89D431FD0
\r
22 for <notmuch@notmuchmail.org>; Wed, 4 Dec 2013 12:15:13 -0800 (PST)
\r
23 X-AuditID: 1209190f-b7fb86d000000c36-e5-529f8d5014b2
\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-4.mit.edu (Symantec Messaging Gateway) with SMTP
\r
28 id C5.4B.03126.05D8F925; Wed, 4 Dec 2013 15:15:12 -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 rB4KFAb2009161;
\r
31 Wed, 4 Dec 2013 15:15:11 -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 rB4KF7u4012916
\r
36 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);
\r
37 Wed, 4 Dec 2013 15:15:10 -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 1VoIqh-0001pe-DK; Wed, 04 Dec 2013 15:15:07 -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: <87vbz437yu.fsf@awakening.csail.mit.edu>
\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 <87vbz437yu.fsf@awakening.csail.mit.edu>
\r
50 User-Agent: Notmuch/0.16+154~g96c0ce2 (http://notmuchmail.org) Emacs/23.4.1
\r
52 Date: Wed, 04 Dec 2013 15:15:07 -0500
\r
53 Message-ID: <87siu82x10.fsf@awakening.csail.mit.edu>
\r
55 Content-Type: text/plain; charset=us-ascii
\r
56 X-Brightmail-Tracker:
\r
57 H4sIAAAAAAAAA+NgFnrNIsWRmVeSWpSXmKPExsUixG6nrhvQOz/IYN02DovrN2cyW7xZOY/V
\r
58 gcnj8NeFLB7PVt1iDmCK4rJJSc3JLEst0rdL4Mp42bOcseCMcsXGewoNjF9kuhg5OSQETCRO
\r
59 3vvGDmGLSVy4t56ti5GLQ0hgNpPE/onrmCCcDYwSGxfvhcqcYpI48P88VGYJo8SKwxvA+tkE
\r
60 NCS27V/OCGKLCNhKXFlykrWLkYODGWhu+7wQkLCwQLjE0r7jYCWcAqYSvSvXsoDYQgI3GSX+
\r
61 rdQBsUUF4iWmLdzJDGKzCKhK/Nz2khlkDC/QqT9uxIOEeQUEJU7OfALWyiygJXHj30umCYyC
\r
62 s5CkZiFJLWBkWsUom5JbpZubmJlTnJqsW5ycmJeXWqRropebWaKXmlK6iREUppyS/DsYvx1U
\r
63 OsQowMGoxMPrkDI/SIg1say4MvcQoyQHk5Ior349UIgvKT+lMiOxOCO+qDQntfgQowQHs5II
\r
64 778aoBxvSmJlVWpRPkxKmoNFSZz3Jod9kJBAemJJanZqakFqEUxWhoNDSYI3sQeoUbAoNT21
\r
65 Ii0zpwQhzcTBCTKcB2j4qW6Q4cUFibnFmekQ+VOMilLivHUgzQIgiYzSPLheWBp5xSgO9Iow
\r
66 bytIFQ8wBcF1vwIazAQ0uPnBPJDBJYkIKakGxgBFwW/2wmu6nx59HbysIX2L0owvMw2udyR1
\r
67 R/mIN+YEb+mc1PVU7vbfQ1ffB+SnPKl7EmpSylNxY5kmd8KbuLPde89Pnm85Z9Gsx9nfedba
\r
68 8TQ5/aq03DV9i27lZjt90zeJySc/r5ew9ZlmdjF16q4TyYtki+IZxFa+UhKxdy77u+7zxris
\r
69 vUosxRmJhlrMRcWJAMA6etH+AgAA
\r
70 Cc: tomi.ollila@iki.fi
\r
71 X-BeenThere: notmuch@notmuchmail.org
\r
72 X-Mailman-Version: 2.1.13
\r
74 List-Id: "Use and development of the notmuch mail system."
\r
75 <notmuch.notmuchmail.org>
\r
76 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
77 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
78 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
79 List-Post: <mailto:notmuch@notmuchmail.org>
\r
80 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
81 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
82 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
83 X-List-Received-Date: Wed, 04 Dec 2013 20:15:21 -0000
\r
85 On Wed, 04 Dec 2013, Austin Clements <amdragon@MIT.EDU> wrote:
\r
86 > I just tried to use this and realized it hadn't been pushed yet.
\r
88 > This series LGTM except one minor nit below and the fact that it
\r
89 > introduces a lot of tab-indented code in sections of test-lib.sh that
\r
90 > appear to be space-indented. Given that test-lib.sh is already a mess
\r
91 > of indentation styles, I don't know if we care, but it would be nice if
\r
92 > its entropy were at least non-increasing.
\r
94 Ignore this comment. Apparently I was confused by show-mode
\r
95 transforming leading tabs into spaces.
\r
97 > On Mon, 25 Nov 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:
\r
98 >> When NOTMUCH_TEST_QUIET environment variable is set to non-null value
\r
99 >> messages when new test script starts and when test PASSes are disabled.
\r
100 >> This eases picking the cases when tests FAIL (as those are still printed).
\r
102 >> test/README | 8 ++++++++
\r
103 >> test/basic | 4 ++--
\r
104 >> test/test-lib.sh | 11 ++++++++++-
\r
105 >> 3 files changed, 20 insertions(+), 3 deletions(-)
\r
107 >> diff --git a/test/README b/test/README
\r
108 >> index d12cff2..79a9b1b 100644
\r
109 >> --- a/test/README
\r
110 >> +++ b/test/README
\r
111 >> @@ -74,10 +74,18 @@ the tests in one of the following ways.
\r
113 >> TEST_EMACS=my-special-emacs TEST_EMACSCLIENT=my-emacsclient make test
\r
114 >> TEST_EMACS=my-special-emacs TEST_EMACSCLIENT=my-emacsclient ./emacs
\r
115 >> make test TEST_EMACS=my-special-emacs TEST_EMACSCLIENT=my-emacsclient
\r
117 >> +Quiet Execution
\r
118 >> +---------------
\r
120 >> +Normally, when new script starts and when test PASSes you get a message
\r
121 >> +printed on screen. This printing can be disabled by setting the
\r
122 >> +NOTMUCH_TEST_QUIET variable to a non-null value. Message on test
\r
123 >> +failures and skips are still printed.
\r
127 >> If, for any reason, you need to skip one or more tests, you can do so
\r
128 >> by setting the NOTMUCH_SKIP_TESTS variable to the name of one or more
\r
129 >> sections of tests.
\r
130 >> diff --git a/test/basic b/test/basic
\r
131 >> index 64eb7d7..f7eed32 100755
\r
132 >> --- a/test/basic
\r
133 >> +++ b/test/basic
\r
134 >> @@ -72,16 +72,16 @@ suppress_diff_date() {
\r
135 >> sed -e 's/\(.*\-\-\- test-verbose\.4\.\expected\).*/\1/' \
\r
136 >> -e 's/\(.*\+\+\+ test-verbose\.4\.\output\).*/\1/'
\r
139 >> test_begin_subtest "Ensure that test output is suppressed unless the test fails"
\r
140 >> -output=$(cd $TEST_DIRECTORY; ./test-verbose 2>&1 | suppress_diff_date)
\r
141 >> +output=$(cd $TEST_DIRECTORY; NOTMUCH_TEST_QUIET= ./test-verbose 2>&1 | suppress_diff_date)
\r
142 >> expected=$(cat $EXPECTED/test-verbose-no | suppress_diff_date)
\r
143 >> test_expect_equal "$output" "$expected"
\r
145 >> test_begin_subtest "Ensure that -v does not suppress test output"
\r
146 >> -output=$(cd $TEST_DIRECTORY; ./test-verbose -v 2>&1 | suppress_diff_date)
\r
147 >> +output=$(cd $TEST_DIRECTORY; NOTMUCH_TEST_QUIET= ./test-verbose -v 2>&1 | suppress_diff_date)
\r
148 >> expected=$(cat $EXPECTED/test-verbose-yes | suppress_diff_date)
\r
149 >> # Do not include the results of test-verbose in totals
\r
150 >> rm $TEST_DIRECTORY/test-results/test-verbose
\r
151 >> rm -r $TEST_DIRECTORY/tmp.test-verbose
\r
152 >> test_expect_equal "$output" "$expected"
\r
153 >> diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
154 >> index 34e0db6..9d4a807 100644
\r
155 >> --- a/test/test-lib.sh
\r
156 >> +++ b/test/test-lib.sh
\r
157 >> @@ -196,11 +196,14 @@ print_test_description ()
\r
158 >> test -z "$test_description_printed" || return 0
\r
160 >> echo $this_test: "Testing ${test_description}"
\r
161 >> test_description_printed=1
\r
163 >> -print_test_description
\r
164 >> +if [ -z "$NOTMUCH_TEST_QUIET" ]
\r
166 >> + print_test_description
\r
173 >> @@ -715,20 +718,26 @@ test_ok_ () {
\r
174 >> if test "$test_subtest_known_broken_" = "t"; then
\r
175 >> test_known_broken_ok_
\r
178 >> test_success=$(($test_success + 1))
\r
179 >> + if test -n "$NOTMUCH_TEST_QUIET"; then
\r
182 >> say_color pass "%-6s" "PASS"
\r
183 >> echo " $test_subtest_name"
\r
186 >> test_failure_ () {
\r
187 >> if test "$test_subtest_known_broken_" = "t"; then
\r
188 >> test_known_broken_failure_ "$@"
\r
191 >> test_failure=$(($test_failure + 1))
\r
192 >> + if test -n "$NOTMUCH_TEST_QUIET"; then
\r
194 > Strictly speaking, this test isn't necessary, right?
\r
196 >> + print_test_description
\r
198 >> test_failure_message_ "FAIL" "$test_subtest_name" "$@"
\r
199 >> test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }
\r