blob: 435f2b58a1c11d57e001db3a6ac56cfeb7abb4ae [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 \
Randy Abernethy8dbe5f62015-08-01 22:57:02 -070092 EnumTest
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 \
jfarrellf13e4312015-08-25 00:39:29 -0400117 TServerTransportTest.cpp \
118 TestPortFixture.h \
119 TTransportCheckThrow.h
Roger Meier12d70532011-12-14 23:35:28 +0000120
121if !WITH_BOOSTTHREADS
122UnitTests_SOURCES += \
Ben Craig1684c422015-04-24 08:52:44 -0500123 RWMutexStarveTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +0000124endif
David Reiss351e22b2010-08-31 16:51:19 +0000125
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000126UnitTests_LDADD = \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000127 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100128 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000129
ben-craigaf2d9c82015-07-16 08:11:21 -0500130TInterruptTest_SOURCES = \
Ben Craig1684c422015-04-24 08:52:44 -0500131 TSocketInterruptTest.cpp
132
ben-craigaf2d9c82015-07-16 08:11:21 -0500133TInterruptTest_LDADD = \
Ben Craig1684c422015-04-24 08:52:44 -0500134 libtestgencpp.la \
135 $(BOOST_TEST_LDADD) \
136 $(BOOST_CHRONO_LDADD) \
137 $(BOOST_SYSTEM_LDADD) \
138 $(BOOST_THREAD_LDADD)
139
140TServerIntegrationTest_SOURCES = \
141 TServerIntegrationTest.cpp
142
143TServerIntegrationTest_LDADD = \
144 libtestgencpp.la \
145 libprocessortest.la \
146 $(BOOST_TEST_LDADD) \
147 $(BOOST_SYSTEM_LDADD) \
148 $(BOOST_THREAD_LDADD)
149
Jim Kingb0b710a2015-07-28 13:31:27 -0400150SecurityTest_SOURCES = \
151 SecurityTest.cpp
152
153SecurityTest_LDADD = \
154 libtestgencpp.la \
155 libprocessortest.la \
156 $(BOOST_TEST_LDADD) \
157 $(BOOST_FILESYSTEM_LDADD) \
158 $(BOOST_SYSTEM_LDADD) \
159 $(BOOST_THREAD_LDADD)
160
David Reiss35dc7692010-10-06 17:10:19 +0000161TransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200162 TransportTest.cpp
David Reiss35dc7692010-10-06 17:10:19 +0000163
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000164TransportTest_LDADD = \
165 libtestgencpp.la \
166 $(top_builddir)/lib/cpp/libthriftz.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100167 $(BOOST_TEST_LDADD) \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000168 -lz
David Reiss35dc7692010-10-06 17:10:19 +0000169
David Reiss9a961e72010-10-06 17:10:23 +0000170ZlibTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200171 ZlibTest.cpp
David Reiss9a961e72010-10-06 17:10:23 +0000172
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000173ZlibTest_LDADD = \
174 libtestgencpp.la \
175 $(top_builddir)/lib/cpp/libthriftz.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100176 $(BOOST_TEST_LDADD) \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000177 -lz
David Reiss9a961e72010-10-06 17:10:23 +0000178
Jens Geyerae0b22c2014-09-04 23:04:21 +0200179EnumTest_SOURCES = \
180 EnumTest.cpp
181
182EnumTest_LDADD = \
183 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100184 $(BOOST_TEST_LDADD)
Jens Geyerae0b22c2014-09-04 23:04:21 +0200185
David Reiss709b69f2010-10-06 17:10:30 +0000186TFileTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200187 TFileTransportTest.cpp
David Reiss709b69f2010-10-06 17:10:30 +0000188
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000189TFileTransportTest_LDADD = \
190 libtestgencpp.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100191 $(BOOST_TEST_LDADD)
David Reiss709b69f2010-10-06 17:10:30 +0000192
David Reiss351e22b2010-08-31 16:51:19 +0000193#
194# TFDTransportTest
195#
196TFDTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200197 TFDTransportTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000198
Claudius Heine5ef662b2015-06-24 10:03:50 +0200199TFDTransportTest_LDADD = \
200 $(top_builddir)/lib/cpp/libthrift.la \
201 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000202
203
204#
205# TPipedTransportTest
206#
207TPipedTransportTest_SOURCES = \
jfarrellf13e4312015-08-25 00:39:29 -0400208 TPipedTransportTest.cpp \
209 TPipeInterruptTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000210
211TPipedTransportTest_LDADD = \
Claudius Heine5ef662b2015-06-24 10:03:50 +0200212 $(top_builddir)/lib/cpp/libthrift.la \
213 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000214
215#
216# AllProtocolsTest
217#
218AllProtocolsTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200219 AllProtocolTests.cpp \
220 AllProtocolTests.tcc \
221 GenericHelpers.h
David Reiss351e22b2010-08-31 16:51:19 +0000222
Claudius Heine5ef662b2015-06-24 10:03:50 +0200223AllProtocolsTest_LDADD = \
224 libtestgencpp.la \
225 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000226
227#
228# DebugProtoTest
229#
230DebugProtoTest_SOURCES = \
ben-craigaf2d9c82015-07-16 08:11:21 -0500231 DebugProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000232
Claudius Heine5ef662b2015-06-24 10:03:50 +0200233DebugProtoTest_LDADD = \
234 libtestgencpp.la \
235 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000236
237
238#
239# JSONProtoTest
240#
241JSONProtoTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200242 JSONProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000243
Claudius Heine5ef662b2015-06-24 10:03:50 +0200244JSONProtoTest_LDADD = \
245 libtestgencpp.la \
246 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000247
248#
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900249# TNonblockingServerTest
250#
251TNonblockingServerTest_SOURCES = TNonblockingServerTest.cpp
252
253TNonblockingServerTest_LDADD = libprocessortest.la \
254 $(top_builddir)/lib/cpp/libthrift.la \
255 $(top_builddir)/lib/cpp/libthriftnb.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100256 $(BOOST_TEST_LDADD) \
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900257 $(BOOST_LDFLAGS) \
Jens Geyer4461a2f2014-12-23 18:22:54 +0100258 $(LIBEVENT_LIBS)
Nobuaki Sukegawad0d7a652014-12-07 21:36:51 +0900259
260#
David Reiss351e22b2010-08-31 16:51:19 +0000261# OptionalRequiredTest
262#
263OptionalRequiredTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200264 OptionalRequiredTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000265
Claudius Heine5ef662b2015-06-24 10:03:50 +0200266OptionalRequiredTest_LDADD = \
267 libtestgencpp.la \
268 $(BOOST_TEST_LDADD)
David Reiss351e22b2010-08-31 16:51:19 +0000269
David Reisse71115b2010-10-06 17:09:56 +0000270#
jfarrelle0e83162014-04-08 22:45:01 -0400271# OptionalRequiredTest
272#
273RecursiveTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200274 RecursiveTest.cpp
jfarrelle0e83162014-04-08 22:45:01 -0400275
Claudius Heine5ef662b2015-06-24 10:03:50 +0200276RecursiveTest_LDADD = \
277 libtestgencpp.la \
278 $(BOOST_TEST_LDADD)
279
280#
David Reisse71115b2010-10-06 17:09:56 +0000281# SpecializationTest
282#
283SpecializationTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200284 SpecializationTest.cpp
David Reisse71115b2010-10-06 17:09:56 +0000285
Claudius Heine5ef662b2015-06-24 10:03:50 +0200286SpecializationTest_LDADD = \
287 libtestgencpp.la \
288 $(BOOST_TEST_LDADD)
David Reisse71115b2010-10-06 17:09:56 +0000289
Roger Meier2b1a5282012-05-11 10:12:39 +0000290concurrency_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200291 concurrency/Tests.cpp \
292 concurrency/ThreadFactoryTests.h \
293 concurrency/ThreadManagerTests.h \
294 concurrency/TimerManagerTests.h
David Reiss351e22b2010-08-31 16:51:19 +0000295
Roger Meier2b1a5282012-05-11 10:12:39 +0000296concurrency_test_LDADD = \
297 $(top_builddir)/lib/cpp/libthrift.la
298
Roger Meier63fcb7e2014-06-15 21:48:59 +0200299link_test_SOURCES = \
300 link/LinkTest.cpp \
301 link/TemplatedService1.cpp \
302 link/TemplatedService2.cpp
303
Roger Meier2b1a5282012-05-11 10:12:39 +0000304processor_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200305 processor/ProcessorTest.cpp \
306 processor/EventLog.cpp \
307 processor/ServerThread.cpp \
308 processor/EventLog.h \
309 processor/Handlers.h \
310 processor/ServerThread.h
Roger Meier2b1a5282012-05-11 10:12:39 +0000311
312processor_test_LDADD = libprocessortest.la \
313 $(top_builddir)/lib/cpp/libthrift.la \
314 $(top_builddir)/lib/cpp/libthriftnb.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100315 $(BOOST_TEST_LDADD) \
Roger Meier2b1a5282012-05-11 10:12:39 +0000316 $(BOOST_LDFLAGS) \
Jens Geyer4461a2f2014-12-23 18:22:54 +0100317 $(LIBEVENT_LIBS)
Alan Dunnbee7b732014-07-26 13:48:43 -0500318
319OpenSSLManualInitTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200320 OpenSSLManualInitTest.cpp
Alan Dunnbee7b732014-07-26 13:48:43 -0500321
322OpenSSLManualInitTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200323 $(top_builddir)/lib/cpp/libthrift.la \
Konrad Grochowskiec8d8772014-12-20 12:19:00 +0100324 $(BOOST_TEST_LDADD)
Alan Dunnbee7b732014-07-26 13:48:43 -0500325
David Reiss351e22b2010-08-31 16:51:19 +0000326#
327# Common thrift code generation rules
328#
329THRIFT = $(top_builddir)/compiler/cpp/thrift
330
Ben Craig1684c422015-04-24 08:52:44 -0500331gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h gen-cpp/EmptyService.cpp gen-cpp/EmptyService.h: $(top_srcdir)/test/DebugProtoTest.thrift
Randy Abernethy8dbe5f62015-08-01 22:57:02 -0700332 $(THRIFT) --gen cpp $<
David Reiss351e22b2010-08-31 16:51:19 +0000333
Jens Geyerae0b22c2014-09-04 23:04:21 +0200334gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h: $(top_srcdir)/test/EnumTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200335 $(THRIFT) --gen cpp $<
Jens Geyerae0b22c2014-09-04 23:04:21 +0200336
Jens Geyer089bcd32014-09-11 22:36:41 +0200337gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h: $(top_srcdir)/test/TypedefTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200338 $(THRIFT) --gen cpp $<
Jens Geyer089bcd32014-09-11 22:36:41 +0200339
David Reiss351e22b2010-08-31 16:51:19 +0000340gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
Randy Abernethy8dbe5f62015-08-01 22:57:02 -0700341 $(THRIFT) --gen cpp $<
David Reiss351e22b2010-08-31 16:51:19 +0000342
jfarrelle0e83162014-04-08 22:45:01 -0400343gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200344 $(THRIFT) --gen cpp $<
jfarrelle0e83162014-04-08 22:45:01 -0400345
David Reiss351e22b2010-08-31 16:51:19 +0000346gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
Randy Abernethy8dbe5f62015-08-01 22:57:02 -0700347 $(THRIFT) --gen cpp $<
David Reiss351e22b2010-08-31 16:51:19 +0000348
349gen-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
Randy Abernethy8dbe5f62015-08-01 22:57:02 -0700350 $(THRIFT) --gen cpp $<
David Reiss351e22b2010-08-31 16:51:19 +0000351
Roger Meier6f28c042014-11-01 20:31:44 +0100352gen-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 +0200353 $(THRIFT) --gen cpp:templates,cob_style $<
Roger Meier2b1a5282012-05-11 10:12:39 +0000354
Jim King79c99112015-04-30 07:10:08 -0400355AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -D__STDC_LIMIT_MACROS
Roger Meier38315782011-11-06 11:29:41 +0000356AM_LDFLAGS = $(BOOST_LDFLAGS)
Roger Meiercb0754d2014-10-21 21:28:04 +0200357AM_CXXFLAGS = -Wall -Wextra -pedantic
David Reiss351e22b2010-08-31 16:51:19 +0000358
359clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +0200360 $(RM) -r gen-cpp
David Reiss351e22b2010-08-31 16:51:19 +0000361
362EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200363 concurrency \
jfarrellf13e4312015-08-25 00:39:29 -0400364 processor \
365 qt \
366 CMakeLists.txt \
367 DebugProtoTest_extras.cpp \
368 tests.xml \
369 ThriftTest_extras.cpp