1 Return-Path: <bremner@pivot.cs.unb.ca>
\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 CD991429E27
\r
6 for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 11:57:22 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 1UnhDM69u5ah for <notmuch@notmuchmail.org>;
\r
16 Tue, 13 Dec 2011 11:57:21 -0800 (PST)
\r
17 Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id EB6D4429E26
\r
21 for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 11:57:20 -0800 (PST)
\r
22 Received: from convex-new.cs.unb.ca ([131.202.13.154])
\r
23 by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id pBDJunAr029926;
\r
24 Tue, 13 Dec 2011 15:56:51 -0400
\r
25 Received: from bremner by convex-new.cs.unb.ca with local (Exim 4.72)
\r
26 (envelope-from <bremner@pivot.cs.unb.ca>)
\r
27 id 1RaYT3-0008JG-A6; Tue, 13 Dec 2011 15:56:49 -0400
\r
28 From: David Bremner <david@tethera.net>
\r
29 To: notmuch@notmuchmail.org
\r
30 Subject: [PATCH] test: optionally print subtest number
\r
31 Date: Tue, 13 Dec 2011 15:56:47 -0400
\r
32 Message-Id: <1323806207-31888-1-git-send-email-david@tethera.net>
\r
33 X-Mailer: git-send-email 1.7.5.4
\r
34 Cc: David Bremner <bremner@debian.org>
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.13
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Tue, 13 Dec 2011 19:57:22 -0000
\r
49 From: David Bremner <bremner@debian.org>
\r
51 The idea is that $test_count could be used in tests to label
\r
52 intermediate files. The output enabled by this patch (and --debug)
\r
53 helps figure out which OUTPUT.nn file belongs to which test in case
\r
54 several subtests write to OUTPUT.$test_count
\r
57 Is there something that depends on the test format? I find it pretty
\r
58 handy to have the subtest numbers, but I don't want to break some
\r
59 other tools. I followed the existing style of conditionally defining
\r
60 functions, but maybe someone with more bash-fu can improve that.
\r
62 test/test-lib.sh | 12 ++++++++++++
\r
63 1 files changed, 12 insertions(+), 0 deletions(-)
\r
65 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
66 index 6be93fe..aaaaf5c 100644
\r
67 --- a/test/test-lib.sh
\r
68 +++ b/test/test-lib.sh
\r
69 @@ -116,6 +116,16 @@ do
\r
73 +if test -n "$debug"; then
\r
74 + print_subtest () {
\r
75 + printf "\t[%d]\t" $(($test_count - 1))
\r
78 + print_subtest () {
\r
83 if test -n "$color"; then
\r
86 @@ -132,6 +142,7 @@ if test -n "$color"; then
\r
94 @@ -140,6 +151,7 @@ else
\r