Re: notmuch-search-toggle-order and notmuch-tree
[notmuch-archives.git] / 12 / feaed14bc96c9402f1b3f65182a176a9af35f3
1 Return-Path: <prvs=jrosenthal=7296245fb@jhu.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 906CF4196F0\r
6         for <notmuch@notmuchmail.org>; Fri, 30 Apr 2010 11:36:59 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.5\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.5 tagged_above=-999 required=5\r
12         tests=[BAYES_50=0.8, RCVD_IN_DNSWL_MED=-2.3] autolearn=ham\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 FmOG8Yi+n6+3 for <notmuch@notmuchmail.org>;\r
16         Fri, 30 Apr 2010 11:36:58 -0700 (PDT)\r
17 Received: from ipex2.johnshopkins.edu (ipex2.johnshopkins.edu [162.129.8.151])\r
18         by olra.theworths.org (Postfix) with ESMTP id C0D81431FC1\r
19         for <notmuch@notmuchmail.org>; Fri, 30 Apr 2010 11:36:58 -0700 (PDT)\r
20 X-IronPort-AV: E=Sophos;i="4.52,303,1270440000"; d="scan'208";a="326223148"\r
21 Received: from c-69-255-36-229.hsd1.md.comcast.net (HELO lucky)\r
22         ([69.255.36.229])\r
23         by ipex2.johnshopkins.edu with ESMTP/TLS/AES256-SHA;\r
24         30 Apr 2010 14:36:57 -0400\r
25 Received: from jkr by lucky with local (Exim 4.69)\r
26         (envelope-from <jrosenthal@jhu.edu>)\r
27         id 1O7v56-0004rI-91; Fri, 30 Apr 2010 14:36:56 -0400\r
28 From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
29 To: Notmuch developer list <notmuch@notmuchmail.org>\r
30 Subject: [PATCH] Modularize test suite\r
31 Date: Fri, 30 Apr 2010 14:36:56 -0400\r
32 Message-ID: <87sk6cdbxz.fsf@jhu.edu>\r
33 MIME-Version: 1.0\r
34 Content-Type: text/plain; charset=us-ascii\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\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: Fri, 30 Apr 2010 18:36:59 -0000\r
48 \r
49 Responding to this email is a patch to modularize the test suite. It\r
50 follows a relatively simple model, but it does seem like it will offer\r
51 some degree of flexibility. Plus, no relicensing is necessary.\r
52 \r
53 In short, tests are put in subdirs of test/tests, e.g.:\r
54 \r
55      test/tests/notmuch-new/\r
56      test/tests/notmuch-search/\r
57      test/tests/json/\r
58      ...\r
59 \r
60 "notmuch-test" (which is the same as "notmuch-test all") should work as\r
61 usual. But if you call "notmuch-test json", it will only the json tests.\r
62 \r
63 It will do this by running all of the files in the json subdir that have\r
64 an extension "*.test" or "*.setup" (all other files will be ignored). It\r
65 runs them in numerical order, which you can set by a numerical\r
66 prefix. So, for example, in test/tests/notmuch-reply:\r
67 \r
68          00001-notmuch-reply.setup\r
69          00100-basic-reply.test          \r
70          00200-multiple-recipients.test  \r
71          00300-reply-with-cc.test        \r
72          00400-reply-from-alternate-address.test\r
73          00500-support-for-reply-to.test\r
74          00600-unmunging-reply-to.test\r
75          99999-notmuch-reply.setup\r
76 \r
77 The basic numbering system is 00100, 00200, etc. to both allow a lot of\r
78 space to fit things in between, and to let the collection of tests\r
79 grow. \r
80 \r
81 00001-$(basename $(pwd)).setup and 99999-$(basename $(pwd)).setup are\r
82 reserved for setting up and cleaning up. This allows us to call\r
83 individual sets of tests without calling the entire suite in order to\r
84 get the environment that the tests expect.\r
85 \r
86 Note that if you add a new subdir collection of tests, you have to add\r
87 it to the $TEST_COLLECTIONS variable in notmuch-test. It doesn't run all\r
88 subdirs automatically, in case you want to test something out, or have a\r
89 subdir that only works in certain cases (imagine future tests of remote\r
90 setups).\r
91 \r
92 Sorry the patch is so large: there was a lot of back-and-forth, and it\r
93 was hard to break the patches down into coherent steps. Carl, if you'd\r
94 prefer, I could send you a more granular, but confusing, series of\r
95 patches.\r
96 \r
97 Best,\r
98 Jesse\r
99 \r
100 \r
101 \r
102 \r