Makefile.am 8.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
AUTOMAKE_OPTIONS = subdir-objects serial-tests

BUILT_SOURCES = gen-cpp/DebugProtoTest_types.h \
                gen-cpp/EnumTest_types.h \
                gen-cpp/OptionalRequiredTest_types.h \
                gen-cpp/Recursive_types.h \
                gen-cpp/ThriftTest_types.h \
                gen-cpp/TypedefTest_types.h \
                gen-cpp/ChildService.h \
                gen-cpp/EmptyService.h \
                gen-cpp/ParentService.h \
                gen-cpp/proc_types.h

noinst_LTLIBRARIES = libtestgencpp.la libprocessortest.la
nodist_libtestgencpp_la_SOURCES = \
	gen-cpp/DebugProtoTest_types.cpp \
	gen-cpp/DebugProtoTest_types.h \
	gen-cpp/EnumTest_types.cpp \
	gen-cpp/EnumTest_types.h \
	gen-cpp/OptionalRequiredTest_types.cpp \
	gen-cpp/OptionalRequiredTest_types.h \
	gen-cpp/Recursive_types.cpp \
	gen-cpp/Recursive_types.h \
	gen-cpp/ThriftTest_types.cpp \
	gen-cpp/ThriftTest_types.h \
	gen-cpp/ThriftTest_constants.cpp \
	gen-cpp/ThriftTest_constants.h \
	gen-cpp/TypedefTest_types.cpp \
	gen-cpp/TypedefTest_types.h \
	ThriftTest_extras.cpp \
	DebugProtoTest_extras.cpp

nodist_libprocessortest_la_SOURCES = \
	gen-cpp/ChildService.cpp \
	gen-cpp/ChildService.h \
	gen-cpp/EmptyService.cpp \
	gen-cpp/EmptyService.h \
	gen-cpp/ParentService.cpp \
	gen-cpp/ParentService.h \
	gen-cpp/proc_types.cpp \
	gen-cpp/proc_types.h

ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h

libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la

noinst_PROGRAMS = Benchmark \
	concurrency_test

Benchmark_SOURCES = \
	Benchmark.cpp

Benchmark_LDADD = libtestgencpp.la

check_PROGRAMS = \
	UnitTests \
	TFDTransportTest \
	TPipedTransportTest \
	DebugProtoTest \
	JSONProtoTest \
	OptionalRequiredTest \
	RecursiveTest \
	SpecializationTest \
	AllProtocolsTest \
	TransportTest \
	TInterruptTest \
	TServerIntegrationTest \
	SecurityTest \
	ZlibTest \
	TFileTransportTest \
	link_test \
	OpenSSLManualInitTest \
	EnumTest

if AMX_HAVE_LIBEVENT
noinst_PROGRAMS += \
	processor_test
check_PROGRAMS += \
	TNonblockingServerTest
endif

TESTS_ENVIRONMENT= \
	BOOST_TEST_LOG_SINK=tests.xml \
	BOOST_TEST_LOG_LEVEL=test_suite \
	BOOST_TEST_LOG_FORMAT=XML

TESTS = \
	$(check_PROGRAMS)

UnitTests_SOURCES = \
	UnitTestMain.cpp \
	TMemoryBufferTest.cpp \
	TBufferBaseTest.cpp \
	Base64Test.cpp \
	ToStringTest.cpp \
	TypedefTest.cpp \
	TServerSocketTest.cpp \
	TServerTransportTest.cpp \
	TTransportCheckThrow.h

if !WITH_BOOSTTHREADS
UnitTests_SOURCES += \
    RWMutexStarveTest.cpp
endif

UnitTests_LDADD = \
  libtestgencpp.la \
  $(BOOST_TEST_LDADD)

TInterruptTest_SOURCES = \
	TSocketInterruptTest.cpp \
	TSSLSocketInterruptTest.cpp

TInterruptTest_LDADD = \
  libtestgencpp.la \
  $(BOOST_TEST_LDADD) \
  $(BOOST_FILESYSTEM_LDADD) \
  $(BOOST_CHRONO_LDADD) \
  $(BOOST_SYSTEM_LDADD) \
  $(BOOST_THREAD_LDADD)

TServerIntegrationTest_SOURCES = \
	TServerIntegrationTest.cpp

TServerIntegrationTest_LDADD = \
  libtestgencpp.la \
  libprocessortest.la \
  $(BOOST_TEST_LDADD) \
  $(BOOST_SYSTEM_LDADD) \
  $(BOOST_THREAD_LDADD)

SecurityTest_SOURCES = \
	SecurityTest.cpp

SecurityTest_LDADD = \
  libtestgencpp.la \
  libprocessortest.la \
  $(BOOST_TEST_LDADD) \
  $(BOOST_FILESYSTEM_LDADD) \
  $(BOOST_SYSTEM_LDADD) \
  $(BOOST_THREAD_LDADD)

TransportTest_SOURCES = \
	TransportTest.cpp

TransportTest_LDADD = \
  libtestgencpp.la \
  $(top_builddir)/lib/cpp/libthriftz.la \
  $(BOOST_TEST_LDADD) \
  -lz

ZlibTest_SOURCES = \
	ZlibTest.cpp

ZlibTest_LDADD = \
  libtestgencpp.la \
  $(top_builddir)/lib/cpp/libthriftz.la \
  $(BOOST_TEST_LDADD) \
  -lz

EnumTest_SOURCES = \
  EnumTest.cpp

EnumTest_LDADD = \
  libtestgencpp.la \
  $(BOOST_TEST_LDADD)

TFileTransportTest_SOURCES = \
	TFileTransportTest.cpp

