blob: 5c32eba2cab0d5f31023dc3da41d7d3b958a1ee2 [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 \
Jens Geyer79f988c2014-10-03 20:42:54 +020087 ZlibTest \
88 TFileTransportTest \
Jens Geyer79f988c2014-10-03 20:42:54 +020089 link_test \
90 OpenSSLManualInitTest \
Claudius Heine5ef662b2015-06-24 10:03:50 +020091 EnumTest \
92 DenseProtoTest
David Reiss351e22b2010-08-31 16:51:19 +000093
Jens Geyer4461a2f2014-12-23 18:22:54 +010094if AMX_HAVE_LIBEVENT
Nobuaki Sukegawa208738a2015-02-01 00:27:22 +090095noinst_PROGRAMS += \
Jens Geyer4461a2f2014-12-23 18:22:54 +010096 processor_test
97check_PROGRAMS += \
98 TNonblockingServerTest
99endif
100
Roger Meier9e0f0742011-08-03 17:36:55 +0000101TESTS_ENVIRONMENT= \
Jens Geyer79f988c2014-10-03 20:42:54 +0200102 BOOST_TEST_LOG_SINK=tests.xml \
103 BOOST_TEST_LOG_LEVEL=test_suite \
104 BOOST_TEST_LOG_FORMAT=xml
Roger Meier9e0f0742011-08-03 17:36:55 +0000105
David Reiss351e22b2010-08-31 16:51:19 +0000106TESTS = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200107 $(check_PROGRAMS)
David Reiss351e22b2010-08-31 16:51:19 +0000108
109UnitTests_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200110 UnitTestMain.cpp \
111 TMemoryBufferTest.cpp \
112 TBufferBaseTest.cpp \
113 Base64Test.cpp \
114 ToStringTest.cpp \
Roger Meier01144552015-04-04 16:14:08 +0200115 TypedefTest.cpp \
Ben Craig1684c422015-04-24 08:52:44 -0500116 TServerSocketTest.cpp \
117 TServerTransportTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +0000118
119if !WITH_BOOSTTHREADS
120UnitTests_SOURCES += \
Ben Craig1684c422015-04-24 08:52:44 -0500121 RWMutexStarveTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +0000122endif
David Reiss351e22b2010-08-31 16:51:19 +0000123
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000124UnitTests_LDADD = \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000125 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100126 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000127
ben-craigaf2d9c82015-07-16 08:11:21 -0500128TInterruptTest_SOURCES = \
Ben Craig1684c422015-04-24 08:52:44 -0500129 TSocketInterruptTest.cpp
130
ben-craigaf2d9c82015-07-16 08:11:21 -0500131TInterruptTest_LDADD = \
Ben Craig1684c422015-04-24 08:52:44 -0500132 libtestgencpp.la \
133 $(BOOST_TEST_LDADD) \
134 $(BOOST_CHRONO_LDADD) \
135 $(BOOST_SYSTEM_LDADD) \
136 $(BOOST_THREAD_LDADD)
137
138TServerIntegrationTest_SOURCES = \
139 TServerIntegrationTest.cpp
140
141TServerIntegrationTest_LDADD = \
142 libtestgencpp.la \
143 libprocessortest.la \
144 $(BOOST_TEST_LDADD) \
145 $(BOOST_SYSTEM_LDADD) \
146 $(BOOST_THREAD_LDADD)
147
David Reiss35dc7692010-10-06 17:10:19 +0000148TransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200149 TransportTest.cpp
David Reiss35dc7692010-10-06 17:10:19 +0000150
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000151TransportTest_LDADD = \
152 libtestgencpp.la \
153 $(top_builddir)/lib/cpp/libthriftz.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100154 $(BOOST_TEST_LDADD) \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000155 -lz
David Reiss35dc7692010-10-06 17:10:19 +0000156
David Reiss9a961e72010-10-06 17:10:23 +0000157ZlibTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200158 ZlibTest.cpp
David Reiss9a961e72010-10-06 17:10:23 +0000159
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000160ZlibTest_LDADD = \
161 libtestgencpp.la \
162 $(top_builddir)/lib/cpp/libthriftz.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100163 $(BOOST_TEST_LDADD) \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000164 -lz
David Reiss9a961e72010-10-06 17:10:23 +0000165
Jens Geyerae0b22c2014-09-04 23:04:21 +0200166EnumTest_SOURCES = \
167 EnumTest.cpp
168
169EnumTest_LDADD = \
170 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100171 $(BOOST_TEST_LDADD)
Jens Geyerae0b22c2014-09-04 23:04:21 +0200172
David Reiss709b69f2010-10-06 17:10:30 +0000173TFileTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200174 TFileTransportTest.cpp
David Reiss709b69f2010-10-06 17:10:30 +0000175
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000176TFileTransportTest_LDADD = \
177 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100178 $(BOOST_TEST_LDADD)
David Reiss709b69f2010-10-06 17:10:30 +0000179
David Reiss351e22b2010-08-31 16:51:19 +0000180#
181# TFDTransportTest
182#
183TFDTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200184 TFDTransportTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000185
Claudius Heine5ef662b2015-06-24 10:03:50 +0200186TFDTransportTest_LDADD = \
187 $(top_builddir)/lib/cpp/libthrift.la \
188 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000189
190
191#
192# TPipedTransportTest
193#
194TPipedTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200195 TPipedTransportTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000196
197TPipedTransportTest_LDADD = \
Claudius Heine5ef662b2015-06-24 10:03:50 +0200198 $(top_builddir)/lib/cpp/libthrift.la \
199 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000200
201#
202# AllProtocolsTest
203#
204AllProtocolsTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200205 AllProtocolTests.cpp \
206 AllProtocolTests.tcc \
207 GenericHelpers.h
David Reiss351e22b2010-08-31 16:51:19 +0000208
Claudius Heine5ef662b2015-06-24 10:03:50 +0200209AllProtocolsTest_LDADD = \
210 libtestgencpp.la \
211 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000212
213#
214# DebugProtoTest
215#
216DebugProtoTest_SOURCES = \
ben-craigaf2d9c82015-07-16 08:11:21 -0500217 DebugProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000218
Claudius Heine5ef662b2015-06-24 10:03:50 +0200219DebugProtoTest_LDADD = \
220 libtestgencpp.la \
221 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000222
223
224#
225# JSONProtoTest
226#
227JSONProtoTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200228 JSONProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000229
Claudius Heine5ef662b2015-06-24 10:03:50 +0200230JSONProtoTest_LDADD = \
231 libtestgencpp.la \
232 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000233
234#
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900235# TNonblockingServerTest
236#
237TNonblockingServerTest_SOURCES = TNonblockingServerTest.cpp
238
239TNonblockingServerTest_LDADD = libprocessortest.la \
240 $(top_builddir)/lib/cpp/libthrift.la \
241 $(top_builddir)/lib/cpp/libthriftnb.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100242 $(BOOST_TEST_LDADD) \
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900243 $(BOOST_LDFLAGS) \
Jens Geyer4461a2f2014-12-23 18:22:54 +0100244 $(LIBEVENT_LIBS)
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900245
246#
David Reiss351e22b2010-08-31 16:51:19 +0000247# OptionalRequiredTest
248#
249OptionalRequiredTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200250 OptionalRequiredTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000251
Claudius Heine5ef662b2015-06-24 10:03:50 +0200252OptionalRequiredTest_LDADD = \
253 libtestgencpp.la \
254 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000255
David Reisse71115b2010-10-06 17:09:56 +0000256#
jfarrelle0e83162014-04-08 22:45:01 -0400257# OptionalRequiredTest
258#
259RecursiveTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200260 RecursiveTest.cpp
jfarrelle0e83162014-04-08 22:45:01 -0400261
Claudius Heine5ef662b2015-06-24 10:03:50 +0200262RecursiveTest_LDADD = \
263 libtestgencpp.la \
264 $(BOOST_TEST_LDADD)
265
266#
267# DenseProtoTest
268#
269DenseProtoTest_SOURCES = \
270 DenseProtoTest.cpp
271
272DenseProtoTest_LDADD = \
273 libtestgencpp.la \
274 $(BOOST_TEST_LDADD)
jfarrelle0e83162014-04-08 22:45:01 -0400275
276#
David Reisse71115b2010-10-06 17:09:56 +0000277# SpecializationTest
278#
279SpecializationTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200280 SpecializationTest.cpp
David Reisse71115b2010-10-06 17:09:56 +0000281
Claudius Heine5ef662b2015-06-24 10:03:50 +0200282SpecializationTest_LDADD = \
283 libtestgencpp.la \
284 $(BOOST_TEST_LDADD)
David Reisse71115b2010-10-06 17:09:56 +0000285
Roger Meier2b1a5282012-05-11 10:12:39 +0000286concurrency_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200287 concurrency/Tests.cpp \
288 concurrency/ThreadFactoryTests.h \
289 concurrency/ThreadManagerTests.h \
290 concurrency/TimerManagerTests.h
David Reiss351e22b2010-08-31 16:51:19 +0000291
Roger Meier2b1a5282012-05-11 10:12:39 +0000292concurrency_test_LDADD = \
293 $(top_builddir)/lib/cpp/libthrift.la
294
Roger Meier63fcb7e2014-06-15 21:48:59 +0200295link_test_SOURCES = \
296 link/LinkTest.cpp \
297 link/TemplatedService1.cpp \
298 link/TemplatedService2.cpp
299
Roger Meier2b1a5282012-05-11 10:12:39 +0000300processor_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200301 processor/ProcessorTest.cpp \
302 processor/EventLog.cpp \
303 processor/ServerThread.cpp \
304 processor/EventLog.h \
305 processor/Handlers.h \
306 processor/ServerThread.h
Roger Meier2b1a5282012-05-11 10:12:39 +0000307
308processor_test_LDADD = libprocessortest.la \
309 $(top_builddir)/lib/cpp/libthrift.la \
310 $(top_builddir)/lib/cpp/libthriftnb.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100311 $(BOOST_TEST_LDADD) \
Roger Meier2b1a5282012-05-11 10:12:39 +0000312 $(BOOST_LDFLAGS) \
Jens Geyer4461a2f2014-12-23 18:22:54 +0100313 $(LIBEVENT_LIBS)
Alan Dunnbee7b732014-07-26 13:48:43 -0500314
315OpenSSLManualInitTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200316 OpenSSLManualInitTest.cpp
Alan Dunnbee7b732014-07-26 13:48:43 -0500317
318OpenSSLManualInitTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200319 $(top_builddir)/lib/cpp/libthrift.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100320 $(BOOST_TEST_LDADD)
Alan Dunnbee7b732014-07-26 13:48:43 -0500321
David Reiss351e22b2010-08-31 16:51:19 +0000322#
323# Common thrift code generation rules
324#
325THRIFT = $(top_builddir)/compiler/cpp/thrift
326
Ben Craig1684c422015-04-24 08:52:44 -0500327gen-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 +0200328 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000329
Jens Geyerae0b22c2014-09-04 23:04:21 +0200330gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h: $(top_srcdir)/test/EnumTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200331 $(THRIFT) --gen cpp $<
Jens Geyerae0b22c2014-09-04 23:04:21 +0200332
Jens Geyer089bcd32014-09-11 22:36:41 +0200333gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h: $(top_srcdir)/test/TypedefTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200334 $(THRIFT) --gen cpp $<
Jens Geyer089bcd32014-09-11 22:36:41 +0200335
David Reiss351e22b2010-08-31 16:51:19 +0000336gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200337 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000338
jfarrelle0e83162014-04-08 22:45:01 -0400339gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200340 $(THRIFT) --gen cpp $<
jfarrelle0e83162014-04-08 22:45:01 -0400341
David Reiss351e22b2010-08-31 16:51:19 +0000342gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200343 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000344
345gen-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 +0200346 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000347
Roger Meier6f28c042014-11-01 20:31:44 +0100348gen-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 +0200349 $(THRIFT) --gen cpp:templates,cob_style $<
Roger Meier2b1a5282012-05-11 10:12:39 +0000350
Jim King79c99112015-04-30 07:10:08 -0400351AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -D__STDC_LIMIT_MACROS
Roger Meier38315782011-11-06 11:29:41 +0000352AM_LDFLAGS = $(BOOST_LDFLAGS)
Roger Meiercb0754d2014-10-21 21:28:04 +0200353AM_CXXFLAGS = -Wall -Wextra -pedantic
David Reiss351e22b2010-08-31 16:51:19 +0000354
355clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +0200356 $(RM) -r gen-cpp
David Reiss351e22b2010-08-31 16:51:19 +0000357
358EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200359 ThriftTest_extras.cpp \
360 DebugProtoTest_extras.cpp \
361 concurrency \
362 processor