blob: 9111201f929898a711dcbd0292e189462de7075c [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
Roger Meier2b1a5282012-05-11 10:12:39 +000021noinst_LTLIBRARIES = libtestgencpp.la libprocessortest.la
David Reiss351e22b2010-08-31 16:51:19 +000022nodist_libtestgencpp_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020023 gen-cpp/DebugProtoTest_types.cpp \
24 gen-cpp/DebugProtoTest_types.h \
25 gen-cpp/EnumTest_types.cpp \
26 gen-cpp/EnumTest_types.h \
27 gen-cpp/OptionalRequiredTest_types.cpp \
28 gen-cpp/OptionalRequiredTest_types.h \
29 gen-cpp/Recursive_types.cpp \
30 gen-cpp/Recursive_types.h \
31 gen-cpp/ThriftTest_types.cpp \
32 gen-cpp/ThriftTest_types.h \
Roger Meiera5bf1a12014-10-22 23:26:01 +020033 gen-cpp/ThriftTest_constants.cpp \
34 gen-cpp/ThriftTest_constants.h \
Jens Geyer79f988c2014-10-03 20:42:54 +020035 gen-cpp/TypedefTest_types.cpp \
36 gen-cpp/TypedefTest_types.h \
37 ThriftTest_extras.cpp \
38 DebugProtoTest_extras.cpp
David Reiss351e22b2010-08-31 16:51:19 +000039
Roger Meier2b1a5282012-05-11 10:12:39 +000040nodist_libprocessortest_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020041 gen-cpp/ChildService.cpp \
42 gen-cpp/ChildService.h \
43 gen-cpp/ParentService.cpp \
44 gen-cpp/ParentService.h \
45 gen-cpp/proc_types.cpp \
46 gen-cpp/proc_types.h
Roger Meier2b1a5282012-05-11 10:12:39 +000047
David Reiss351e22b2010-08-31 16:51:19 +000048ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
49DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
50
51libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
52
Roger Meiera5bf1a12014-10-22 23:26:01 +020053noinst_PROGRAMS = Benchmark \
54 processor_test \
55 concurrency_test
David Reiss351e22b2010-08-31 16:51:19 +000056
57Benchmark_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020058 Benchmark.cpp
David Reiss351e22b2010-08-31 16:51:19 +000059
60Benchmark_LDADD = libtestgencpp.la
61
62check_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020063 TFDTransportTest \
64 TPipedTransportTest \
65 DebugProtoTest \
66 JSONProtoTest \
67 OptionalRequiredTest \
68 RecursiveTest \
69 SpecializationTest \
70 AllProtocolsTest \
71 TransportTest \
72 ZlibTest \
73 TFileTransportTest \
74 UnitTests \
75 link_test \
76 OpenSSLManualInitTest \
77 EnumTest
David Reiss351e22b2010-08-31 16:51:19 +000078
Roger Meier9e0f0742011-08-03 17:36:55 +000079TESTS_ENVIRONMENT= \
Jens Geyer79f988c2014-10-03 20:42:54 +020080 BOOST_TEST_LOG_SINK=tests.xml \
81 BOOST_TEST_LOG_LEVEL=test_suite \
82 BOOST_TEST_LOG_FORMAT=xml
Roger Meier9e0f0742011-08-03 17:36:55 +000083
David Reiss351e22b2010-08-31 16:51:19 +000084TESTS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020085 $(check_PROGRAMS)
David Reiss351e22b2010-08-31 16:51:19 +000086
87UnitTests_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020088 UnitTestMain.cpp \
89 TMemoryBufferTest.cpp \
90 TBufferBaseTest.cpp \
91 Base64Test.cpp \
92 ToStringTest.cpp \
93 TypedefTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +000094
95if !WITH_BOOSTTHREADS
96UnitTests_SOURCES += \
Roger Meier3fc48192011-12-11 21:05:35 +000097 RWMutexStarveTest.cpp
Roger Meier12d70532011-12-14 23:35:28 +000098endif
David Reiss351e22b2010-08-31 16:51:19 +000099
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000100UnitTests_LDADD = \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000101 libtestgencpp.la \
Roger Meier73b58a22014-05-11 17:39:34 +0200102 -l:libboost_unit_test_framework.a
David Reiss351e22b2010-08-31 16:51:19 +0000103
David Reiss35dc7692010-10-06 17:10:19 +0000104TransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200105 TransportTest.cpp
David Reiss35dc7692010-10-06 17:10:19 +0000106
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000107TransportTest_LDADD = \
108 libtestgencpp.la \
109 $(top_builddir)/lib/cpp/libthriftz.la \
Roger Meier73b58a22014-05-11 17:39:34 +0200110 -l:libboost_unit_test_framework.a \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000111 -lz
David Reiss35dc7692010-10-06 17:10:19 +0000112
David Reiss9a961e72010-10-06 17:10:23 +0000113ZlibTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200114 ZlibTest.cpp
David Reiss9a961e72010-10-06 17:10:23 +0000115
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000116ZlibTest_LDADD = \
117 libtestgencpp.la \
118 $(top_builddir)/lib/cpp/libthriftz.la \
Roger Meier73b58a22014-05-11 17:39:34 +0200119 -l:libboost_unit_test_framework.a \
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000120 -lz
David Reiss9a961e72010-10-06 17:10:23 +0000121
Jens Geyerae0b22c2014-09-04 23:04:21 +0200122EnumTest_SOURCES = \
123 EnumTest.cpp
124
125EnumTest_LDADD = \
126 libtestgencpp.la \
Jens Geyer089bcd32014-09-11 22:36:41 +0200127 -l:libboost_unit_test_framework.a
Jens Geyerae0b22c2014-09-04 23:04:21 +0200128
David Reiss709b69f2010-10-06 17:10:30 +0000129TFileTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200130 TFileTransportTest.cpp
David Reiss709b69f2010-10-06 17:10:30 +0000131
Christian Lavoie4f42ef72010-11-04 18:51:42 +0000132TFileTransportTest_LDADD = \
133 libtestgencpp.la \
Roger Meier73b58a22014-05-11 17:39:34 +0200134 -l:libboost_unit_test_framework.a
David Reiss709b69f2010-10-06 17:10:30 +0000135
David Reiss351e22b2010-08-31 16:51:19 +0000136#
137# TFDTransportTest
138#
139TFDTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200140 TFDTransportTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000141
142TFDTransportTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200143 $(top_builddir)/lib/cpp/libthrift.la
David Reiss351e22b2010-08-31 16:51:19 +0000144
145
146#
147# TPipedTransportTest
148#
149TPipedTransportTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200150 TPipedTransportTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000151
152TPipedTransportTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200153 $(top_builddir)/lib/cpp/libthrift.la
David Reiss351e22b2010-08-31 16:51:19 +0000154
155#
156# AllProtocolsTest
157#
158AllProtocolsTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200159 AllProtocolTests.cpp \
160 AllProtocolTests.tcc \
161 GenericHelpers.h
David Reiss351e22b2010-08-31 16:51:19 +0000162
163AllProtocolsTest_LDADD = libtestgencpp.la
164
165#
166# DebugProtoTest
167#
168DebugProtoTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200169 DebugProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000170
171DebugProtoTest_LDADD = libtestgencpp.la
172
173
174#
175# JSONProtoTest
176#
177JSONProtoTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200178 JSONProtoTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000179
180JSONProtoTest_LDADD = libtestgencpp.la
181
182#
183# OptionalRequiredTest
184#
185OptionalRequiredTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200186 OptionalRequiredTest.cpp
David Reiss351e22b2010-08-31 16:51:19 +0000187
188OptionalRequiredTest_LDADD = libtestgencpp.la
189
David Reisse71115b2010-10-06 17:09:56 +0000190#
jfarrelle0e83162014-04-08 22:45:01 -0400191# OptionalRequiredTest
192#
193RecursiveTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200194 RecursiveTest.cpp
jfarrelle0e83162014-04-08 22:45:01 -0400195
196RecursiveTest_LDADD = libtestgencpp.la
197
198#
David Reisse71115b2010-10-06 17:09:56 +0000199# SpecializationTest
200#
201SpecializationTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200202 SpecializationTest.cpp
David Reisse71115b2010-10-06 17:09:56 +0000203
204SpecializationTest_LDADD = libtestgencpp.la
205
Roger Meier2b1a5282012-05-11 10:12:39 +0000206concurrency_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200207 concurrency/Tests.cpp \
208 concurrency/ThreadFactoryTests.h \
209 concurrency/ThreadManagerTests.h \
210 concurrency/TimerManagerTests.h
David Reiss351e22b2010-08-31 16:51:19 +0000211
Roger Meier2b1a5282012-05-11 10:12:39 +0000212concurrency_test_LDADD = \
213 $(top_builddir)/lib/cpp/libthrift.la
214
Roger Meier63fcb7e2014-06-15 21:48:59 +0200215link_test_SOURCES = \
216 link/LinkTest.cpp \
217 link/TemplatedService1.cpp \
218 link/TemplatedService2.cpp
219
Roger Meier2b1a5282012-05-11 10:12:39 +0000220processor_test_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200221 processor/ProcessorTest.cpp \
222 processor/EventLog.cpp \
223 processor/ServerThread.cpp \
224 processor/EventLog.h \
225 processor/Handlers.h \
226 processor/ServerThread.h
Roger Meier2b1a5282012-05-11 10:12:39 +0000227
228processor_test_LDADD = libprocessortest.la \
229 $(top_builddir)/lib/cpp/libthrift.la \
230 $(top_builddir)/lib/cpp/libthriftnb.la \
231 $(BOOST_LDFLAGS) \
232 -levent \
Roger Meier73b58a22014-05-11 17:39:34 +0200233 -l:libboost_unit_test_framework.a
Alan Dunnbee7b732014-07-26 13:48:43 -0500234
235OpenSSLManualInitTest_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200236 OpenSSLManualInitTest.cpp
Alan Dunnbee7b732014-07-26 13:48:43 -0500237
238OpenSSLManualInitTest_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200239 $(top_builddir)/lib/cpp/libthrift.la \
240 -l:libboost_unit_test_framework.a
Alan Dunnbee7b732014-07-26 13:48:43 -0500241
David Reiss351e22b2010-08-31 16:51:19 +0000242#
243# Common thrift code generation rules
244#
245THRIFT = $(top_builddir)/compiler/cpp/thrift
246
247gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200248 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000249
Jens Geyerae0b22c2014-09-04 23:04:21 +0200250gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h: $(top_srcdir)/test/EnumTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200251 $(THRIFT) --gen cpp $<
Jens Geyerae0b22c2014-09-04 23:04:21 +0200252
Jens Geyer089bcd32014-09-11 22:36:41 +0200253gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h: $(top_srcdir)/test/TypedefTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200254 $(THRIFT) --gen cpp $<
Jens Geyer089bcd32014-09-11 22:36:41 +0200255
David Reiss351e22b2010-08-31 16:51:19 +0000256gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200257 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000258
jfarrelle0e83162014-04-08 22:45:01 -0400259gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200260 $(THRIFT) --gen cpp $<
jfarrelle0e83162014-04-08 22:45:01 -0400261
David Reiss351e22b2010-08-31 16:51:19 +0000262gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +0200263 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000264
265gen-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 +0200266 $(THRIFT) --gen cpp:dense $<
David Reiss351e22b2010-08-31 16:51:19 +0000267
Roger Meier6f28c042014-11-01 20:31:44 +0100268gen-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 +0200269 $(THRIFT) --gen cpp:templates,cob_style $<
Roger Meier2b1a5282012-05-11 10:12:39 +0000270
Konrad Grochowski1ff4a972014-09-19 23:57:57 +0200271AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src
Roger Meier38315782011-11-06 11:29:41 +0000272AM_LDFLAGS = $(BOOST_LDFLAGS)
Roger Meiercb0754d2014-10-21 21:28:04 +0200273AM_CXXFLAGS = -Wall -Wextra -pedantic
David Reiss351e22b2010-08-31 16:51:19 +0000274
275clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +0200276 $(RM) -r gen-cpp
David Reiss351e22b2010-08-31 16:51:19 +0000277
278EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +0200279 DenseProtoTest.cpp \
280 ThriftTest_extras.cpp \
281 DebugProtoTest_extras.cpp \
282 concurrency \
283 processor