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 0C537431FD0
\r
6 for <notmuch@notmuchmail.org>; Fri, 25 Nov 2011 02:09:42 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 XAj6ay55ig2m for <notmuch@notmuchmail.org>;
\r
16 Fri, 25 Nov 2011 02:09:41 -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 5280F431FB6
\r
21 for <notmuch@notmuchmail.org>; Fri, 25 Nov 2011 02:09:41 -0800 (PST)
\r
22 Received: by bkaq10 with SMTP id q10so4504822bka.26
\r
23 for <notmuch@notmuchmail.org>; Fri, 25 Nov 2011 02:09:40 -0800 (PST)
\r
24 Received: by 10.204.130.90 with SMTP id r26mr33785774bks.46.1322215779221;
\r
25 Fri, 25 Nov 2011 02:09:39 -0800 (PST)
\r
26 Received: from localhost (abtw56.neoplus.adsl.tpnet.pl. [83.8.168.56])
\r
27 by mx.google.com with ESMTPS id jf4sm12751825bkc.5.2011.11.25.02.09.37
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Fri, 25 Nov 2011 02:09:38 -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
34 Date: Fri, 25 Nov 2011 11:09:28 +0100
\r
35 Message-Id: <1322215768-4883-1-git-send-email-aidecoe@aidecoe.name>
\r
36 X-Mailer: git-send-email 1.7.8.rc3
\r
37 In-Reply-To: <1322215147-sup-1990@ittemni>
\r
38 References: <1322215147-sup-1990@ittemni>
\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
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: Fri, 25 Nov 2011 10:09:42 -0000
\r
54 If symbol-test is built in symbol-hiding with hardcoded g++ invokation, it's
\r
55 not so easy to pass $(srcdir) which is required to find notmuch.h when srcdir
\r
56 and builddir are separate directories.
\r
58 Fixed warnings in symbol-test.cc, btw.
\r
60 test/.gitignore | 1 +
\r
61 test/Makefile.local | 5 ++++-
\r
63 test/symbol-hiding | 3 +--
\r
64 test/symbol-test.cc | 9 ++++-----
\r
65 5 files changed, 11 insertions(+), 9 deletions(-)
\r
67 diff --git a/test/.gitignore b/test/.gitignore
\r
68 index 9e97052..7e30e8d 100644
\r
69 --- a/test/.gitignore
\r
70 +++ b/test/.gitignore
\r
77 diff --git a/test/Makefile.local b/test/Makefile.local
\r
78 index 8eb0433..a672fd3 100644
\r
79 --- a/test/Makefile.local
\r
80 +++ b/test/Makefile.local
\r
81 @@ -11,8 +11,11 @@ smtp_dummy_modules = $(smtp_dummy_srcs:.c=.o)
\r
82 $(dir)/smtp-dummy: $(smtp_dummy_modules)
\r
83 $(call quiet,CC) $^ -o $@
\r
85 +$(dir)/symbol-test: $(dir)/symbol-test.o
\r
86 + $(call quiet,CC) $^ -o $@ -Llib -lnotmuch -lxapian
\r
89 -test: all $(dir)/smtp-dummy
\r
90 +test: all $(dir)/smtp-dummy $(dir)/symbol-test
\r
91 @${dir}/notmuch-test $(OPTIONS)
\r
94 diff --git a/test/basic b/test/basic
\r
95 index 38db2ba..5463bf8 100755
\r
98 @@ -56,7 +56,7 @@ tests_in_suite=$(for i in $TESTS; do echo $i; done | sort)
\r
99 available=$(ls -1 $TEST_DIRECTORY/ | \
\r
100 sed -r -e "/^(aggregate-results.sh|Makefile|Makefile.local|notmuch-test)/d" \
\r
101 -e "/^(README|test-lib.sh|test-lib.el|test-results|tmp.*|valgrind|corpus*)/d" \
\r
102 - -e "/^(emacs.expected-output|smtp-dummy|smtp-dummy.c|test-verbose|symbol-test.cc)/d" \
\r
103 + -e "/^(emacs.expected-output|smtp-dummy|smtp-dummy.c|test-verbose|symbol-test.cc|symbol-test|symbol-test.o)/d" \
\r
104 -e "/^(test.expected-output|.*~)/d" \
\r
105 -e "/^(gnupg-secret-key.asc)/d" \
\r
106 -e "/^(gnupg-secret-key.NOTE)/d" \
\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
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
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
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 diff --git a/test/symbol-test.cc b/test/symbol-test.cc
\r
127 index 1de06ea..bfbe38f 100644
\r
128 --- a/test/symbol-test.cc
\r
129 +++ b/test/symbol-test.cc
\r
132 #include <xapian.h>
\r
133 #include <notmuch.h>
\r
134 -main (int argc, char **argv){
\r
137 - notmuch_database_t *notmuch
\r
138 - = notmuch_database_open ("fakedb",
\r
139 - NOTMUCH_DATABASE_MODE_READ_ONLY);
\r
140 + //notmuch_database_t *notmuch =
\r
141 + notmuch_database_open ("fakedb", NOTMUCH_DATABASE_MODE_READ_ONLY);
\r
144 - (void)new Xapian::WritableDatabase ("./nonexistant", Xapian::DB_OPEN);
\r
145 + (void)new Xapian::WritableDatabase ("./nonexistant", Xapian::DB_OPEN);
\r
146 } catch (const Xapian::Error &error) {
\r
147 printf("caught %s\n",error.get_msg().c_str());
\r