1# 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# 19AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc 20 21BUILT_SOURCES = gen-cpp/AnnotationTest_types.h \ 22 gen-cpp/DebugProtoTest_types.h \ 23 gen-cpp/EnumTest_types.h \ 24 gen-cpp/OptionalRequiredTest_types.h \ 25 gen-cpp/Recursive_types.h \ 26 gen-cpp/ThriftTest_types.h \ 27 gen-cpp/TypedefTest_types.h \ 28 gen-cpp/ChildService.h \ 29 gen-cpp/EmptyService.h \ 30 gen-cpp/ParentService.h \ 31 gen-cpp/OneWayTest_types.h \ 32 gen-cpp/OneWayService.h \ 33 gen-cpp/proc_types.h 34 35noinst_LTLIBRARIES = libtestgencpp.la libprocessortest.la 36nodist_libtestgencpp_la_SOURCES = \ 37 gen-cpp/AnnotationTest_types.cpp \ 38 gen-cpp/AnnotationTest_types.h \ 39 gen-cpp/DebugProtoTest_types.cpp \ 40 gen-cpp/DebugProtoTest_types.h \ 41 gen-cpp/DoubleConstantsTest_constants.cpp \ 42 gen-cpp/DoubleConstantsTest_constants.h \ 43 gen-cpp/EnumTest_types.cpp \ 44 gen-cpp/EnumTest_types.h \ 45 gen-cpp/OptionalRequiredTest_types.cpp \ 46 gen-cpp/OptionalRequiredTest_types.h \ 47 gen-cpp/Recursive_types.cpp \ 48 gen-cpp/Recursive_types.h \ 49 gen-cpp/ThriftTest_types.cpp \ 50 gen-cpp/ThriftTest_types.h \ 51 gen-cpp/ThriftTest_constants.cpp \ 52 gen-cpp/ThriftTest_constants.h \ 53 gen-cpp/TypedefTest_types.cpp \ 54 gen-cpp/TypedefTest_types.h \ 55 gen-cpp/OneWayService.cpp \ 56 gen-cpp/OneWayTest_types.h \ 57 gen-cpp/OneWayService.h \ 58 ThriftTest_extras.cpp \ 59 DebugProtoTest_extras.cpp 60 61nodist_libprocessortest_la_SOURCES = \ 62 gen-cpp/ChildService.cpp \ 63 gen-cpp/ChildService.h \ 64 gen-cpp/EmptyService.cpp \ 65 gen-cpp/EmptyService.h \ 66 gen-cpp/ParentService.cpp \ 67 gen-cpp/ParentService.h \ 68 gen-cpp/proc_types.cpp \ 69 gen-cpp/proc_types.h 70 71ThriftTest_extras.o: gen-cpp/ThriftTest_types.h 72DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h 73 74libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la 75 76noinst_PROGRAMS = Benchmark \ 77 concurrency_test 78 79Benchmark_SOURCES = \ 80 Benchmark.cpp 81 82Benchmark_LDADD = libtestgencpp.la 83 84check_PROGRAMS = \ 85 UnitTests \ 86 TFDTransportTest \ 87 TPipedTransportTest \ 88 DebugProtoTest \ 89 JSONProtoTest \ 90 OptionalRequiredTest \ 91 RecursiveTest \ 92 SpecializationTest \ 93 AllProtocolsTest \ 94 TransportTest \ 95 TInterruptTest \ 96 TServerIntegrationTest \ 97 SecurityTest \ 98 SecurityFromBufferTest \ 99 ZlibTest \ 100 TFileTransportTest \ 101 link_test \ 102 OpenSSLManualInitTest \ 103 EnumTest \ 104 RenderedDoubleConstantsTest \ 105 AnnotationTest 106 107if AMX_HAVE_LIBEVENT 108noinst_PROGRAMS += \ 109 processor_test 110check_PROGRAMS += \ 111 TNonblockingServerTest \ 112 TNonblockingSSLServerTest 113endif 114 115TESTS_ENVIRONMENT= \ 116 BOOST_TEST_LOG_SINK=tests.xml \ 117 BOOST_TEST_LOG_LEVEL=test_suite \ 118 BOOST_TEST_LOG_FORMAT=XML 119 120TESTS = \ 121 $(check_PROGRAMS) 122 123UnitTests_SOURCES = \ 124 UnitTestMain.cpp \ 125 OneWayHTTPTest.cpp \ 126 TMemoryBufferTest.cpp \ 127 TBufferBaseTest.cpp \ 128 Base64Test.cpp \ 129 ToStringTest.cpp \ 130 TypedefTest.cpp \ 131 TServerSocketTest.cpp \ 132 TServerTransportTest.cpp \ 133 TTransportCheckThrow.h \ 134 ThrifttReadCheckTests.cpp 135 136UnitTests_LDADD = \ 137 libtestgencpp.la \ 138 $(BOOST_TEST_LDADD) \ 139 $(BOOST_SYSTEM_LDADD) \ 140 $(BOOST_THREAD_LDADD) 141 142TInterruptTest_SOURCES = \ 143 TSocketInterruptTest.cpp \ 144 TSSLSocketInterruptTest.cpp 145 146TInterruptTest_LDADD = \ 147 libtestgencpp.la \ 148 $(BOOST_TEST_LDADD) \ 149 $(BOOST_FILESYSTEM_LDADD) \ 150 $(BOOST_CHRONO_LDADD) \ 151 $(BOOST_SYSTEM_LDADD) \ 152 $(BOOST_THREAD_LDADD) 153 154TServerIntegrationTest_SOURCES = \ 155 TServerIntegrationTest.cpp 156 157TServerIntegrationTest_LDADD = \ 158 libtestgencpp.la \ 159 libprocessortest.la \ 160 $(BOOST_TEST_LDADD) \ 161 $(BOOST_SYSTEM_LDADD) \ 162 $(BOOST_THREAD_LDADD) 163 164SecurityTest_SOURCES = \ 165 SecurityTest.cpp 166 167SecurityTest_LDADD = \ 168 libtestgencpp.la \ 169 libprocessortest.la \ 170 $(BOOST_TEST_LDADD) \ 171 $(BOOST_FILESYSTEM_LDADD) \ 172 $(BOOST_SYSTEM_LDADD) \ 173 $(BOOST_THREAD_LDADD) 174 175SecurityFromBufferTest_SOURCES = \ 176 SecurityFromBufferTest.cpp 177 178SecurityFromBufferTest_LDADD = \ 179 libtestgencpp.la \ 180 libprocessortest.la \ 181 $(BOOST_TEST_LDADD) \ 182 $(BOOST_FILESYSTEM_LDADD) \ 183 $(BOOST_SYSTEM_LDADD) \ 184 $(BOOST_THREAD_LDADD) 185 186TransportTest_SOURCES = \ 187 TransportTest.cpp 188 189TransportTest_LDADD = \ 190 libtestgencpp.la \ 191 $(top_builddir)/lib/cpp/libthriftz.la \ 192 $(BOOST_TEST_LDADD) \ 193 -lz 194 195ZlibTest_SOURCES = \ 196 ZlibTest.cpp 197 198ZlibTest_LDADD = \ 199 libtestgencpp.la \ 200 $(top_builddir)/lib/cpp/libthriftz.la \ 201 $(BOOST_TEST_LDADD) \ 202 -lz 203 204EnumTest_SOURCES = \ 205 EnumTest.cpp 206 207EnumTest_LDADD = \ 208 libtestgencpp.la \ 209 $(BOOST_TEST_LDADD) 210 211RenderedDoubleConstantsTest_SOURCES = RenderedDoubleConstantsTest.cpp 212 213RenderedDoubleConstantsTest_LDADD = libtestgencpp.la $(BOOST_TEST_LDADD) 214 215AnnotationTest_SOURCES = \ 216 AnnotationTest.cpp 217 218AnnotationTest_LDADD = \ 219 libtestgencpp.la \ 220 $(BOOST_TEST_LDADD) 221 222TFileTransportTest_SOURCES = \ 223 TFileTransportTest.cpp 224 225TFileTransportTest_LDADD = \ 226 libtestgencpp.la \ 227 $(BOOST_TEST_LDADD) 228 229# 230# TFDTransportTest 231# 232TFDTransportTest_SOURCES = \ 233 TFDTransportTest.cpp 234 235TFDTransportTest_LDADD = \ 236 $(top_builddir)/lib/cpp/libthrift.la \ 237 $(BOOST_TEST_LDADD) 238 239 240# 241# TPipedTransportTest 242# 243TPipedTransportTest_SOURCES = \ 244 TPipedTransportTest.cpp \ 245 TPipeInterruptTest.cpp 246 247TPipedTransportTest_LDADD = \ 248 libtestgencpp.la \ 249 $(top_builddir)/lib/cpp/libthrift.la \ 250 $(BOOST_TEST_LDADD) \ 251 $(BOOST_SYSTEM_LDADD) \ 252 $(BOOST_THREAD_LDADD) 253 254# 255# AllProtocolsTest 256# 257AllProtocolsTest_SOURCES = \ 258 AllProtocolTests.cpp \ 259 AllProtocolTests.tcc \ 260 GenericHelpers.h 261 262AllProtocolsTest_LDADD = \ 263 libtestgencpp.la \ 264 $(BOOST_TEST_LDADD) 265 266# 267# DebugProtoTest 268# 269DebugProtoTest_SOURCES = \ 270 DebugProtoTest.cpp 271 272DebugProtoTest_LDADD = \ 273 libtestgencpp.la \ 274 $(BOOST_TEST_LDADD) 275 276 277# 278# JSONProtoTest 279# 280JSONProtoTest_SOURCES = \ 281 JSONProtoTest.cpp 282 283JSONProtoTest_LDADD = \ 284 libtestgencpp.la \ 285 $(BOOST_TEST_LDADD) 286 287# 288# TNonblockingServerTest 289# 290TNonblockingServerTest_SOURCES = TNonblockingServerTest.cpp 291 292TNonblockingServerTest_LDADD = libprocessortest.la \ 293 $(top_builddir)/lib/cpp/libthrift.la \ 294 $(top_builddir)/lib/cpp/libthriftnb.la \ 295 $(BOOST_TEST_LDADD) \ 296 $(BOOST_LDFLAGS) \ 297 $(LIBEVENT_LIBS) 298# 299# TNonblockingSSLServerTest 300# 301TNonblockingSSLServerTest_SOURCES = TNonblockingSSLServerTest.cpp 302 303TNonblockingSSLServerTest_LDADD = libprocessortest.la \ 304 $(top_builddir)/lib/cpp/libthrift.la \ 305 $(top_builddir)/lib/cpp/libthriftnb.la \ 306 $(BOOST_TEST_LDADD) \ 307 $(BOOST_LDFLAGS) \ 308 $(BOOST_FILESYSTEM_LDADD) \ 309 $(BOOST_CHRONO_LDADD) \ 310 $(BOOST_SYSTEM_LDADD) \ 311 $(BOOST_THREAD_LDADD) \ 312 $(LIBEVENT_LIBS) 313 314# 315# OptionalRequiredTest 316# 317OptionalRequiredTest_SOURCES = \ 318 OptionalRequiredTest.cpp 319 320OptionalRequiredTest_LDADD = \ 321 libtestgencpp.la \ 322 $(BOOST_TEST_LDADD) 323 324# 325# OptionalRequiredTest 326# 327RecursiveTest_SOURCES = \ 328 RecursiveTest.cpp 329 330RecursiveTest_LDADD = \ 331 libtestgencpp.la \ 332 $(BOOST_TEST_LDADD) 333 334# 335# SpecializationTest 336# 337SpecializationTest_SOURCES = \ 338 SpecializationTest.cpp 339 340SpecializationTest_LDADD = \ 341 libtestgencpp.la \ 342 $(BOOST_TEST_LDADD) 343 344concurrency_test_SOURCES = \ 345 concurrency/Tests.cpp \ 346 concurrency/ThreadFactoryTests.h \ 347 concurrency/ThreadManagerTests.h \ 348 concurrency/TimerManagerTests.h 349 350concurrency_test_LDADD = \ 351 $(top_builddir)/lib/cpp/libthrift.la 352 353link_test_SOURCES = \ 354 link/LinkTest.cpp \ 355 link/TemplatedService1.cpp \ 356 link/TemplatedService2.cpp 357 358processor_test_SOURCES = \ 359 processor/ProcessorTest.cpp \ 360 processor/EventLog.cpp \ 361 processor/ServerThread.cpp \ 362 processor/EventLog.h \ 363 processor/Handlers.h \ 364 processor/ServerThread.h 365 366processor_test_LDADD = libprocessortest.la \ 367 $(top_builddir)/lib/cpp/libthrift.la \ 368 $(top_builddir)/lib/cpp/libthriftnb.la \ 369 $(BOOST_TEST_LDADD) \ 370 $(BOOST_LDFLAGS) \ 371 $(LIBEVENT_LIBS) 372 373OpenSSLManualInitTest_SOURCES = \ 374 OpenSSLManualInitTest.cpp 375 376OpenSSLManualInitTest_LDADD = \ 377 $(top_builddir)/lib/cpp/libthrift.la \ 378 $(BOOST_TEST_LDADD) \ 379 $(OPENSSL_LDFLAGS) \ 380 $(OPENSSL_LIBS) 381 382# 383# Common thrift code generation rules 384# 385 386gen-cpp/AnnotationTest_constants.cpp gen-cpp/AnnotationTest_constants.h gen-cpp/AnnotationTest_types.cpp gen-cpp/AnnotationTest_types.h: $(top_srcdir)/test/AnnotationTest.thrift 387 $(THRIFT) --gen cpp $< 388 389gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h gen-cpp/EmptyService.cpp gen-cpp/EmptyService.h: $(top_srcdir)/test/v0.16/DebugProtoTest.thrift 390 $(THRIFT) --gen cpp $< 391 392gen-cpp/DoubleConstantsTest_constants.cpp gen-cpp/DoubleConstantsTest_constants.h: $(top_srcdir)/test/DoubleConstantsTest.thrift 393 $(THRIFT) --gen cpp $< 394 395 396gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h: $(top_srcdir)/test/EnumTest.thrift 397 $(THRIFT) --gen cpp $< 398 399gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h: $(top_srcdir)/test/TypedefTest.thrift 400 $(THRIFT) --gen cpp $< 401 402gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift 403 $(THRIFT) --gen cpp $< 404 405gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift 406 $(THRIFT) --gen cpp $< 407 408gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift 409 $(THRIFT) --gen cpp $< 410 411gen-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/v0.16/ThriftTest.thrift 412 $(THRIFT) --gen cpp $< 413 414gen-cpp/OneWayService.cpp gen-cpp/OneWayTest_types.h gen-cpp/OneWayService.h: OneWayTest.thrift 415 $(THRIFT) --gen cpp $< 416 417gen-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 418 $(THRIFT) --gen cpp:templates,cob_style $< 419 420AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -I$(top_srcdir)/lib/cpp/src/thrift -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I. 421AM_LDFLAGS = $(BOOST_LDFLAGS) 422AM_CXXFLAGS = -Wall -Wextra -pedantic 423 424clean-local: 425 $(RM) gen-cpp/* 426 427EXTRA_DIST = \ 428 concurrency \ 429 processor \ 430 qt \ 431 CMakeLists.txt \ 432 DebugProtoTest_extras.cpp \ 433 ThriftTest_extras.cpp \ 434 OneWayTest.thrift 435