[PATCH 8/9] cli: optionally restore message properties from dump file
[notmuch-archives.git] / b0 / 5364c83bcb7cdabe29e645091e957c076fa0d9
1 Return-Path: <aidecoe@aidecoe.name>\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 11369429E21\r
6         for <notmuch@notmuchmail.org>; Sat, 26 Nov 2011 13:14:27 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 92ckDAqyjCfX for <notmuch@notmuchmail.org>;\r
16         Sat, 26 Nov 2011 13:14:26 -0800 (PST)\r
17 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
18         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 44054431FB6\r
21         for <notmuch@notmuchmail.org>; Sat, 26 Nov 2011 13:14:26 -0800 (PST)\r
22 Received: by bkaq10 with SMTP id q10so6709479bka.26\r
23         for <notmuch@notmuchmail.org>; Sat, 26 Nov 2011 13:14:24 -0800 (PST)\r
24 Received: by 10.205.122.139 with SMTP id gg11mr38421276bkc.67.1322342064657;\r
25         Sat, 26 Nov 2011 13:14:24 -0800 (PST)\r
26 Received: from localhost (dhm251.neoplus.adsl.tpnet.pl. [83.23.194.251])\r
27         by mx.google.com with ESMTPS id j4sm33322341fae.3.2011.11.26.13.14.22\r
28         (version=TLSv1/SSLv3 cipher=OTHER);\r
29         Sat, 26 Nov 2011 13:14:23 -0800 (PST)\r
30 From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH] Build symbol-test with make instead of hardcoding in\r
33         symbol-hiding.\r
34 Date: Sat, 26 Nov 2011 22:14:20 +0100\r
35 Message-Id: <1322342060-967-1-git-send-email-aidecoe@aidecoe.name>\r
36 X-Mailer: git-send-email 1.7.8.rc3\r
37 In-Reply-To: <1322341843-sup-9963@raeviah>\r
38 References: <1322341843-sup-9963@raeviah>\r
39 Cc: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Sat, 26 Nov 2011 21:14:27 -0000\r
53 \r
54 If symbol-test is built in symbol-hiding with hardcoded g++ invokation,\r
55 it's not so easy to pass $(srcdir) which is required to find notmuch.h\r
56 when srcdir and builddir are separate directories.\r
57 ---\r
58  test/.gitignore     |    1 +\r
59  test/Makefile.local |    7 +++++--\r
60  test/basic          |    2 +-\r
61  test/symbol-hiding  |    3 +--\r
62  4 files changed, 8 insertions(+), 5 deletions(-)\r
63 \r
64 diff --git a/test/.gitignore b/test/.gitignore\r
65 index 9e97052..7e30e8d 100644\r
66 --- a/test/.gitignore\r
67 +++ b/test/.gitignore\r
68 @@ -1,4 +1,5 @@\r
69  test-results\r
70  corpus.mail\r
71  smtp-dummy\r
72 +symbol-test\r
73  tmp.*\r
74 diff --git a/test/Makefile.local b/test/Makefile.local\r
75 index 9b3308a..646779e 100644\r
76 --- a/test/Makefile.local\r
77 +++ b/test/Makefile.local\r
78 @@ -11,10 +11,13 @@ smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o)\r
79  $(dir)/smtp-dummy: $(smtp_dummy_modules)\r
80         $(call quiet,CC) $^ -o $@\r
81  \r
82 +$(dir)/symbol-test: $(dir)/symbol-test.o\r
83 +       $(call quiet,CC) $^ -o $@ -Llib -lnotmuch -lxapian\r
84 +\r
85  .PHONY: test check\r
86 -test:  all $(dir)/smtp-dummy\r
87 +test:  all $(dir)/smtp-dummy $(dir)/symbol-test\r
88         @${dir}/notmuch-test $(OPTIONS)\r
89  \r
90  check: test\r
91  \r
92 -CLEAN := $(CLEAN) $(dir)/smtp-dummy $(dir)/smtp-dummy.o\r
93 +CLEAN := $(CLEAN) $(dir)/smtp-dummy $(dir)/smtp-dummy.o $(dir)/symbol-test $(dir)/symbol-test.o\r
94 diff --git a/test/basic b/test/basic\r
95 index f258d1f..4edf831 100755\r
96 --- a/test/basic\r
97 +++ b/test/basic\r
98 @@ -54,7 +54,7 @@ test_begin_subtest 'Ensure that all available tests will be run by notmuch-test'\r
99  eval $(sed -n -e '/^TESTS="$/,/^"$/p' $TEST_DIRECTORY/notmuch-test)\r
100  tests_in_suite=$(for i in $TESTS; do echo $i; done | sort)\r
101  available=$(find "$TEST_DIRECTORY" -maxdepth 1 -type f -executable -printf '%f\n' | \\r
102 -    sed -r -e "/^(aggregate-results.sh|notmuch-test|smtp-dummy|test-verbose)$/d" | \\r
103 +    sed -r -e "/^(aggregate-results.sh|notmuch-test|smtp-dummy|test-verbose|symbol-test)$/d" | \\r
104      sort)\r
105  test_expect_equal "$tests_in_suite" "$available"\r
106  \r
107 diff --git a/test/symbol-hiding b/test/symbol-hiding\r
108 index d0b31ae..f67b653 100755\r
109 --- a/test/symbol-hiding\r
110 +++ b/test/symbol-hiding\r
111 @@ -12,13 +12,12 @@ test_description='exception symbol hiding'\r
112  . ./test-lib.sh\r
113  \r
114  run_test(){\r
115 -    result=$(LD_LIBRARY_PATH=$TEST_DIRECTORY/../lib ./symbol-test 2>&1)\r
116 +    result=$(LD_LIBRARY_PATH=$TEST_DIRECTORY/../lib $TEST_DIRECTORY/symbol-test 2>&1)\r
117  }\r
118  \r
119  output="A Xapian exception occurred opening database: Couldn't stat 'fakedb/.notmuch/xapian'\r
120  caught No chert database found at path \`./nonexistant'"\r
121  \r
122 -g++ -o symbol-test -I$TEST_DIRECTORY/../lib $TEST_DIRECTORY/symbol-test.cc -L$TEST_DIRECTORY/../lib -lnotmuch -lxapian\r
123  mkdir -p fakedb/.notmuch\r
124  test_expect_success 'running test' run_test\r
125  test_begin_subtest 'checking output'\r
126 -- \r
127 1.7.8.rc3\r
128 \r