]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/thrift/lib/c_glib/test/Makefile.am
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / thrift / lib / c_glib / test / Makefile.am
CommitLineData
f67539c2
TL
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
21SUBDIRS =
22
23BUILT_SOURCES = \
24 gen-c_glib/t_test_container_test_types.c \
25 gen-c_glib/t_test_container_test_types.h \
26 gen-c_glib/t_test_debug_proto_test_types.h \
27 gen-c_glib/t_test_empty_service.h \
28 gen-c_glib/t_test_inherited.h \
29 gen-c_glib/t_test_optional_required_test_types.h \
30 gen-c_glib/t_test_reverse_order_service.h \
31 gen-c_glib/t_test_second_service.h \
32 gen-c_glib/t_test_service_for_exception_with_a_map.h \
33 gen-c_glib/t_test_container_service.c \
34 gen-c_glib/t_test_container_service.h \
35 gen-c_glib/t_test_srv.h \
36 gen-c_glib/t_test_thrift_test.h \
37 gen-c_glib/t_test_thrift_test_types.h
38
39AM_CPPFLAGS = -I../src -I./gen-c_glib -I$(top_builddir)/lib/c_glib/src/thrift
40AM_CFLAGS = -g -Wall -Wextra -pedantic $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(OPENSSL_INCLUDES) \
41 @GCOV_CFLAGS@
42AM_CXXFLAGS = $(AM_CFLAGS)
43AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) $(OPENSSL_LIBS) @GCOV_LDFLAGS@
44
45check_PROGRAMS = \
46 testserialization \
47 testapplicationexception \
48 testcontainertest \
49 testtransportsocket \
50 testtransportsslsocket \
51 testbinaryprotocol \
52 testcompactprotocol \
53 testbufferedtransport \
54 testframedtransport \
55 testfdtransport \
56 testmemorybuffer \
57 teststruct \
58 testsimpleserver \
59 testdebugproto \
60 testoptionalrequired \
61 testthrifttest
62
63if WITH_CPP
64 BUILT_SOURCES += gen-cpp/ThriftTest_types.cpp
65 check_PROGRAMS += testthrifttestclient
66endif
67
68testserialization_SOURCES = testserialization.c
69testserialization_LDADD = \
70 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
71 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
72 libtestgenc.la
73
74testapplicationexception_SOURCES = testapplicationexception.c
75testapplicationexception_LDADD = \
76 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_application_exception.o \
77 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
78 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_struct.o \
79 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o
80
81testcontainertest_SOURCES = testcontainertest.c
82testcontainertest_LDADD = \
83 $(top_builddir)/lib/c_glib/src/thrift/c_glib/libthrift_c_glib_la-thrift_struct.o \
84 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
85 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
86 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport_factory.o \
87 $(top_builddir)/lib/c_glib/src/thrift/c_glib/processor/libthrift_c_glib_la-thrift_processor.o \
88 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol_factory.o \
89 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_binary_protocol.o \
90 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_binary_protocol_factory.o \
91 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
92 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
93 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o \
94 $(top_builddir)/lib/c_glib/src/thrift/c_glib/server/libthrift_c_glib_la-thrift_server.o \
95 libtestgenc.la
96
97testtransportsocket_SOURCES = testtransportsocket.c
98testtransportsocket_LDADD = \
99 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
100 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_buffered_transport.o \
101 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
102 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
103
104
105testtransportsslsocket_SOURCES = testtransportsslsocket.c
106testtransportsslsocket_LDADD = \
107 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
108 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
109 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_buffered_transport.o \
110 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
111 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
112
113
114testbinaryprotocol_SOURCES = testbinaryprotocol.c
115testbinaryprotocol_LDADD = \
116 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
117 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
118 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_framed_transport.o \
119 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
120 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
121 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
122
123testcompactprotocol_SOURCES = testcompactprotocol.c
124testcompactprotocol_LDADD = \
125 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
126 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
127 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_framed_transport.o \
128 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
129 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
130 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
131
132testbufferedtransport_SOURCES = testbufferedtransport.c
133testbufferedtransport_LDADD = \
134 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
135 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
136 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
137 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
138
139testframedtransport_SOURCES = testframedtransport.c
140testframedtransport_LDADD = \
141 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
142 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
143 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
144 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o
145
146testfdtransport_SOURCES = testfdtransport.c
147testfdtransport_LDADD = \
148 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
149 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_fd_transport.o
150
151testmemorybuffer_SOURCES = testmemorybuffer.c
152testmemorybuffer_LDADD = \
153 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o
154
155teststruct_SOURCES = teststruct.c
156teststruct_LDADD = \
157 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
158 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o
159
160testsimpleserver_SOURCES = testsimpleserver.c
161testsimpleserver_LDADD = \
162 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
163 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
164 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport_factory.o \
165 $(top_builddir)/lib/c_glib/src/thrift/c_glib/processor/libthrift_c_glib_la-thrift_processor.o \
166 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol_factory.o \
167 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_binary_protocol.o \
168 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_binary_protocol_factory.o \
169 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_socket.o \
170 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_transport.o \
171 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_server_socket.o \
172 $(top_builddir)/lib/c_glib/src/thrift/c_glib/server/libthrift_c_glib_la-thrift_server.o
173
174testdebugproto_SOURCES = testdebugproto.c
175testdebugproto_LDADD = libtestgenc.la
176
177testoptionalrequired_SOURCES = testoptionalrequired.c
178testoptionalrequired_LDADD = \
179 $(top_builddir)/lib/c_glib/src/thrift/c_glib/protocol/libthrift_c_glib_la-thrift_protocol.o \
180 $(top_builddir)/lib/c_glib/src/thrift/c_glib/transport/libthrift_c_glib_la-thrift_transport.o \
181 libtestgenc.la
182
183testthrifttest_SOURCES = testthrifttest.c
184testthrifttest_LDADD = libtestgenc.la \
185 $(top_builddir)/test/c_glib/src/thrift_test_handler.o
186testthrifttest_CFLAGS = -I$(top_srcdir)/test/c_glib/src -I./gen-c_glib $(GLIB_CFLAGS)
187
188testthrifttestclient_SOURCES = testthrifttestclient.cpp
189testthrifttestclient_CPPFLAGS = -I../../cpp/src $(BOOST_CPPFLAGS) -I./gen-cpp -I../src -I./gen-c_glib $(GLIB_CFLAGS)
190testthrifttestclient_LDADD = ../../cpp/.libs/libthrift.la ../libthrift_c_glib.la libtestgenc.la libtestgencpp.la
191testthrifttestclient_LDFLAGS = -L../.libs -L../../cpp/.libs $(GLIB_LIBS) $(GOBJECT_LIBS)
192
193check_LTLIBRARIES = libtestgenc.la
194
195if WITH_CPP
196 check_LTLIBRARIES += libtestgencpp.la
197endif
198
199nodist_libtestgenc_la_SOURCES = \
200 gen-c_glib/t_test_container_test_types.c \
201 gen-c_glib/t_test_debug_proto_test_types.c \
202 gen-c_glib/t_test_enum_test_types.c \
203 gen-c_glib/t_test_enum_test_service.c \
204 gen-c_glib/t_test_empty_service.c \
205 gen-c_glib/t_test_inherited.c \
206 gen-c_glib/t_test_optional_required_test_types.c \
207 gen-c_glib/t_test_reverse_order_service.c \
208 gen-c_glib/t_test_second_service.c \
209 gen-c_glib/t_test_service_for_exception_with_a_map.c \
210 gen-c_glib/t_test_srv.c \
211 gen-c_glib/t_test_container_service.c \
212 gen-c_glib/t_test_thrift_test.c \
213 gen-c_glib/t_test_thrift_test_types.c \
214 gen-c_glib/t_test_container_test_types.h \
215 gen-c_glib/t_test_debug_proto_test_types.h \
216 gen-c_glib/t_test_enum_test_types.h \
217 gen-c_glib/t_test_enum_test_service.h \
218 gen-c_glib/t_test_empty_service.h \
219 gen-c_glib/t_test_inherited.h \
220 gen-c_glib/t_test_optional_required_test_types.h \
221 gen-c_glib/t_test_reverse_order_service.h \
222 gen-c_glib/t_test_second_service.h \
223 gen-c_glib/t_test_service_for_exception_with_a_map.h \
224 gen-c_glib/t_test_srv.h \
225 gen-c_glib/t_test_container_service.h \
226 gen-c_glib/t_test_thrift_test.h \
227 gen-c_glib/t_test_thrift_test_types.h
228libtestgenc_la_LIBADD = $(top_builddir)/lib/c_glib/libthrift_c_glib.la
229libtestgenc_la_CPPFLAGS = $(AM_CPPFLAGS) -Wno-unused-function
230
231nodist_libtestgencpp_la_SOURCES = \
232 gen-cpp/ThriftTest.cpp \
233 gen-cpp/ThriftTest_constants.cpp \
234 gen-cpp/ThriftTest_types.cpp \
235 gen-cpp/ThriftTest.h \
236 gen-cpp/ThriftTest_constants.h \
237 gen-cpp/ThriftTest_types.h
238libtestgencpp_la_CPPFLAGS = -I../../cpp/src $(BOOST_CPPFLAGS) -I./gen-cpp
239
240gen-c_glib/t_test_container_test_types.c gen-c_glib/t_test_container_test_types.h gen-c_glib/t_test_container_service.c gen-c_glib/t_test_container_service.h: ContainerTest.thrift $(THRIFT)
241 $(THRIFT) --gen c_glib $<
242
243gen-c_glib/t_test_debug_proto_test_types.c gen-c_glib/t_test_debug_proto_test_types.h gen-c_glib/t_test_empty_service.c gen-c_glib/t_test_empty_service.h gen-c_glib/t_test_inherited.c gen-c_glib/t_test_inherited.h gen-c_glib/t_test_reverse_order_service.c gen-c_glib/t_test_reverse_order_service.h gen-c_glib/t_test_service_for_exception_with_a_map.c gen-c_glib/t_test_service_for_exception_with_a_map.h gen-c_glib/t_test_srv.c gen-c_glib/t_test_srv.h: ../../../test/DebugProtoTest.thrift $(THRIFT)
244 $(THRIFT) --gen c_glib $<
245
246gen-c_glib/t_test_enum_test_types.c gen-c_glib/t_test_enum_test_types.h gen-c_glib/t_test_enum_test_service.c gen-c_glib/t_test_enum_test_service.h : ../../../test/EnumTest.thrift $(THRIFT)
247 $(THRIFT) --gen c_glib $<
248
249gen-c_glib/t_test_optional_required_test_types.c gen-c_glib/t_test_optional_required_test_types.h: ../../../test/OptionalRequiredTest.thrift $(THRIFT)
250 $(THRIFT) --gen c_glib $<
251
252gen-c_glib/t_test_second_service.c gen-c_glib/t_test_thrift_test.c gen-c_glib/t_test_thrift_test_types.c gen-c_glib/t_test_second_service.h gen-c_glib/t_test_thrift_test.h gen-c_glib/t_test_thrift_test_types.h: ../../../test/ThriftTest.thrift $(THRIFT)
253 $(THRIFT) --gen c_glib $<
254
255gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_constants.cpp gen-cpp/ThriftTest_types.cpp: ../../../test/ThriftTest.thrift $(THRIFT)
256 $(THRIFT) --gen cpp $<
257
258TESTS = \
259 $(check_PROGRAMS) \
260 $(check_SCRIPTS)
261
262# globally added to all instances of valgrind calls
263# VALGRIND_OPTS = --suppressions=glib.suppress
264VALGRIND_OPTS =
265
266# globally added to all memcheck calls
267VALGRIND_MEM_OPTS = --tool=memcheck \
268 --num-callers=10 \
269 ${myextravalgrindmemopts}
270
271# globally added to all leakcheck calls
272VALGRIND_LEAK_OPTS = --tool=memcheck \
273 --num-callers=10 \
274 --leak-check=full \
275 --leak-resolution=high \
276 ${myextravalgrindleakopts}
277
278memcheck: $(check_PROGRAMS)
279 @for x in $(check_PROGRAMS); \
280 do \
281 $(MAKE) memcheck-$$x; \
282 done
283
284leakcheck: $(check_PROGRAMS)
285 @for x in $(check_PROGRAMS); \
286 do \
287 $(MAKE) leakcheck-$$x; \
288 done
289
290memcheck-%: %
291 @echo "*****************************************"; \
292 echo "MEMCHECK: $<"; \
293 echo "ARGS: ${VALGRIND_OPTS} ${VALGRIND_MEM_OPTS} ${$<_VALGRIND_MEM_OPTS}"; \
294 $(LIBTOOL) --mode=execute \
295 valgrind \
296 ${VALGRIND_OPTS} \
297 ${VALGRIND_MEM_OPTS} \
298 ${$<_VALGRIND_MEM_OPTS} ./$<
299
300leakcheck-%: %
301 @echo "*****************************************"; \
302 echo "LEAKCHECK: $<"; \
303 echo "ARGS: ${VALGRIND_OPTS} ${VALGRIND_LEAK_OPTS} ${$<_VALGRIND_LEAK_OPTS}"; \
304 G_SLICE=always-malloc $(LIBTOOL) --mode=execute \
305 valgrind \
306 ${VALGRIND_OPTS} \
307 ${VALGRIND_LEAK_OPTS} \
308 ${$<_VALGRIND_LEAK_OPTS} ./$<
309
310clean-local:
311 $(RM) gen-c_glib/* gen-cpp/*
312
313CLEANFILES = \
314 *.bb \
315 *.bbg \
316 *.da \
317 *.gcno \
318 *.gcda \
319 *.gcov
320
321EXTRA_DIST = \
322 CMakeLists.txt \
323 ContainerTest.thrift
324