TFileTransportTest_LDADD = \
  libtestgencpp.la \
  $(BOOST_TEST_LDADD)

#
# TFDTransportTest
#
TFDTransportTest_SOURCES = \
	TFDTransportTest.cpp

TFDTransportTest_LDADD =  \
	$(top_builddir)/lib/cpp/libthrift.la \
	$(BOOST_TEST_LDADD)


#
# TPipedTransportTest
#
TPipedTransportTest_SOURCES = \
	TPipedTransportTest.cpp \
	TPipeInterruptTest.cpp

TPipedTransportTest_LDADD = \
	libtestgencpp.la \
	$(top_builddir)/lib/cpp/libthrift.la \
	$(BOOST_TEST_LDADD) \
	$(BOOST_SYSTEM_LDADD) \
	$(BOOST_THREAD_LDADD)

#
# AllProtocolsTest
#
AllProtocolsTest_SOURCES = \
	AllProtocolTests.cpp \
	AllProtocolTests.tcc \
	GenericHelpers.h

AllProtocolsTest_LDADD = \
  libtestgencpp.la \
  $(BOOST_TEST_LDADD)

#
# DebugProtoTest
#
DebugProtoTest_SOURCES = \
	DebugProtoTest.cpp

DebugProtoTest_LDADD = \
	libtestgencpp.la \
	$(BOOST_TEST_LDADD)


#
# JSONProtoTest
#
JSONProtoTest_SOURCES = \
	JSONProtoTest.cpp

JSONProtoTest_LDADD = \
	libtestgencpp.la \
	$(BOOST_TEST_LDADD)

#
# TNonblockingServerTest
#
TNonblockingServerTest_SOURCES = TNonblockingServerTest.cpp

TNonblockingServerTest_LDADD = libprocessortest.la \
                               $(top_builddir)/lib/cpp/libthrift.la \
                               $(top_builddir)/lib/cpp/libthriftnb.la \
                               $(BOOST_TEST_LDADD) \
                               $(BOOST_LDFLAGS) \
                               $(LIBEVENT_LIBS)

#
# OptionalRequiredTest
#
OptionalRequiredTest_SOURCES = \
	OptionalRequiredTest.cpp

OptionalRequiredTest_LDADD = \
	libtestgencpp.la \
	$(BOOST_TEST_LDADD)

#
# OptionalRequiredTest
#
RecursiveTest_SOURCES = \
	RecursiveTest.cpp

RecursiveTest_LDADD = \
	libtestgencpp.la \
	$(BOOST_TEST_LDADD)

#
# SpecializationTest
#
SpecializationTest_SOURCES = \
	SpecializationTest.cpp

SpecializationTest_LDADD = \
	libtestgencpp.la \
	$(BOOST_TEST_LDADD)

concurrency_test_SOURCES = \
	concurrency/Tests.cpp \
	concurrency/ThreadFactoryTests.h \
	concurrency/ThreadManagerTests.h \
	concurrency/TimerManagerTests.h

concurrency_test_LDADD = \
  $(top_builddir)/lib/cpp/libthrift.la

link_test_SOURCES = \
  link/LinkTest.cpp \
  link/TemplatedService1.cpp \
  link/TemplatedService2.cpp

processor_test_SOURCES = \
	processor/ProcessorTest.cpp \
	processor/EventLog.cpp \
	processor/ServerThread.cpp \
	processor/EventLog.h \
	processor/Handlers.h \
	processor/ServerThread.h

processor_test_LDADD = libprocessortest.la \
                       $(top_builddir)/lib/cpp/libthrift.la \
                       $(top_builddir)/lib/cpp/libthriftnb.la \
                       $(BOOST_TEST_LDADD) \
                       $(BOOST_LDFLAGS) \
                       $(LIBEVENT_LIBS)

OpenSSLManualInitTest_SOURCES = \
	OpenSSLManualInitTest.cpp

OpenSSLManualInitTest_LDADD = \
	$(top_builddir)/lib/cpp/libthrift.la \
	$(BOOST_TEST_LDADD) \
	$(OPENSSL_LDFLAGS) \
	$(OPENSSL_LIBS)

#
# Common thrift code generation rules
#
THRIFT = $(top_builddir)/compiler/cpp/thrift

gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h gen-cpp/EmptyService.cpp gen-cpp/EmptyService.h: $(top_srcdir)/test/DebugProtoTest.thrift
	$(THRIFT) --gen cpp $<

gen-cpp/EnumTest_types.cpp gen-cpp/EnumTest_types.h: $(top_srcdir)/test/EnumTest.thrift
	$(THRIFT) --gen cpp $<

gen-cpp/TypedefTest_types.cpp gen-cpp/TypedefTest_types.h: $(top_srcdir)/test/TypedefTest.thrift
	$(THRIFT) --gen cpp $<

gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
	$(THRIFT) --gen cpp $<

gen-cpp/Recursive_types.cpp gen-cpp/Recursive_types.h: $(top_srcdir)/test/Recursive.thrift
	$(THRIFT) --gen cpp $<

gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
	$(THRIFT) --gen cpp $<

gen-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
	$(THRIFT) --gen cpp $<

gen-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
	$(THRIFT) --gen cpp:templates,cob_style $<

AM_CPPFLAGS = $(BOOST_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -D__STDC_LIMIT_MACROS -I.
AM_LDFLAGS = $(BOOST_LDFLAGS)
AM_CXXFLAGS = -Wall -Wextra -pedantic

clean-local:
	$(RM) gen-cpp/*

EXTRA_DIST = \
	concurrency \
	processor \
	qt \
	CMakeLists.txt \
	DebugProtoTest_extras.cpp \
	ThriftTest_extras.cpp