blob: 3470abbab75e47afa3452e200552af41d3dba8dc [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 Craig1684c422015-04-24 08:52:44 -050085 TSocketInterruptTest \
86 TServerIntegrationTest \
Jens Geyer79f988c2014-10-03 20:42:54 +020087 ZlibTest \
88 TFileTransportTest \
Jens Geyer79f988c2014-10-03 20:42:54 +020089 link_test \
90 OpenSSLManualInitTest \
91 EnumTest
David Reiss351e22b2010-08-31 16:51:19 +000092
Jens Geyer4461a2f2014-12-23 18:22:54 +010093if AMX_HAVE_LIBEVENT
Nobuaki Sukegawa208738a2015-02-01 00:27:22 +090094noinst_PROGRAMS += \
Jens Geyer4461a2f2014-12-23 18:22:54 +010095 processor_test
96check_PROGRAMS += \
97 TNonblockingServerTest
98endif
99
Roger Meier9e0f0742011-08-03 17:36:55 +0000100TESTS_ENVIRONMENT= \
Jens Geyer79f988c2014-10-03 20:42:54 +0200101 BOOST_TEST_LOG_SINK=tests.xml \
102 BOOST_TEST_LOG_LEVEL=test_suite \
103 BOOST_TEST_LOG_FORMAT=xml
Roger Meier9e0f0742011-08-03 17:36:55 +0000104
David Reiss351e22b2010-08-31 16:51:19 +0000105TESTS = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200106 $(check_PROGRAMS)
David Reiss351e22b2010-08-31 16:51:19 +0000107
108UnitTests_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200109 UnitTestMain.cpp \
110 TMemoryBufferTest.cpp \
111 TBufferBaseTest.cpp \
112 Base64Test.cpp \
113 ToStringTest.cpp \
Roger Meier01144552015-04-04 16:14:08 +0200114 TypedefTest.cpp \
Ben Craig1684c422015-04-24 08:52:44 -0500115 TServerSocketTest.cpp \
116 TServerTransportTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +0000117
118if !WITH_BOOSTTHREADS
119UnitTests_SOURCES += \
Ben Craig1684c422015-04-24 08:52:44 -0500120 RWMutexStarveTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +0000121endif
David Reiss351e22b2010-08-31 16:51:19 +0000122
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000123UnitTests_LDADD = \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000124 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100125 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000126
Ben Craig1684c422015-04-24 08:52:44 -0500127TSocketInterruptTest_SOURCES = \
128 TSocketInterruptTest.cpp
129
130TSocketInterruptTest_LDADD = \
131 libtestgencpp.la \
132 $(BOOST_TEST_LDADD) \
133 $(BOOST_CHRONO_LDADD) \
134 $(BOOST_SYSTEM_LDADD) \
135 $(BOOST_THREAD_LDADD)
136
137TServerIntegrationTest_SOURCES = \
138 TServerIntegrationTest.cpp
139
140TServerIntegrationTest_LDADD = \
141 libtestgencpp.la \
142 libprocessortest.la \
143 $(BOOST_TEST_LDADD) \
144 $(BOOST_SYSTEM_LDADD) \
145 $(BOOST_THREAD_LDADD)
146
David Reiss35dc7692010-10-06 17:10:19 +0000147TransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200148 TransportTest.cpp
David Reiss35dc7692010-10-06 17:10:19 +0000149
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000150TransportTest_LDADD = \
151 libtestgencpp.la \
152 $(top_builddir)/lib/cpp/libthriftz.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100153 $(BOOST_TEST_LDADD) \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000154 -lz
David Reiss35dc7692010-10-06 17:10:19 +0000155
David Reiss9a961e72010-10-06 17:10:23 +0000156ZlibTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200157 ZlibTest.cpp
David Reiss9a961e72010-10-06 17:10:23 +0000158
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000159ZlibTest_LDADD = \
160 libtestgencpp.la \
161 $(top_builddir)/lib/cpp/libthriftz.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100162 $(BOOST_TEST_LDADD) \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000163 -lz
David Reiss9a961e72010-10-06 17:10:23 +0000164
Jens Geyerae0b22c2014-09-04 23:04:21 +0200165EnumTest_SOURCES = \
166 EnumTest.cpp
167
168EnumTest_LDADD = \
169 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100170 $(BOOST_TEST_LDADD)
Jens Geyerae0b22c2014-09-04 23:04:21 +0200171
David Reiss709b69f2010-10-06 17:10:30 +0000172TFileTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200173 TFileTransportTest.cpp
David Reiss709b69f2010-10-06 17:10:30 +0000174
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000175TFileTransportTest_LDADD = \
176 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100177 $(BOOST_TEST_LDADD)
David Reiss709b69f2010-10-06 17:10:30 +0000178
David Reiss351e22b2010-08-31 16:51:19 +0000179#
180# TFDTransportTest
181#
182TFDTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200183 TFDTransportTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000184
185TFDTransportTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200186 $(top_builddir)/lib/cpp/libthrift.la
David Reiss351e22b2010-08-31 16:51:19 +0000187
188
189#
190# TPipedTransportTest
191#
192TPipedTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200193 TPipedTransportTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000194
195TPipedTransportTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200196 $(top_builddir)/lib/cpp/libthrift.la
David Reiss351e22b2010-08-31 16:51:19 +0000197
198#
199# AllProtocolsTest
200#
201AllProtocolsTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200202 AllProtocolTests.cpp \
203 AllProtocolTests.tcc \
204 GenericHelpers.h
David Reiss351e22b2010-08-31 16:51:19 +0000205
206AllProtocolsTest_LDADD = libtestgencpp.la
207
208#
209# DebugProtoTest
210#
211DebugProtoTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200212 DebugProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000213
214DebugProtoTest_LDADD = libtestgencpp.la
215
216
217#
218# JSONProtoTest
219#
220JSONProtoTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200221 JSONProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000222
223JSONProtoTest_LDADD = libtestgencpp.la
224
225#
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900226# TNonblockingServerTest
227#
228TNonblockingServerTest_SOURCES = TNonblockingServerTest.cpp
229
230TNonblockingServerTest_LDADD = libprocessortest.la \
231 $(top_builddir)/lib/cpp/libthrift.la \
232 $(top_builddir)/lib/cpp/libthriftnb.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100233 $(BOOST_TEST_LDADD) \
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900234 $(BOOST_LDFLAGS) \
Jens Geyer4461a2f2014-12-23 18:22:54 +0100235 $(LIBEVENT_LIBS)
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900236
237#
David Reiss351e22b2010-08-31 16:51:19 +0000238# OptionalRequiredTest
239#
240OptionalRequiredTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200241 OptionalRequiredTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000242
243OptionalRequiredTest_LDADD = libtestgencpp.la
244
David Reisse71115b2010-10-06 17:09:56 +0000245#
jfarrelle0e83162014-04-08 22:45:01 -0400246# OptionalRequiredTest
247#
248RecursiveTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200249 RecursiveTest.cpp
jfarrelle0e83162014-04-08 22:45:01 -0400250
251RecursiveTest_LDADD = libtestgencpp.la
252
253#
David Reisse71115b2010-10-06 17:09:56 +0000254# SpecializationTest
255#
256SpecializationTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200257 SpecializationTest.cpp
David Reisse71115b2010-10-06 17:09:56 +0000258
259SpecializationTest_LDADD = libtestgencpp.la
260
Roger Meier2b1a5282012-05-11 10:12:39 +0000261concurrency_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200262 concurrency/Tests.cpp \
263 concurrency/ThreadFactoryTests.h \
264 concurrency/ThreadManagerTests.h \
265 concurrency/TimerManagerTests.h
David Reiss351e22b2010-08-31 16:51:19 +0000266
Roger Meier2b1a5282012-05-11 10:12:39 +0000267concurrency_test_LDADD = \
268 $(top_builddir)/lib/cpp/libthrift.la
269
Roger Meier63fcb7e2014-06-15 21:48:59 +0200270link_test_SOURCES = \
271 link/LinkTest.cpp \
272 link/TemplatedService1.cpp \
273 link/TemplatedService2.cpp
274
Roger Meier2b1a5282012-05-11 10:12:39 +0000275processor_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200276 processor/ProcessorTest.cpp \
277 processor/EventLog.cpp \
278 processor/ServerThread.cpp \
279 processor/EventLog.h \
280 processor/Handlers.h \
281 processor/ServerThread.h
Roger Meier2b1a5282012-05-11 10:12:39 +0000282
283processor_test_LDADD = libprocessortest.la \
284 $(top_builddir)/lib/cpp/libthrift.la \
285 $(top_builddir)/lib/cpp/libthriftnb.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100286 $(BOOST_TEST_LDADD) \
Roger Meier2b1a5282012-05-11 10:12:39 +0000287 $(BOOST_LDFLAGS) \
Jens Geyer4461a2f2014-12-23 18:22:54 +0100288 $(LIBEVENT_LIBS)
Alan Dunnbee7b732014-07-26 13:48:43 -0500289
290OpenSSLManualInitTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200291 OpenSSLManualInitTest.cpp
Alan Dunnbee7b732014-07-26 13:48:43 -0500292
293OpenSSLManualInitTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200294 $(top_builddir)/lib/cpp/libthrift.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100295 $(BOOST_TEST_LDADD)
Alan Dunnbee7b732014-07-26 13:48:43 -0500296
David Reiss351e22b2010-08-31 16:51:19 +0000297#
298# Common thrift code generation rules
299#
300THRIFT = $(top_builddir)/compiler/cpp/thrift
301
Ben Craig1684c422015-04-24 08:52:44 -0500302gen-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 +0200303 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000304
Jens Geyerae0b22c2014-09-04 23:04:21 +0200305gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h: $(top_srcdir)/test/EnumTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200306 $(THRIFT) --gen cpp $<
Jens Geyerae0b22c2014-09-04 23:04:21 +0200307
Jens Geyer089bcd32014-09-11 22:36:41 +0200308gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h: $(top_srcdir)/test/TypedefTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200309 $(THRIFT) --gen cpp $<
Jens Geyer089bcd32014-09-11 22:36:41 +0200310
David Reiss351e22b2010-08-31 16:51:19 +0000311gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200312 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000313
jfarrelle0e83162014-04-08 22:45:01 -0400314gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200315 $(THRIFT) --gen cpp $<
jfarrelle0e83162014-04-08 22:45:01 -0400316
David Reiss351e22b2010-08-31 16:51:19 +0000317gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200318 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000319
320gen-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 +0200321 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000322
Roger Meier6f28c042014-11-01 20:31:44 +0100323gen-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 +0200324 $(THRIFT) --gen cpp:templates,cob_style $<
Roger Meier2b1a5282012-05-11 10:12:39 +0000325
Jim King79c99112015-04-30 07:10:08 -0400326AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -D__STDC_LIMIT_MACROS
Roger Meier38315782011-11-06 11:29:41 +0000327AM_LDFLAGS = $(BOOST_LDFLAGS)
Roger Meiercb0754d2014-10-21 21:28:04 +0200328AM_CXXFLAGS = -Wall -Wextra -pedantic
David Reiss351e22b2010-08-31 16:51:19 +0000329
330clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +0200331 $(RM) -r gen-cpp
David Reiss351e22b2010-08-31 16:51:19 +0000332
333EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200334 DenseProtoTest.cpp \
335 ThriftTest_extras.cpp \
336 DebugProtoTest_extras.cpp \
337 concurrency \
338 processor