blob: 70efa6b9a14006639645a3e1bf7edcb468f05010 [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 Meier81a1f992014-10-22 14:09:43 +020019AUTOMAKE_OPTIONS = subdir-objects serial-tests
20
Nobuaki Sukegawaa0c5ab72015-02-01 00:27:12 +090021BUILT_SOURCES = gen-cpp/DebugProtoTest_types.h \
22 gen-cpp/EnumTest_types.h \
23 gen-cpp/OptionalRequiredTest_types.h \
24 gen-cpp/Recursive_types.h \
25 gen-cpp/ThriftTest_types.h \
26 gen-cpp/TypedefTest_types.h \
27 gen-cpp/ChildService.h \
Ben Craig1684c422015-04-24 08:52:44 -050028 gen-cpp/EmptyService.h \
Nobuaki Sukegawaa0c5ab72015-02-01 00:27:12 +090029 gen-cpp/ParentService.h \
30 gen-cpp/proc_types.h
31
Roger Meier2b1a5282012-05-11 10:12:39 +000032noinst_LTLIBRARIES = libtestgencpp.la libprocessortest.la
David Reiss351e22b2010-08-31 16:51:19 +000033nodist_libtestgencpp_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020034 gen-cpp/DebugProtoTest_types.cpp \
35 gen-cpp/DebugProtoTest_types.h \
36 gen-cpp/EnumTest_types.cpp \
37 gen-cpp/EnumTest_types.h \
38 gen-cpp/OptionalRequiredTest_types.cpp \
39 gen-cpp/OptionalRequiredTest_types.h \
40 gen-cpp/Recursive_types.cpp \
41 gen-cpp/Recursive_types.h \
42 gen-cpp/ThriftTest_types.cpp \
43 gen-cpp/ThriftTest_types.h \
Roger Meiera5bf1a12014-10-22 23:26:01 +020044 gen-cpp/ThriftTest_constants.cpp \
45 gen-cpp/ThriftTest_constants.h \
Jens Geyer79f988c2014-10-03 20:42:54 +020046 gen-cpp/TypedefTest_types.cpp \
47 gen-cpp/TypedefTest_types.h \
48 ThriftTest_extras.cpp \
49 DebugProtoTest_extras.cpp
David Reiss351e22b2010-08-31 16:51:19 +000050
Roger Meier2b1a5282012-05-11 10:12:39 +000051nodist_libprocessortest_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020052 gen-cpp/ChildService.cpp \
53 gen-cpp/ChildService.h \
Ben Craig1684c422015-04-24 08:52:44 -050054 gen-cpp/EmptyService.cpp \
55 gen-cpp/EmptyService.h \
Jens Geyer79f988c2014-10-03 20:42:54 +020056 gen-cpp/ParentService.cpp \
57 gen-cpp/ParentService.h \
58 gen-cpp/proc_types.cpp \
59 gen-cpp/proc_types.h
Roger Meier2b1a5282012-05-11 10:12:39 +000060
David Reiss351e22b2010-08-31 16:51:19 +000061ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
62DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
63
64libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
65
Roger Meiera5bf1a12014-10-22 23:26:01 +020066noinst_PROGRAMS = Benchmark \
Roger Meiera5bf1a12014-10-22 23:26:01 +020067 concurrency_test
David Reiss351e22b2010-08-31 16:51:19 +000068
69Benchmark_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020070 Benchmark.cpp
David Reiss351e22b2010-08-31 16:51:19 +000071
72Benchmark_LDADD = libtestgencpp.la
73
74check_PROGRAMS = \
Roger Meier01144552015-04-04 16:14:08 +020075 UnitTests \
Jens Geyer79f988c2014-10-03 20:42:54 +020076 TFDTransportTest \
77 TPipedTransportTest \
78 DebugProtoTest \
79 JSONProtoTest \
80 OptionalRequiredTest \
81 RecursiveTest \
82 SpecializationTest \
83 AllProtocolsTest \
84 TransportTest \
ben-craigaf2d9c82015-07-16 08:11:21 -050085 TInterruptTest \
Ben Craig1684c422015-04-24 08:52:44 -050086 TServerIntegrationTest \
Jim Kingb0b710a2015-07-28 13:31:27 -040087 SecurityTest \
Jens Geyer79f988c2014-10-03 20:42:54 +020088 ZlibTest \
89 TFileTransportTest \
Jens Geyer79f988c2014-10-03 20:42:54 +020090 link_test \
91 OpenSSLManualInitTest \
Claudius Heine5ef662b2015-06-24 10:03:50 +020092 EnumTest \
93 DenseProtoTest
David Reiss351e22b2010-08-31 16:51:19 +000094
Jens Geyer4461a2f2014-12-23 18:22:54 +010095if AMX_HAVE_LIBEVENT
Nobuaki Sukegawa208738a2015-02-01 00:27:22 +090096noinst_PROGRAMS += \
Jens Geyer4461a2f2014-12-23 18:22:54 +010097 processor_test
98check_PROGRAMS += \
99 TNonblockingServerTest
100endif
101
Roger Meier9e0f0742011-08-03 17:36:55 +0000102TESTS_ENVIRONMENT= \
Jens Geyer79f988c2014-10-03 20:42:54 +0200103 BOOST_TEST_LOG_SINK=tests.xml \
104 BOOST_TEST_LOG_LEVEL=test_suite \
105 BOOST_TEST_LOG_FORMAT=xml
Roger Meier9e0f0742011-08-03 17:36:55 +0000106
David Reiss351e22b2010-08-31 16:51:19 +0000107TESTS = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200108 $(check_PROGRAMS)
David Reiss351e22b2010-08-31 16:51:19 +0000109
110UnitTests_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200111 UnitTestMain.cpp \
112 TMemoryBufferTest.cpp \
113 TBufferBaseTest.cpp \
114 Base64Test.cpp \
115 ToStringTest.cpp \
Roger Meier01144552015-04-04 16:14:08 +0200116 TypedefTest.cpp \
Ben Craig1684c422015-04-24 08:52:44 -0500117 TServerSocketTest.cpp \
118 TServerTransportTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +0000119
120if !WITH_BOOSTTHREADS
121UnitTests_SOURCES += \
Ben Craig1684c422015-04-24 08:52:44 -0500122 RWMutexStarveTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +0000123endif
David Reiss351e22b2010-08-31 16:51:19 +0000124
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000125UnitTests_LDADD = \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000126 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100127 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000128
ben-craigaf2d9c82015-07-16 08:11:21 -0500129TInterruptTest_SOURCES = \
Ben Craig1684c422015-04-24 08:52:44 -0500130 TSocketInterruptTest.cpp
131
ben-craigaf2d9c82015-07-16 08:11:21 -0500132TInterruptTest_LDADD = \
Ben Craig1684c422015-04-24 08:52:44 -0500133 libtestgencpp.la \
134 $(BOOST_TEST_LDADD) \
135 $(BOOST_CHRONO_LDADD) \
136 $(BOOST_SYSTEM_LDADD) \
137 $(BOOST_THREAD_LDADD)
138
139TServerIntegrationTest_SOURCES = \
140 TServerIntegrationTest.cpp
141
142TServerIntegrationTest_LDADD = \
143 libtestgencpp.la \
144 libprocessortest.la \
145 $(BOOST_TEST_LDADD) \
146 $(BOOST_SYSTEM_LDADD) \
147 $(BOOST_THREAD_LDADD)
148
Jim Kingb0b710a2015-07-28 13:31:27 -0400149SecurityTest_SOURCES = \
150 SecurityTest.cpp
151
152SecurityTest_LDADD = \
153 libtestgencpp.la \
154 libprocessortest.la \
155 $(BOOST_TEST_LDADD) \
156 $(BOOST_FILESYSTEM_LDADD) \
157 $(BOOST_SYSTEM_LDADD) \
158 $(BOOST_THREAD_LDADD)
159
David Reiss35dc7692010-10-06 17:10:19 +0000160TransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200161 TransportTest.cpp
David Reiss35dc7692010-10-06 17:10:19 +0000162
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000163TransportTest_LDADD = \
164 libtestgencpp.la \
165 $(top_builddir)/lib/cpp/libthriftz.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100166 $(BOOST_TEST_LDADD) \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000167 -lz
David Reiss35dc7692010-10-06 17:10:19 +0000168
David Reiss9a961e72010-10-06 17:10:23 +0000169ZlibTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200170 ZlibTest.cpp
David Reiss9a961e72010-10-06 17:10:23 +0000171
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000172ZlibTest_LDADD = \
173 libtestgencpp.la \
174 $(top_builddir)/lib/cpp/libthriftz.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100175 $(BOOST_TEST_LDADD) \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000176 -lz
David Reiss9a961e72010-10-06 17:10:23 +0000177
Jens Geyerae0b22c2014-09-04 23:04:21 +0200178EnumTest_SOURCES = \
179 EnumTest.cpp
180
181EnumTest_LDADD = \
182 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100183 $(BOOST_TEST_LDADD)
Jens Geyerae0b22c2014-09-04 23:04:21 +0200184
David Reiss709b69f2010-10-06 17:10:30 +0000185TFileTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200186 TFileTransportTest.cpp
David Reiss709b69f2010-10-06 17:10:30 +0000187
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000188TFileTransportTest_LDADD = \
189 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100190 $(BOOST_TEST_LDADD)
David Reiss709b69f2010-10-06 17:10:30 +0000191
David Reiss351e22b2010-08-31 16:51:19 +0000192#
193# TFDTransportTest
194#
195TFDTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200196 TFDTransportTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000197
Claudius Heine5ef662b2015-06-24 10:03:50 +0200198TFDTransportTest_LDADD = \
199 $(top_builddir)/lib/cpp/libthrift.la \
200 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000201
202
203#
204# TPipedTransportTest
205#
206TPipedTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200207 TPipedTransportTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000208
209TPipedTransportTest_LDADD = \
Claudius Heine5ef662b2015-06-24 10:03:50 +0200210 $(top_builddir)/lib/cpp/libthrift.la \
211 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000212
213#
214# AllProtocolsTest
215#
216AllProtocolsTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200217 AllProtocolTests.cpp \
218 AllProtocolTests.tcc \
219 GenericHelpers.h
David Reiss351e22b2010-08-31 16:51:19 +0000220
Claudius Heine5ef662b2015-06-24 10:03:50 +0200221AllProtocolsTest_LDADD = \
222 libtestgencpp.la \
223 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000224
225#
226# DebugProtoTest
227#
228DebugProtoTest_SOURCES = \
ben-craigaf2d9c82015-07-16 08:11:21 -0500229 DebugProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000230
Claudius Heine5ef662b2015-06-24 10:03:50 +0200231DebugProtoTest_LDADD = \
232 libtestgencpp.la \
233 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000234
235
236#
237# JSONProtoTest
238#
239JSONProtoTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200240 JSONProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000241
Claudius Heine5ef662b2015-06-24 10:03:50 +0200242JSONProtoTest_LDADD = \
243 libtestgencpp.la \
244 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000245
246#
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900247# TNonblockingServerTest
248#
249TNonblockingServerTest_SOURCES = TNonblockingServerTest.cpp
250
251TNonblockingServerTest_LDADD = libprocessortest.la \
252 $(top_builddir)/lib/cpp/libthrift.la \
253 $(top_builddir)/lib/cpp/libthriftnb.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100254 $(BOOST_TEST_LDADD) \
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900255 $(BOOST_LDFLAGS) \
Jens Geyer4461a2f2014-12-23 18:22:54 +0100256 $(LIBEVENT_LIBS)
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900257
258#
David Reiss351e22b2010-08-31 16:51:19 +0000259# OptionalRequiredTest
260#
261OptionalRequiredTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200262 OptionalRequiredTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000263
Claudius Heine5ef662b2015-06-24 10:03:50 +0200264OptionalRequiredTest_LDADD = \
265 libtestgencpp.la \
266 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000267
David Reisse71115b2010-10-06 17:09:56 +0000268#
jfarrelle0e83162014-04-08 22:45:01 -0400269# OptionalRequiredTest
270#
271RecursiveTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200272 RecursiveTest.cpp
jfarrelle0e83162014-04-08 22:45:01 -0400273
Claudius Heine5ef662b2015-06-24 10:03:50 +0200274RecursiveTest_LDADD = \
275 libtestgencpp.la \
276 $(BOOST_TEST_LDADD)
277
278#
279# DenseProtoTest
280#
281DenseProtoTest_SOURCES = \
282 DenseProtoTest.cpp
283
284DenseProtoTest_LDADD = \
285 libtestgencpp.la \
286 $(BOOST_TEST_LDADD)
jfarrelle0e83162014-04-08 22:45:01 -0400287
288#
David Reisse71115b2010-10-06 17:09:56 +0000289# SpecializationTest
290#
291SpecializationTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200292 SpecializationTest.cpp
David Reisse71115b2010-10-06 17:09:56 +0000293
Claudius Heine5ef662b2015-06-24 10:03:50 +0200294SpecializationTest_LDADD = \
295 libtestgencpp.la \
296 $(BOOST_TEST_LDADD)
David Reisse71115b2010-10-06 17:09:56 +0000297
Roger Meier2b1a5282012-05-11 10:12:39 +0000298concurrency_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200299 concurrency/Tests.cpp \
300 concurrency/ThreadFactoryTests.h \
301 concurrency/ThreadManagerTests.h \
302 concurrency/TimerManagerTests.h
David Reiss351e22b2010-08-31 16:51:19 +0000303
Roger Meier2b1a5282012-05-11 10:12:39 +0000304concurrency_test_LDADD = \
305 $(top_builddir)/lib/cpp/libthrift.la
306
Roger Meier63fcb7e2014-06-15 21:48:59 +0200307link_test_SOURCES = \
308 link/LinkTest.cpp \
309 link/TemplatedService1.cpp \
310 link/TemplatedService2.cpp
311
Roger Meier2b1a5282012-05-11 10:12:39 +0000312processor_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200313 processor/ProcessorTest.cpp \
314 processor/EventLog.cpp \
315 processor/ServerThread.cpp \
316 processor/EventLog.h \
317 processor/Handlers.h \
318 processor/ServerThread.h
Roger Meier2b1a5282012-05-11 10:12:39 +0000319
320processor_test_LDADD = libprocessortest.la \
321 $(top_builddir)/lib/cpp/libthrift.la \
322 $(top_builddir)/lib/cpp/libthriftnb.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100323 $(BOOST_TEST_LDADD) \
Roger Meier2b1a5282012-05-11 10:12:39 +0000324 $(BOOST_LDFLAGS) \
Jens Geyer4461a2f2014-12-23 18:22:54 +0100325 $(LIBEVENT_LIBS)
Alan Dunnbee7b732014-07-26 13:48:43 -0500326
327OpenSSLManualInitTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200328 OpenSSLManualInitTest.cpp
Alan Dunnbee7b732014-07-26 13:48:43 -0500329
330OpenSSLManualInitTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200331 $(top_builddir)/lib/cpp/libthrift.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100332 $(BOOST_TEST_LDADD)
Alan Dunnbee7b732014-07-26 13:48:43 -0500333
David Reiss351e22b2010-08-31 16:51:19 +0000334#
335# Common thrift code generation rules
336#
337THRIFT = $(top_builddir)/compiler/cpp/thrift
338
Ben Craig1684c422015-04-24 08:52:44 -0500339gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h gen-cpp/EmptyService.cpp gen-cpp/EmptyService.h: $(top_srcdir)/test/DebugProtoTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200340 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000341
Jens Geyerae0b22c2014-09-04 23:04:21 +0200342gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h: $(top_srcdir)/test/EnumTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200343 $(THRIFT) --gen cpp $<
Jens Geyerae0b22c2014-09-04 23:04:21 +0200344
Jens Geyer089bcd32014-09-11 22:36:41 +0200345gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h: $(top_srcdir)/test/TypedefTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200346 $(THRIFT) --gen cpp $<
Jens Geyer089bcd32014-09-11 22:36:41 +0200347
David Reiss351e22b2010-08-31 16:51:19 +0000348gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200349 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000350
jfarrelle0e83162014-04-08 22:45:01 -0400351gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200352 $(THRIFT) --gen cpp $<
jfarrelle0e83162014-04-08 22:45:01 -0400353
David Reiss351e22b2010-08-31 16:51:19 +0000354gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200355 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000356
357gen-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
Jens Geyer79f988c2014-10-03 20:42:54 +0200358 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000359
Roger Meier6f28c042014-11-01 20:31:44 +0100360gen-cpp/ChildService.cpp gen-cpp/ChildService.h gen-cpp/ParentService.cpp gen-cpp/ParentService.h gen-cpp/proc_types.cpp gen-cpp/proc_types.h: processor/proc.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200361 $(THRIFT) --gen cpp:templates,cob_style $<
Roger Meier2b1a5282012-05-11 10:12:39 +0000362
Jim King79c99112015-04-30 07:10:08 -0400363AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -D__STDC_LIMIT_MACROS
Roger Meier38315782011-11-06 11:29:41 +0000364AM_LDFLAGS = $(BOOST_LDFLAGS)
Roger Meiercb0754d2014-10-21 21:28:04 +0200365AM_CXXFLAGS = -Wall -Wextra -pedantic
David Reiss351e22b2010-08-31 16:51:19 +0000366
367clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +0200368 $(RM) -r gen-cpp
David Reiss351e22b2010-08-31 16:51:19 +0000369
370EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200371 ThriftTest_extras.cpp \
372 DebugProtoTest_extras.cpp \
373 concurrency \
374 processor