Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 66 / c453b865cceffb9526638dd153e897cae84b73
1 Return-Path: <bremner@tethera.net>\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 DA1FE431FC7\r
6         for <notmuch@notmuchmail.org>; Sat,  8 Mar 2014 13:20:16 -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 8wm6Zf+GkkXX for <notmuch@notmuchmail.org>;\r
16         Sat,  8 Mar 2014 13:20:09 -0800 (PST)\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 59C52431FB6\r
21         for <notmuch@notmuchmail.org>; Sat,  8 Mar 2014 13:20:09 -0800 (PST)\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
23         (envelope-from <bremner@tethera.net>) id 1WMOf8-00057h-AK\r
24         for notmuch@notmuchmail.org; Sat, 08 Mar 2014 17:20:06 -0400\r
25 Received: (nullmailer pid 28523 invoked by uid 1000); Sat, 08 Mar 2014\r
26         21:20:02 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: v3 of boolean folder: patches\r
30 Date: Sat,  8 Mar 2014 17:19:30 -0400\r
31 Message-Id: <1394313585-28422-1-git-send-email-david@tethera.net>\r
32 X-Mailer: git-send-email 1.8.5.3\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.13\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37         <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
39         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Sat, 08 Mar 2014 21:20:17 -0000\r
46 \r
47 This is a followup to \r
48 \r
49      id:cover.1393105055.git.jani@nikula.org\r
50 \r
51 The first 11 patches are very close to that series; in the last 4 I\r
52 have added some minimalist infrastructure to download and verify\r
53 pre-built test databases.\r
54 \r
55 I decided that the benefits of being to really apply and test the\r
56 patch series outweighed the fact that one of patchs is about\r
57 150K. Apologies to those of you on GSM modems and the like.\r
58 \r
59 Interdiff follows \r
60 \r
61 diff --git a/Makefile b/Makefile\r
62 index 0428160..97084b1 100644\r
63 --- a/Makefile\r
64 +++ b/Makefile\r
65 @@ -5,7 +5,8 @@ all:\r
66  # List all subdirectories here. Each contains its own Makefile.local.\r
67  # Use of '=', without '+=', seems to be required for out-of-tree\r
68  # builds to work.\r
69 -subdirs = compat completion emacs lib man parse-time-string performance-test util test\r
70 +subdirs = compat completion emacs lib man parse-time-string performance-test util test \\r
71 +       test/test-databases\r
72  \r
73  # We make all targets depend on the Makefiles themselves.\r
74  global_deps = Makefile Makefile.config Makefile.local \\r
75 diff --git a/devel/gen-testdb.sh b/devel/gen-testdb.sh\r
76 index c291dff..621b31e 100755\r
77 --- a/devel/gen-testdb.sh\r
78 +++ b/devel/gen-testdb.sh\r
79 @@ -81,6 +81,10 @@ shift `expr $OPTIND - 1`\r
80  \r
81  . ./test-lib.sh\r
82  \r
83 +SHORT_CORPUS=$(basename ${CORPUS:-database})\r
84 +DBNAME=${SHORT_CORPUS}${SUFFIX}\r
85 +TARBALLNAME=${DBNAME}.tar.xz\r
86 +\r
87  CORPUS=${CORPUS:-${TEST_DIRECTORY}/corpus}\r
88  \r
89  test_expect_code 0 "notmuch version specified on the command line" \\r
90 @@ -112,13 +116,16 @@ cp -a ${CORPUS} ${MAIL_DIR}\r
91  test_expect_code 0 "index the corpus" \\r
92      "notmuch new"\r
93  \r
94 -# finally, wrap the resulting mail store and database in a tarball\r
95 -DBNAME=database${SUFFIX}\r
96 +# wrap the resulting mail store and database in a tarball\r
97 +\r
98  cp -a ${MAIL_DIR} ${TMP_DIRECTORY}/${DBNAME}\r
99 -tar zcf ${TMP_DIRECTORY}/${DBNAME}.tar.gz -C ${TMP_DIRECTORY} ${DBNAME}\r
100 +tar Jcf ${TMP_DIRECTORY}/${TARBALLNAME} -C ${TMP_DIRECTORY} ${DBNAME}\r
101  mkdir -p  ${TEST_DIRECTORY}/test-databases\r
102 -cp -a ${TMP_DIRECTORY}/${DBNAME}.tar.gz ${TEST_DIRECTORY}/test-databases\r
103 -test_expect_code 0 "create the output tarball ${DBNAME}.tar.gz" \\r
104 -    "test -f ${TEST_DIRECTORY}/test-databases/${DBNAME}.tar.gz"\r
105 +cp -a ${TMP_DIRECTORY}/${TARBALLNAME} ${TEST_DIRECTORY}/test-databases\r
106 +test_expect_code 0 "create the output tarball ${TARBALLNAME}" \\r
107 +    "test -f ${TEST_DIRECTORY}/test-databases/${TARBALLNAME}"\r
108  \r
109 +# generate a checksum file\r
110 +test_expect_code 0 "compute checksum" \\r
111 +    "(cd ${TEST_DIRECTORY}/test-databases/ && sha256sum ${TARBALLNAME} > ${TARBALLNAME}.sha256)"\r
112  test_done\r
113 diff --git a/test/Makefile.local b/test/Makefile.local\r
114 index 99324ba..bfabd15 100644\r
115 --- a/test/Makefile.local\r
116 +++ b/test/Makefile.local\r
117 @@ -2,6 +2,8 @@\r
118  \r
119  dir := test\r
120  \r
121 +# save against changes in $(dir)\r
122 +test_src_dir := $(dir)\r
123  extra_cflags += -I.\r
124  \r
125  smtp_dummy_srcs =              \\r
126 @@ -44,12 +46,12 @@ TEST_BINARIES=$(dir)/arg-test \\r
127  \r
128  test-binaries: $(TEST_BINARIES)\r
129  \r
130 -test:  all test-binaries\r
131 -       @${dir}/notmuch-test $(OPTIONS)\r
132 +test:  all test-binaries fetch-test-databases\r
133 +       @${test_src_dir}/notmuch-test $(OPTIONS)\r
134  \r
135  check: test\r
136  \r
137  SRCS := $(SRCS) $(smtp_dummy_srcs)\r
138  CLEAN += $(TEST_BINARIES) $(addsuffix .o,$(TEST_BINARIES)) \\r
139          $(dir)/database-test.o \\r
140 -        $(dir)/corpus.mail $(dir)/test-results $(dir)/tmp.*\r
141 +        $(dir)/corpus.mail.* $(dir)/test-results $(dir)/tmp.*\r
142 diff --git a/test/README b/test/README\r
143 index 79a9b1b..81a1c82 100644\r
144 --- a/test/README\r
145 +++ b/test/README\r
146 @@ -64,6 +64,14 @@ The following command-line options are available when running tests:\r
147         Pointing this argument at a tmpfs filesystem can improve the\r
148         speed of the test suite for some users.\r
149  \r
150 +Certain tests require precomputed databases to complete. You can fetch these\r
151 +databases with\r
152 +\r
153 +       make download-test-databases\r
154 +\r
155 +If you do not download the test databases, the relevant tests will be\r
156 +skipped.\r
157 +\r
158  When invoking the test suite via "make test" any of the above options\r
159  can be specified as follows:\r
160  \r
161 diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh\r
162 index cf9914e..e1e8ac5 100755\r
163 --- a/test/T530-upgrade.sh\r
164 +++ b/test/T530-upgrade.sh\r
165 @@ -3,7 +3,19 @@ test_description="database upgrade"\r
166  \r
167  . ./test-lib.sh\r
168  \r
169 -tar zxf $TEST_DIRECTORY/test-databases/database-v1.tar.gz -C ${MAIL_DIR} --strip-components=1\r
170 +dbtarball=folders-v1.tar.xz\r
171 +\r
172 +# XXX: Accomplish the same with test lib helpers\r
173 +if [ ! -e ${TEST_DIRECTORY}/test-databases/${dbtarball} ]; then\r
174 +    test_subtest_missing_external_prereq_["${dbtarball} - fetch with 'make download-test-databases'"]=t\r
175 +fi\r
176 +\r
177 +test_expect_success \\r
178 +    'database checksum' \\r
179 +    '( cd $TEST_DIRECTORY/test-databases &&\r
180 +       sha256sum --quiet --check --status ${dbtarball}.sha256 )'\r
181 +\r
182 +tar xf $TEST_DIRECTORY/test-databases/${dbtarball} -C ${MAIL_DIR} --strip-components=1\r
183  \r
184  test_begin_subtest "folder: search does not work with old database version"\r
185  output=$(notmuch search folder:foo)\r
186 diff --git a/test/test-databases/.gitignore b/test/test-databases/.gitignore\r
187 new file mode 100644\r
188 index 0000000..b5624b7\r
189 --- /dev/null\r
190 +++ b/test/test-databases/.gitignore\r
191 @@ -0,0 +1 @@\r
192 +*.tar.xz\r
193 diff --git a/test/test-databases/Makefile b/test/test-databases/Makefile\r
194 new file mode 100644\r
195 index 0000000..b250a8b\r
196 --- /dev/null\r
197 +++ b/test/test-databases/Makefile\r
198 @@ -0,0 +1,7 @@\r
199 +# See Makefile.local for the list of files to be compiled in this\r
200 +# directory.\r
201 +all:\r
202 +       $(MAKE) -C ../.. all\r
203 +\r
204 +.DEFAULT:\r
205 +       $(MAKE) -C ../.. $@\r
206 diff --git a/test/test-databases/Makefile.local b/test/test-databases/Makefile.local\r
207 new file mode 100644\r
208 index 0000000..e777ada\r
209 --- /dev/null\r
210 +++ b/test/test-databases/Makefile.local\r
211 @@ -0,0 +1,14 @@\r
212 +# -*- makefile -*-\r
213 +\r
214 +TEST_DATABASE_MIRROR=http://notmuchmail.org/releases/test-databases\r
215 +\r
216 +dir := test/test-databases\r
217 +\r
218 +test_databases := $(dir)/folders-v1.tar.xz\r
219 +\r
220 +%.tar.xz:\r
221 +       wget -nv -O $@ ${TEST_DATABASE_MIRROR}/$(notdir $@);\r
222 +\r
223 +download-test-databases: ${test_databases}\r
224 +\r
225 +DISTCLEAN := $(DISTCLEAN) ${test_databases}\r
226 diff --git a/test/test-databases/README b/test/test-databases/README\r
227 deleted file mode 100644\r
228 index af5defe..0000000\r
229 --- a/test/test-databases/README\r
230 +++ /dev/null\r
231 @@ -1,5 +0,0 @@\r
232 -Notmuch test databases\r
233 -======================\r
234 -\r
235 -This directory contains pre-generated databases with their source\r
236 -corpus, chiefly for the purpose of testing database upgrade.\r
237 diff --git a/test/test-databases/database-v1.tar.gz b/test/test-databases/database-v1.tar.gz\r
238 deleted file mode 100644\r
239 index bb4df4d..0000000\r
240 Binary files a/test/test-databases/database-v1.tar.gz and /dev/null differ\r
241 diff --git a/test/test-databases/folders-v1.tar.xz.sha256 b/test/test-databases/folders-v1.tar.xz.sha256\r
242 new file mode 100644\r
243 index 0000000..01ad79d\r
244 --- /dev/null\r
245 +++ b/test/test-databases/folders-v1.tar.xz.sha256\r
246 @@ -0,0 +1 @@\r
247 +ace8a61216756b90a421e23d03910e1228bcb910e197c35e51e29f2cf57b37d9  folders-v1.tar.xz\r