blob: 0c6d265464fc3553ba22d45132f013adbbf613d8 [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 = \
Christian Lavoie4f42ef72010-11-04 18:51:42 +000071 libtestgencpp.la \
72 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a
David Reiss351e22b2010-08-31 16:51:19 +000073
David Reiss35dc7692010-10-06 17:10:19 +000074TransportTest_SOURCES = \
75 TransportTest.cpp
76
Christian Lavoie4f42ef72010-11-04 18:51:42 +000077TransportTest_LDADD = \
78 libtestgencpp.la \
79 $(top_builddir)/lib/cpp/libthriftz.la \
80 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a \
81 -lz
David Reiss35dc7692010-10-06 17:10:19 +000082
David Reiss9a961e72010-10-06 17:10:23 +000083ZlibTest_SOURCES = \
84 ZlibTest.cpp
85
Christian Lavoie4f42ef72010-11-04 18:51:42 +000086ZlibTest_LDADD = \
87 libtestgencpp.la \
88 $(top_builddir)/lib/cpp/libthriftz.la \
89 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a \
90 -lz
David Reiss9a961e72010-10-06 17:10:23 +000091
David Reiss709b69f2010-10-06 17:10:30 +000092TFileTransportTest_SOURCES = \
93 TFileTransportTest.cpp
94
Christian Lavoie4f42ef72010-11-04 18:51:42 +000095TFileTransportTest_LDADD = \
96 libtestgencpp.la \
97 $(BOOST_ROOT_PATH)/lib/libboost_unit_test_framework.a
David Reiss709b69f2010-10-06 17:10:30 +000098
David Reiss351e22b2010-08-31 16:51:19 +000099#
100# TFDTransportTest
101#
102TFDTransportTest_SOURCES = \
103 TFDTransportTest.cpp
104
105TFDTransportTest_LDADD = \
106 $(top_builddir)/lib/cpp/libthrift.la
107
108
109#
110# TPipedTransportTest
111#
112TPipedTransportTest_SOURCES = \
113 TPipedTransportTest.cpp
114
115TPipedTransportTest_LDADD = \
116 $(top_builddir)/lib/cpp/libthrift.la
117
118#
119# AllProtocolsTest
120#
121AllProtocolsTest_SOURCES = \
122 AllProtocolTests.cpp \
123 AllProtocolTests.tcc \
124 GenericHelpers.h
125
126AllProtocolsTest_LDADD = libtestgencpp.la
127
128#
129# DebugProtoTest
130#
131DebugProtoTest_SOURCES = \
132 DebugProtoTest.cpp
133
134DebugProtoTest_LDADD = libtestgencpp.la
135
136
137#
138# JSONProtoTest
139#
140JSONProtoTest_SOURCES = \
141 JSONProtoTest.cpp
142
143JSONProtoTest_LDADD = libtestgencpp.la
144
145#
146# OptionalRequiredTest
147#
148OptionalRequiredTest_SOURCES = \
149 OptionalRequiredTest.cpp
150
151OptionalRequiredTest_LDADD = libtestgencpp.la
152
David Reisse71115b2010-10-06 17:09:56 +0000153#
154# SpecializationTest
155#
156SpecializationTest_SOURCES = \
157 SpecializationTest.cpp
158
159SpecializationTest_LDADD = libtestgencpp.la
160
David Reiss351e22b2010-08-31 16:51:19 +0000161
162#
163# Common thrift code generation rules
164#
165THRIFT = $(top_builddir)/compiler/cpp/thrift
166
167gen-cpp/DebugProtoTest_types.cpp gen-cpp/DebugProtoTest_types.h: $(top_srcdir)/test/DebugProtoTest.thrift
168 $(THRIFT) --gen cpp:dense $<
169
170gen-cpp/OptionalRequiredTest_types.cpp gen-cpp/OptionalRequiredTest_types.h: $(top_srcdir)/test/OptionalRequiredTest.thrift
171 $(THRIFT) --gen cpp:dense $<
172
173gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp: $(top_srcdir)/test/StressTest.thrift
174 $(THRIFT) --gen cpp:dense $<
175
176gen-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
177 $(THRIFT) --gen cpp:dense $<
178
179INCLUDES = \
180 -I$(top_srcdir)/lib/cpp/src
181
182AM_CPPFLAGS = $(BOOST_CPPFLAGS)
Roger Meier38315782011-11-06 11:29:41 +0000183AM_LDFLAGS = $(BOOST_LDFLAGS)
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