blob: 012d226e5fcd813681a8c7c1d04dce1bf985b4af [file] [log] [blame]
David Reiss351e22b2010-08-31 16:51:19 +00001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
Roger Meierc0959192013-01-15 23:20:19 +010019.NOTPARALLEL:
Roger Meier2b1a5282012-05-11 10:12:39 +000020noinst_LTLIBRARIES = libtestgencpp.la libprocessortest.la
David Reiss351e22b2010-08-31 16:51:19 +000021nodist_libtestgencpp_la_SOURCES = \
22 gen-cpp/DebugProtoTest_types.cpp \
Jens Geyer089bcd32014-09-11 22:36:41 +020023 gen-cpp/DebugProtoTest_types.h \
Jens Geyerae0b22c2014-09-04 23:04:21 +020024 gen-cpp/EnumTest_types.cpp \
25 gen-cpp/EnumTest_types.h \
David Reiss351e22b2010-08-31 16:51:19 +000026 gen-cpp/OptionalRequiredTest_types.cpp \
David Reiss351e22b2010-08-31 16:51:19 +000027 gen-cpp/OptionalRequiredTest_types.h \
jfarrelle0e83162014-04-08 22:45:01 -040028 gen-cpp/Recursive_types.cpp \
29 gen-cpp/Recursive_types.h \
Jens Geyer089bcd32014-09-11 22:36:41 +020030 gen-cpp/ThriftTest_types.cpp \
David Reiss351e22b2010-08-31 16:51:19 +000031 gen-cpp/ThriftTest_types.h \
Jens Geyer089bcd32014-09-11 22:36:41 +020032 gen-cpp/TypedefTest_types.cpp \
33 gen-cpp/TypedefTest_types.h \
David Reiss351e22b2010-08-31 16:51:19 +000034 ThriftTest_extras.cpp \
35 DebugProtoTest_extras.cpp
36
Roger Meier2b1a5282012-05-11 10:12:39 +000037nodist_libprocessortest_la_SOURCES = \
38 gen-cpp/ChildService.cpp \
39 gen-cpp/ChildService.h \
40 gen-cpp/ParentService.cpp \
41 gen-cpp/ParentService.h \
42 gen-cpp/proc_types.cpp \
43 gen-cpp/proc_types.h
44
David Reiss351e22b2010-08-31 16:51:19 +000045ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
46DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
47
48libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
49
50noinst_PROGRAMS = Benchmark
51
52Benchmark_SOURCES = \
53 Benchmark.cpp
54
55Benchmark_LDADD = libtestgencpp.la
56
57check_PROGRAMS = \
58 TFDTransportTest \
59 TPipedTransportTest \
60 DebugProtoTest \
61 JSONProtoTest \
62 OptionalRequiredTest \
jfarrelle0e83162014-04-08 22:45:01 -040063 RecursiveTest \
David Reisse71115b2010-10-06 17:09:56 +000064 SpecializationTest \
David Reiss351e22b2010-08-31 16:51:19 +000065 AllProtocolsTest \
David Reiss35dc7692010-10-06 17:10:19 +000066 TransportTest \
David Reiss9a961e72010-10-06 17:10:23 +000067 ZlibTest \
David Reiss709b69f2010-10-06 17:10:30 +000068 TFileTransportTest \
Roger Meier63fcb7e2014-06-15 21:48:59 +020069 UnitTests \
Alan Dunnbee7b732014-07-26 13:48:43 -050070 link_test \
Jens Geyerae0b22c2014-09-04 23:04:21 +020071 OpenSSLManualInitTest \
72 EnumTest
Roger Meier2d59b9e2012-05-23 19:40:40 +000073# disable these test ... too strong
74# processor_test
Roger Meierdd16f052012-05-11 14:19:48 +000075# concurrency_test
David Reiss351e22b2010-08-31 16:51:19 +000076
Roger Meier9e0f0742011-08-03 17:36:55 +000077TESTS_ENVIRONMENT= \
78 BOOST_TEST_LOG_SINK=tests.xml \
79 BOOST_TEST_LOG_LEVEL=test_suite \
80 BOOST_TEST_LOG_FORMAT=xml
81
David Reiss351e22b2010-08-31 16:51:19 +000082TESTS = \
83 $(check_PROGRAMS)
84
85UnitTests_SOURCES = \
86 UnitTestMain.cpp \
87 TMemoryBufferTest.cpp \
Roger Meier4cb8e402012-05-27 18:05:16 +000088 TBufferBaseTest.cpp \
Konrad Grochowskib3f6ea12014-09-02 16:00:47 +020089 Base64Test.cpp \
Jens Geyer089bcd32014-09-11 22:36:41 +020090 ToStringTest.cpp \
91 TypedefTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +000092
93if !WITH_BOOSTTHREADS
94UnitTests_SOURCES += \
Roger Meier3fc48192011-12-11 21:05:35 +000095 RWMutexStarveTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +000096endif
David Reiss351e22b2010-08-31 16:51:19 +000097
Christian Lavoie4f42ef72010-11-04 18:51:42 +000098UnitTests_LDADD = \
Christian Lavoie4f42ef72010-11-04 18:51:42 +000099 libtestgencpp.la \
Roger Meier73b58a22014-05-11 17:39:34 +0200100 -l:libboost_unit_test_framework.a
David Reiss351e22b2010-08-31 16:51:19 +0000101
David Reiss35dc7692010-10-06 17:10:19 +0000102TransportTest_SOURCES = \
103 TransportTest.cpp
104
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000105TransportTest_LDADD = \
106 libtestgencpp.la \
107 $(top_builddir)/lib/cpp/libthriftz.la \
Roger Meier73b58a22014-05-11 17:39:34 +0200108 -l:libboost_unit_test_framework.a \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000109 -lz
David Reiss35dc7692010-10-06 17:10:19 +0000110
David Reiss9a961e72010-10-06 17:10:23 +0000111ZlibTest_SOURCES = \
112 ZlibTest.cpp
113
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000114ZlibTest_LDADD = \
115 libtestgencpp.la \
116 $(top_builddir)/lib/cpp/libthriftz.la \
Roger Meier73b58a22014-05-11 17:39:34 +0200117 -l:libboost_unit_test_framework.a \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000118 -lz
David Reiss9a961e72010-10-06 17:10:23 +0000119
Jens Geyerae0b22c2014-09-04 23:04:21 +0200120EnumTest_SOURCES = \
121 EnumTest.cpp
122
123EnumTest_LDADD = \
124 libtestgencpp.la \
Jens Geyer089bcd32014-09-11 22:36:41 +0200125 -l:libboost_unit_test_framework.a
Jens Geyerae0b22c2014-09-04 23:04:21 +0200126
David Reiss709b69f2010-10-06 17:10:30 +0000127TFileTransportTest_SOURCES = \
128 TFileTransportTest.cpp
129
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000130TFileTransportTest_LDADD = \
131 libtestgencpp.la \
Roger Meier73b58a22014-05-11 17:39:34 +0200132 -l:libboost_unit_test_framework.a
David Reiss709b69f2010-10-06 17:10:30 +0000133
David Reiss351e22b2010-08-31 16:51:19 +0000134#
135# TFDTransportTest
136#
137TFDTransportTest_SOURCES = \
138 TFDTransportTest.cpp
139
140TFDTransportTest_LDADD = \
141 $(top_builddir)/lib/cpp/libthrift.la
142
143
144#
145# TPipedTransportTest
146#
147TPipedTransportTest_SOURCES = \
148 TPipedTransportTest.cpp
149
150TPipedTransportTest_LDADD = \
151 $(top_builddir)/lib/cpp/libthrift.la
152
153#
154# AllProtocolsTest
155#
156AllProtocolsTest_SOURCES = \
157 AllProtocolTests.cpp \
158 AllProtocolTests.tcc \
159 GenericHelpers.h
160
161AllProtocolsTest_LDADD = libtestgencpp.la
162
163#
164# DebugProtoTest
165#
166DebugProtoTest_SOURCES = \
167 DebugProtoTest.cpp
168
169DebugProtoTest_LDADD = libtestgencpp.la
170
171
172#
173# JSONProtoTest
174#
175JSONProtoTest_SOURCES = \
176 JSONProtoTest.cpp
177
178JSONProtoTest_LDADD = libtestgencpp.la
179
180#
181# OptionalRequiredTest
182#
183OptionalRequiredTest_SOURCES = \
184 OptionalRequiredTest.cpp
185
186OptionalRequiredTest_LDADD = libtestgencpp.la
187
David Reisse71115b2010-10-06 17:09:56 +0000188#
jfarrelle0e83162014-04-08 22:45:01 -0400189# OptionalRequiredTest
190#
191RecursiveTest_SOURCES = \
192 RecursiveTest.cpp
193
194RecursiveTest_LDADD = libtestgencpp.la
195
196#
David Reisse71115b2010-10-06 17:09:56 +0000197# SpecializationTest
198#
199SpecializationTest_SOURCES = \
200 SpecializationTest.cpp
201
202SpecializationTest_LDADD = libtestgencpp.la
203
Roger Meier2b1a5282012-05-11 10:12:39 +0000204concurrency_test_SOURCES = \
205 concurrency/Tests.cpp \
206 concurrency/ThreadFactoryTests.h \
207 concurrency/ThreadManagerTests.h \
208 concurrency/TimerManagerTests.h
David Reiss351e22b2010-08-31 16:51:19 +0000209
Roger Meier2b1a5282012-05-11 10:12:39 +0000210concurrency_test_LDADD = \
211 $(top_builddir)/lib/cpp/libthrift.la
212
Roger Meier63fcb7e2014-06-15 21:48:59 +0200213link_test_SOURCES = \
214 link/LinkTest.cpp \
215 link/TemplatedService1.cpp \
216 link/TemplatedService2.cpp
217
Roger Meier2b1a5282012-05-11 10:12:39 +0000218processor_test_SOURCES = \
219 processor/ProcessorTest.cpp \
220 processor/EventLog.cpp \
221 processor/ServerThread.cpp \
222 processor/EventLog.h \
223 processor/Handlers.h \
224 processor/ServerThread.h
225
226processor_test_LDADD = libprocessortest.la \
227 $(top_builddir)/lib/cpp/libthrift.la \
228 $(top_builddir)/lib/cpp/libthriftnb.la \
229 $(BOOST_LDFLAGS) \
230 -levent \
Roger Meier73b58a22014-05-11 17:39:34 +0200231 -l:libboost_unit_test_framework.a
Alan Dunnbee7b732014-07-26 13:48:43 -0500232
233OpenSSLManualInitTest_SOURCES = \
234 OpenSSLManualInitTest.cpp
235
236OpenSSLManualInitTest_LDADD = \
237 $(top_builddir)/lib/cpp/libthrift.la \
238 -l:libboost_unit_test_framework.a
239
David Reiss351e22b2010-08-31 16:51:19 +0000240#
241# Common thrift code generation rules
242#
243THRIFT = $(top_builddir)/compiler/cpp/thrift
244
245gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift
246 $(THRIFT) --gen cpp:dense $<
247
Jens Geyerae0b22c2014-09-04 23:04:21 +0200248gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h: $(top_srcdir)/test/EnumTest.thrift
nameb3e5ebe2014-09-12 11:15:24 +0200249 $(THRIFT) --gen cpp $<
Jens Geyerae0b22c2014-09-04 23:04:21 +0200250
Jens Geyer089bcd32014-09-11 22:36:41 +0200251gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h: $(top_srcdir)/test/TypedefTest.thrift
252 $(THRIFT) --gen cpp $<
253
David Reiss351e22b2010-08-31 16:51:19 +0000254gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
255 $(THRIFT) --gen cpp:dense $<
256
jfarrelle0e83162014-04-08 22:45:01 -0400257gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift
258 $(THRIFT) --gen cpp $<
259
David Reiss351e22b2010-08-31 16:51:19 +0000260gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
261 $(THRIFT) --gen cpp:dense $<
262
263gen-cpp/SecondService.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_types.h: $(top_srcdir)/test/ThriftTest.thrift
264 $(THRIFT) --gen cpp:dense $<
265
Roger Meier2b1a5282012-05-11 10:12:39 +0000266gen-cpp/ChildService.cpp: processor/proc.thrift
267 $(THRIFT) --gen cpp:templates,cob_style $<
268
Konrad Grochowski1ff4a972014-09-19 23:57:57 +0200269AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src
Roger Meier38315782011-11-06 11:29:41 +0000270AM_LDFLAGS = $(BOOST_LDFLAGS)
Jake Farrellea949fb2011-12-13 20:02:33 +0000271AM_CXXFLAGS = -Wall
David Reiss351e22b2010-08-31 16:51:19 +0000272
273clean-local:
274 $(RM) -r gen-cpp
275
276EXTRA_DIST = \
David Reiss351e22b2010-08-31 16:51:19 +0000277 DenseProtoTest.cpp \
278 ThriftTest_extras.cpp \
Jake Farrell7c7a5e02012-10-11 00:29:11 +0000279 DebugProtoTest_extras.cpp \
280 concurrency \
281 processor