root / tags / 1.0.8 / xapian-core / tests / Makefile.am

Revision 10633, 6.9 kB (checked in by olly, 8 months ago)

Backport change from trunk:
tests/Makefile.am: "make up" in tests now does "make" in the
top-level.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1## Process this file with automake to produce Makefile.in
2
3AUTOMAKE_OPTIONS = 1.5 subdir-objects
4
5# `make QUIET=' overrides `./configure --enable-quiet'.
6# `make QUIET=y' overrides `./configure' without `--enable-quiet'.
7LIBTOOL = @LIBTOOL@ $(QUIET:y=--quiet)
8
9INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/include \
10 -I$(top_builddir)/include -I$(srcdir)/harness
11
12TESTS_ENVIRONMENT = ./runtest
13
14.PHONY: check-none check-inmemory check-multi \
15        check-remote check-remoteprog check-remotetcp \
16        check-flint check-quartz up
17
18up:
19        cd .. && $(MAKE)
20
21check-none: apitest$(EXEEXT) \
22            internaltest$(EXEEXT) \
23            stemtest$(EXEEXT) \
24            queryparsertest$(EXEEXT) \
25            termgentest$(EXEEXT)
26        $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b none
27        $(TESTS_ENVIRONMENT) ./internaltest$(EXEEXT)
28        $(TESTS_ENVIRONMENT) ./stemtest$(EXEEXT)
29        $(TESTS_ENVIRONMENT) ./queryparsertest$(EXEEXT)
30        $(TESTS_ENVIRONMENT) ./termgentest$(EXEEXT)
31
32check-inmemory: apitest$(EXEEXT)
33        $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b inmemory
34
35check-multi: apitest$(EXEEXT)
36        $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b multi
37
38if BUILD_BACKEND_REMOTE
39check-remote: apitest$(EXEEXT)
40        $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remoteprog
41        $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remotetcp
42check-remoteprog: apitest$(EXEEXT)
43        $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remoteprog
44check-remotetcp: apitest$(EXEEXT)
45        $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b remotetcp
46endif
47
48if BUILD_BACKEND_FLINT
49check-flint: apitest$(EXEEXT)
50        $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b flint
51endif
52
53if BUILD_BACKEND_QUARTZ
54check-quartz: btreetest$(EXEEXT) quartztest$(EXEEXT) apitest$(EXEEXT)
55        $(TESTS_ENVIRONMENT) ./btreetest$(EXEEXT)
56        $(TESTS_ENVIRONMENT) ./quartztest$(EXEEXT)
57        $(TESTS_ENVIRONMENT) ./apitest$(EXEEXT) -b quartz
58
59quartz_check_programs = btreetest quartztest
60quartz_tests= btreetest$(EXEEXT) quartztest$(EXEEXT)
61
62# Only quartztest and btreetest need this, but if we put it in INCLUDES
63# then we can use the same objects for the testsuite harness for all
64# test programs.
65INCLUDES += -I$(top_srcdir)/backends/quartz
66endif
67
68## Test programs to be run
69TESTS = $(quartz_tests) \
70 apitest$(EXEEXT) internaltest$(EXEEXT) stemtest$(EXEEXT) \
71 queryparsertest$(EXEEXT) \
72 termgentest$(EXEEXT)
73
74## Programs to build
75check_PROGRAMS = $(quartz_check_programs) \
76 apitest internaltest stemtest queryparsertest termgentest
77
78# Make sure runtest is up to date before running tests
79check_SCRIPTS = runtest
80
81## Sources:
82
83noinst_HEADERS = apitest.h
84
85collated_apitest_sources = api_anydb.cc api_db.cc api_generated.cc api_nodb.cc \
86 api_posdb.cc api_sorting.cc api_transdb.cc api_unicode.cc api_wrdb.cc
87
88apitest_SOURCES = apitest.cc $(collated_apitest_sources) \
89 api_all.h api_collated.h $(testharness_sources)
90
91apitest_LDFLAGS = -no-install $(ldflags)
92apitest_LDADD = ../libgetopt.la ../libxapian.la
93
94stemtest_SOURCES = stemtest.cc $(testharness_sources)
95stemtest_LDFLAGS = -no-install $(ldflags)
96stemtest_LDADD = ../libgetopt.la ../libxapian.la
97
98internaltest_SOURCES = internaltest.cc $(testharness_sources)
99internaltest_LDFLAGS = -no-install $(ldflags)
100internaltest_LDADD = ../libgetopt.la ../libxapian.la
101
102btreetest_SOURCES = btreetest.cc $(testharness_sources)
103btreetest_LDFLAGS = -no-install $(ldflags)
104btreetest_LDADD = ../libgetopt.la ../libquartzcheck.la ../libxapian.la
105
106quartztest_SOURCES = quartztest.cc $(testharness_sources)
107quartztest_LDFLAGS = -no-install $(ldflags)
108quartztest_LDADD = ../libgetopt.la ../libxapian.la
109
110queryparsertest_SOURCES = queryparsertest.cc $(testharness_sources)
111queryparsertest_LDFLAGS = -no-install $(ldflags)
112queryparsertest_LDADD = ../libgetopt.la ../libxapian.la
113
114termgentest_SOURCES = termgentest.cc $(testharness_sources)
115termgentest_LDFLAGS = -no-install $(ldflags)
116termgentest_LDADD = ../libgetopt.la ../libxapian.la
117
118BUILT_SOURCES =
119
120if MAINTAINER_MODE
121BUILT_SOURCES += api_all.h api_collated.h $(collated_apitest_sources:.cc=.h) \
122 api_generated.cc
123CLEANFILES = api_all.h api_collated.h $(collated_apitest_sources:.cc=.h) \
124 api_generated.cc
125
126api_all.h api_collated.h $(collated_apitest_sources:.cc=.h): api_collated.stamp
127## Recover from the removal of $@.  A full explanation of these rules is in the
128## automake manual under the heading "Multiple Outputs".
129        @if test -f $@; then :; else \
130          trap 'rm -rf api_collated.lock api_collated.stamp' 1 2 13 15; \
131          if mkdir api_collated.lock 2>/dev/null; then \
132            rm -f api_collated.stamp; \
133            $(MAKE) $(AM_MAKEFLAGS) api_collated.stamp; \
134            rmdir api_collated.lock; \
135          else \
136            while test -d api_collated.lock; do sleep 1; done; \
137            test -f api_collated.stamp; exit $$?; \
138          fi; \
139        fi
140api_collated.stamp: $(collated_apitest_sources) collate-apitest
141        $(PERL) "$(srcdir)/collate-apitest" "$(srcdir)" $(collated_apitest_sources) > api_collated.hT
142        mv api_collated.hT api_collated.h
143        touch $@
144
145api_generated.cc: generate-api_generated
146        $(PERL) "$(srcdir)/generate-api_generated" > api_generated.ccT
147        mv api_generated.ccT api_generated.cc
148endif
149
150EXTRA_DIST = collate-apitest generate-api_generated api_all.h api_collated.h \
151        $(collated_apitest_sources:.cc=.h) dir_contents
152
153## Distribute test data:
154EXTRA_DIST +=\
155        runtest.in \
156        valgrind.supp \
157        testdata/apitest_onedoc.txt \
158        testdata/apitest_simpledata.txt \
159        testdata/apitest_simpledata2.txt \
160        testdata/apitest_termorder.txt \
161        testdata/apitest_rset.txt \
162        testdata/apitest_phrase.txt \
163        testdata/apitest_punc.txt \
164        testdata/apitest_space.txt \
165        testdata/apitest_allterms.txt \
166        testdata/apitest_allterms2.txt \
167        testdata/apitest_allterms4.txt \
168        testdata/apitest_poslist.txt \
169        testdata/apitest_manydocs.txt \
170        testdata/apitest_sortrel.txt \
171        testdata/etext.txt \
172        testdata/btreetest_ord+ \
173        testdata/btreetest_ord- \
174        testdata/btreetest_ordnum+ \
175        testdata/btreetest_ordnum- \
176        testdata/flint-0.9.9/flicklock \
177        testdata/flint-0.9.9/iamflint \
178        testdata/flint-0.9.9/position.baseA \
179        testdata/flint-0.9.9/position.DB \
180        testdata/flint-0.9.9/postlist.baseA\
181        testdata/flint-0.9.9/postlist.DB \
182        testdata/flint-0.9.9/record.baseA \
183        testdata/flint-0.9.9/record.DB \
184        testdata/flint-0.9.9/termlist.baseA \
185        testdata/flint-0.9.9/termlist.DB \
186        testdata/flint-0.9.9/value.baseA \
187        testdata/flint-0.9.9/value.DB \
188        testdata/flint-1.0.1/flintlock \
189        testdata/flint-1.0.1/iamflint \
190        testdata/flint-1.0.1/position.baseA \
191        testdata/flint-1.0.1/position.DB \
192        testdata/flint-1.0.1/postlist.baseA \
193        testdata/flint-1.0.1/postlist.DB \
194        testdata/flint-1.0.1/record.baseA \
195        testdata/flint-1.0.1/record.DB \
196        testdata/flint-1.0.1/termlist.baseA \
197        testdata/flint-1.0.1/termlist.DB \
198        testdata/flint-1.0.1/value.baseA \
199        testdata/flint-1.0.1/value.DB \
200        testdata/flint-1.0.2/flintlock \
201        testdata/flint-1.0.2/iamflint \
202        testdata/flint-1.0.2/postlist.baseA \
203        testdata/flint-1.0.2/postlist.DB \
204        testdata/flint-1.0.2/record.baseA \
205        testdata/flint-1.0.2/record.DB \
206        testdata/flint-1.0.2/termlist.baseA \
207        testdata/flint-1.0.2/termlist.DB
208
209clean-local:
210        rm -rf .flint .quartz .quartztmp .btreetmp .multi
211
212include harness/Makefile.mk
Note: See TracBrowser for help on using the browser.