database error
[notmuch-archives.git] / 78 / 4f4c611dbb588ea4ed73d3dec5f0050861abd4
1 Return-Path: <dmitry.kurochkin@gmail.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 A93F7429E28\r
6         for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 12:16:25 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id JIoohAjUwry8 for <notmuch@notmuchmail.org>;\r
17         Tue, 13 Dec 2011 12:16:25 -0800 (PST)\r
18 Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com\r
19  [74.125.82.41])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  D9690429E27    for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 12:16:24 -0800\r
22  (PST)\r
23 Received: by wgbdt12 with SMTP id dt12so10224497wgb.2\r
24         for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 12:16:22 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
27         :message-id:mime-version:content-type;\r
28         bh=hePDVQWUqi68yIKqA1tdrwSrDRwrdP1jAe97itCZyNI=;\r
29         b=k5fGPRn5XW9sj9xdYjqVLXYhhCMAfOSXdDYlFPQZVduMRqRX/QtQKDXKg4dNrBuP1W\r
30         lrbbP8IRLWgkQpCEkG9t+NTpuO7J0oPmeuqOQOPbHvXOLWOxdA1tU/Zmhy8I796/+2sx\r
31         7KIap2AHVv0BTjX4wbPcVmxAukijNHsf8cwXQ=\r
32 Received: by 10.180.92.68 with SMTP id ck4mr14413986wib.27.1323807382039;\r
33         Tue, 13 Dec 2011 12:16:22 -0800 (PST)\r
34 Received: from localhost ([91.144.186.21])\r
35         by mx.google.com with ESMTPS id eg7sm242495wib.8.2011.12.13.12.16.19\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Tue, 13 Dec 2011 12:16:20 -0800 (PST)\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
40 Subject: Re: [PATCH] test: optionally print subtest number\r
41 In-Reply-To: <1323806207-31888-1-git-send-email-david@tethera.net>\r
42 References: <1323806207-31888-1-git-send-email-david@tethera.net>\r
43 User-Agent: Notmuch/0.10.2+96~g74e5ae5 (http://notmuchmail.org) Emacs/23.3.1\r
44         (x86_64-pc-linux-gnu)\r
45 Date: Wed, 14 Dec 2011 00:15:43 +0400\r
46 Message-ID: <87ty54ut1s.fsf@gmail.com>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=us-ascii\r
49 Cc: David Bremner <bremner@debian.org>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Tue, 13 Dec 2011 20:16:25 -0000\r
63 \r
64 On Tue, 13 Dec 2011 15:56:47 -0400, David Bremner <david@tethera.net> wrote:\r
65 > From: David Bremner <bremner@debian.org>\r
66\r
67 > The idea is that $test_count could be used in tests to label\r
68 > intermediate files. The output enabled by this patch (and --debug)\r
69 > helps figure out which OUTPUT.nn file belongs to which test in case\r
70 > several subtests write to OUTPUT.$test_count\r
71 > ---\r
72\r
73 > Is there something that depends on the test format? I find it pretty\r
74 > handy to have the subtest numbers, but I don't want to break some\r
75 > other tools. I followed the existing style of conditionally defining\r
76 > functions, but maybe someone with more bash-fu can improve that.\r
77\r
78 \r
79 Looks good to me.  Except for tabs taking too much space.  Perhaps the\r
80 following would be better?\r
81 \r
82         printf "%-4s" "[$(($test_count - 1))]"\r
83 \r
84 Regards,\r
85   Dmitry\r
86 \r
87 >  test/test-lib.sh |   12 ++++++++++++\r
88 >  1 files changed, 12 insertions(+), 0 deletions(-)\r
89\r
90 > diff --git a/test/test-lib.sh b/test/test-lib.sh\r
91 > index 6be93fe..aaaaf5c 100644\r
92 > --- a/test/test-lib.sh\r
93 > +++ b/test/test-lib.sh\r
94 > @@ -116,6 +116,16 @@ do\r
95 >       esac\r
96 >  done\r
97 >  \r
98 > +if test -n "$debug"; then\r
99 > +    print_subtest () {\r
100 > +     printf "\t[%d]\t" $(($test_count - 1))\r
101 > +    }\r
102 > +else\r
103 > +    print_subtest () {\r
104 > +     true\r
105 > +    }\r
106 > +fi\r
107 > +\r
108 >  if test -n "$color"; then\r
109 >       say_color () {\r
110 >               (\r
111 > @@ -132,6 +142,7 @@ if test -n "$color"; then\r
112 >               printf " "\r
113 >                  printf "$@"\r
114 >               tput sgr0\r
115 > +             print_subtest\r
116 >               )\r
117 >       }\r
118 >  else\r
119 > @@ -140,6 +151,7 @@ else\r
120 >               shift\r
121 >               printf " "\r
122 >                  printf "$@"\r
123 > +             print_subtest\r
124 >       }\r
125 >  fi\r
126 >  \r
127 > -- \r
128 > 1.7.5.4\r
129\r
130 > _______________________________________________\r
131 > notmuch mailing list\r
132 > notmuch@notmuchmail.org\r
133 > http://notmuchmail.org/mailman/listinfo/notmuch\r