Re: Possible addtions to notmuch new ?
[notmuch-archives.git] / a6 / 80642cd8f2fd769f294663275aa11631298abd
1 Return-Path: <tomi.ollila@nixu.com>\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 9AE11431FD0\r
6         for <notmuch@notmuchmail.org>; Sat, 17 Dec 2011 06:05:08 -0800 (PST)\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 K1V7ihFGKpdD for <notmuch@notmuchmail.org>;\r
16         Sat, 17 Dec 2011 06:05:08 -0800 (PST)\r
17 Received: from mail-gw3.nixu.fi (mail-gw3.nixu.fi [193.209.237.7])\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 D9D30431FB6\r
21         for <notmuch@notmuchmail.org>; Sat, 17 Dec 2011 06:05:07 -0800 (PST)\r
22 Received: from pps.filterd (mail-gw3 [127.0.0.1])\r
23         by mail-gw3.nixu.fi (8.14.4/8.14.4) with SMTP id pBHE4M0g032072;\r
24         Sat, 17 Dec 2011 16:04:55 +0200\r
25 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
26         by mail-gw3.nixu.fi with ESMTP id 114cs0u17u-1\r
27         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
28         Sat, 17 Dec 2011 16:04:54 +0200\r
29 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
30         by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id\r
31         pBHE4riR022831; Sat, 17 Dec 2011 16:04:54 +0200\r
32 From: Tomi Ollila <tomi.ollila@iki.fi>\r
33 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
34 Subject: Re: [PATCH] test: optionally print subtest number\r
35 In-Reply-To: <1323806207-31888-1-git-send-email-david@tethera.net>\r
36 References: <1323806207-31888-1-git-send-email-david@tethera.net>\r
37 User-Agent: Notmuch/0.10.2+93~g631d290 (http://notmuchmail.org) Emacs/23.3.1\r
38         (i686-pc-linux-gnu)\r
39 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
40         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
41         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
42 Date: Sat, 17 Dec 2011 16:04:53 +0200\r
43 Message-ID: <yf6r50347lm.fsf@taco2.nixu.fi>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.5.7110,\r
47  1.0.211,       0.0.0000        definitions=2011-12-17_01:2011-12-16, 2011-12-17,\r
48         1970-01-01 signatures=0\r
49 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0\r
50         ipscore=0 suspectscore=0\r
51         phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0\r
52         reason=mlx\r
53         scancount=1 engine=6.0.2-1012030000 definitions=main-1112170109\r
54 Cc: David Bremner <bremner@debian.org>\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Sat, 17 Dec 2011 14:05:08 -0000\r
68 \r
69 On Tue, 13 Dec 2011 15:56:47 -0400, David Bremner <david@tethera.net> wrote:\r
70 > From: David Bremner <bremner@debian.org>\r
71\r
72 > The idea is that $test_count could be used in tests to label\r
73 > intermediate files. The output enabled by this patch (and --debug)\r
74 > helps figure out which OUTPUT.nn file belongs to which test in case\r
75 > several subtests write to OUTPUT.$test_count\r
76 > ---\r
77\r
78 > Is there something that depends on the test format? I find it pretty\r
79 > handy to have the subtest numbers, but I don't want to break some\r
80 > other tools. I followed the existing style of conditionally defining\r
81 > functions, but maybe someone with more bash-fu can improve that.\r
82\r
83 >  test/test-lib.sh |   12 ++++++++++++\r
84 >  1 files changed, 12 insertions(+), 0 deletions(-)\r
85\r
86 > diff --git a/test/test-lib.sh b/test/test-lib.sh\r
87 > index 6be93fe..aaaaf5c 100644\r
88 > --- a/test/test-lib.sh\r
89 > +++ b/test/test-lib.sh\r
90 > @@ -116,6 +116,16 @@ do\r
91 >       esac\r
92 >  done\r
93 >  \r
94 > +if test -n "$debug"; then\r
95 > +    print_subtest () {\r
96 > +     printf "\t[%d]\t" $(($test_count - 1))\r
97 \r
98 Like this, as iterated by Dmitry & me\r
99 \r
100         printf " %-4s" "[$(($test_count - 1))]"\r
101 (or\r
102         printf " %-4s" "[$((test_count - 1))]"\r
103 )\r
104 \r
105 I think this is very useful feature; When searching reasons why\r
106 test failed the output files can be easily found as the test\r
107 number is show on screen. Also, when debugging problems with \r
108 users online in distant locations, passing around the test\r
109 number in any particular moment eases the interaction considerably.\r
110 \r
111 Tomi\r