blob: 6391a87928587300e3b39a97895bdb7127f6219e [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#
19
20noinst_LTLIBRARIES = libtestgencpp.la
21nodist_libtestgencpp_la_SOURCES = \
22 gen-cpp/DebugProtoTest_types.cpp \
23 gen-cpp/OptionalRequiredTest_types.cpp \
24 gen-cpp/DebugProtoTest_types.cpp \
25 gen-cpp/ThriftTest_types.cpp \
26 gen-cpp/DebugProtoTest_types.h \
27 gen-cpp/OptionalRequiredTest_types.h \
28 gen-cpp/ThriftTest_types.h \
29 ThriftTest_extras.cpp \
30 DebugProtoTest_extras.cpp
31
32ThriftTest_extras.o: gen-cpp/ThriftTest_types.h
33DebugProtoTest_extras.o: gen-cpp/DebugProtoTest_types.h
34
35libtestgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
36
37noinst_PROGRAMS = Benchmark
38
39Benchmark_SOURCES = \
40 Benchmark.cpp
41
42Benchmark_LDADD = libtestgencpp.la
43
44check_PROGRAMS = \
45 TFDTransportTest \
46 TPipedTransportTest \
47 DebugProtoTest \
48 JSONProtoTest \
49 OptionalRequiredTest \
David Reisse71115b2010-10-06 17:09:56 +000050 SpecializationTest \
David Reiss351e22b2010-08-31 16:51:19 +000051 AllProtocolsTest \
David Reiss35dc7692010-10-06 17:10:19 +000052 TransportTest \
David Reiss9a961e72010-10-06 17:10:23 +000053 ZlibTest \
David Reiss709b69f2010-10-06 17:10:30 +000054 TFileTransportTest \
David Reiss351e22b2010-08-31 16:51:19 +000055 UnitTests
56
Roger Meier9e0f0742011-08-03 17:36:55 +000057TESTS_ENVIRONMENT= \
58 BOOST_TEST_LOG_SINK=tests.xml \
59 BOOST_TEST_LOG_LEVEL=test_suite \
60 BOOST_TEST_LOG_FORMAT=xml
61
David Reiss351e22b2010-08-31 16:51:19 +000062TESTS = \
63 $(check_PROGRAMS)
64
65UnitTests_SOURCES = \
66 UnitTestMain.cpp \
67 TMemoryBufferTest.cpp \
68 TBufferBaseTest.cpp
69
Christian Lavoie4f42ef72010-11-04 18:51:42 +000070UnitTests_LDADD = \
71 $(BOOST_LDFLAGS) \
72 libtestgencpp.la \
73 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a
David Reiss351e22b2010-08-31 16:51:19 +000074
David Reiss35dc7692010-10-06 17:10:19 +000075TransportTest_SOURCES = \
76 TransportTest.cpp
77
Christian Lavoie4f42ef72010-11-04 18:51:42 +000078TransportTest_LDADD = \
79 libtestgencpp.la \
80 $(top_builddir)/lib/cpp/libthriftz.la \
81 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a \
82 -lz
David Reiss35dc7692010-10-06 17:10:19 +000083
David Reiss9a961e72010-10-06 17:10:23 +000084ZlibTest_SOURCES = \
85 ZlibTest.cpp
86
Christian Lavoie4f42ef72010-11-04 18:51:42 +000087ZlibTest_LDADD = \
88 libtestgencpp.la \
89 $(top_builddir)/lib/cpp/libthriftz.la \
90 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a \
91 -lz
David Reiss9a961e72010-10-06 17:10:23 +000092
David Reiss709b69f2010-10-06 17:10:30 +000093TFileTransportTest_SOURCES = \
94 TFileTransportTest.cpp
95
Christian Lavoie4f42ef72010-11-04 18:51:42 +000096TFileTransportTest_LDADD = \
97 libtestgencpp.la \
98 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a
David Reiss709b69f2010-10-06 17:10:30 +000099
David Reiss351e22b2010-08-31 16:51:19 +0000100#
101# TFDTransportTest
102#
103TFDTransportTest_SOURCES = \
104 TFDTransportTest.cpp
105
106TFDTransportTest_LDADD = \
107 $(top_builddir)/lib/cpp/libthrift.la
108
109
110#
111# TPipedTransportTest
112#
113TPipedTransportTest_SOURCES = \
114 TPipedTransportTest.cpp
115
116TPipedTransportTest_LDADD = \
117 $(top_builddir)/lib/cpp/libthrift.la
118
119#
120# AllProtocolsTest
121#
122AllProtocolsTest_SOURCES = \
123 AllProtocolTests.cpp \
124 AllProtocolTests.tcc \
125 GenericHelpers.h
126
127AllProtocolsTest_LDADD = libtestgencpp.la
128
129#
130# DebugProtoTest
131#
132DebugProtoTest_SOURCES = \
133 DebugProtoTest.cpp
134
135DebugProtoTest_LDADD = libtestgencpp.la
136
137
138#
139# JSONProtoTest
140#
141JSONProtoTest_SOURCES = \
142 JSONProtoTest.cpp
143
144JSONProtoTest_LDADD = libtestgencpp.la
145
146#
147# OptionalRequiredTest
148#
149OptionalRequiredTest_SOURCES = \
150 OptionalRequiredTest.cpp
151
152OptionalRequiredTest_LDADD = libtestgencpp.la
153
David Reisse71115b2010-10-06 17:09:56 +0000154#
155# SpecializationTest
156#
157SpecializationTest_SOURCES = \
158 SpecializationTest.cpp
159
160SpecializationTest_LDADD = libtestgencpp.la
161
David Reiss351e22b2010-08-31 16:51:19 +0000162
163#
164# Common thrift code generation rules
165#
166THRIFT = $(top_builddir)/compiler/cpp/thrift
167
168gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift
169 $(THRIFT) --gen cpp:dense $<
170
171gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
172 $(THRIFT) --gen cpp:dense $<
173
174gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
175 $(THRIFT) --gen cpp:dense $<
176
177gen-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
178 $(THRIFT) --gen cpp:dense $<
179
180INCLUDES = \
181 -I$(top_srcdir)/lib/cpp/src
182
183AM_CPPFLAGS = $(BOOST_CPPFLAGS)
Christian Lavoieaf65f1b2010-11-24 21:58:05 +0000184AM_CXXFLAGS = -Wall
David Reiss351e22b2010-08-31 16:51:19 +0000185
186clean-local:
187 $(RM) -r gen-cpp
188
189EXTRA_DIST = \
David Reiss351e22b2010-08-31 16:51:19 +0000190 DenseProtoTest.cpp \
191 ThriftTest_extras.cpp \
192 DebugProtoTest_extras.cpp