]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/thrift/lib/d/test/Makefile.am
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / jaegertracing / thrift / lib / d / test / Makefile.am
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 #
19
20 AUTOMAKE_OPTIONS = serial-tests
21
22 # Thrift compiler rules
23
24 debug_proto_gen = $(addprefix gen-d/, DebugProtoTest_types.d)
25
26 $(debug_proto_gen): $(top_srcdir)/test/DebugProtoTest.thrift
27 $(THRIFT) --gen d -nowarn $<
28
29 stress_test_gen = $(addprefix gen-d/thrift/test/stress/, Service.d \
30 StressTest_types.d)
31
32 $(stress_test_gen): $(top_srcdir)/test/StressTest.thrift
33 $(THRIFT) --gen d $<
34
35 thrift_test_gen = $(addprefix gen-d/thrift/test/, SecondService.d \
36 ThriftTest.d ThriftTest_constants.d ThriftTest_types.d)
37
38 $(thrift_test_gen): $(top_srcdir)/test/ThriftTest.thrift
39 $(THRIFT) --gen d $<
40
41
42 # The actual test targets.
43 # There just must be some way to reassign a variable without warnings in
44 # Automake...
45 targets__ = async_test client_pool_test serialization_benchmark \
46 stress_test_server thrift_test_client thrift_test_server transport_test
47 ran_tests__ = client_pool_test \
48 transport_test \
49 async_test_runner.sh \
50 thrift_test_runner.sh
51
52 libevent_dependent_targets = async_test_client client_pool_test \
53 stress_test_server thrift_test_server
54 libevent_dependent_ran_tests = client_pool_test async_test_runner.sh thrift_test_runner.sh
55
56 openssl_dependent_targets = async_test thrift_test_client thrift_test_server
57 openssl_dependent_ran_tests = async_test_runner.sh thrift_test_runner.sh
58
59 d_test_flags =
60
61 if WITH_D_EVENT_TESTS
62 d_test_flags += $(DMD_LIBEVENT_FLAGS) ../$(D_EVENT_LIB_NAME)
63 targets_ = $(targets__)
64 ran_tests_ = $(ran_tests__)
65 else
66 targets_ = $(filter-out $(libevent_dependent_targets), $(targets__))
67 ran_tests_ = $(filter-out $(libevent_dependent_ran_tests), $(ran_tests__))
68 endif
69
70 if WITH_D_SSL_TESTS
71 d_test_flags += $(DMD_OPENSSL_FLAGS) ../$(D_SSL_LIB_NAME)
72 targets = $(targets_)
73 ran_tests = $(ran_tests_)
74 else
75 targets = $(filter-out $(openssl_dependent_targets), $(targets_))
76 ran_tests = $(filter-out $(openssl_dependent_ran_tests), $(ran_tests_))
77 endif
78
79 d_test_flags += -w -wi -O -release -inline -I$(top_srcdir)/lib/d/src -Igen-d \
80 $(top_builddir)/lib/d/$(D_LIB_NAME)
81
82
83 async_test client_pool_test transport_test: %: %.d
84 $(DMD) $(d_test_flags) -of$@ $^
85
86 serialization_benchmark: %: %.d $(debug_proto_gen)
87 $(DMD) $(d_test_flags) -of$@ $^
88
89 stress_test_server: %: %.d test_utils.d $(stress_test_gen)
90 $(DMD) $(d_test_flags) -of$@ $^
91
92 thrift_test_client: %: %.d thrift_test_common.d $(thrift_test_gen)
93 $(DMD) $(d_test_flags) -of$@ $^
94
95 thrift_test_server: %: %.d thrift_test_common.d test_utils.d $(thrift_test_gen)
96 $(DMD) $(d_test_flags) -of$@ $^
97
98
99 check-local: $(targets)
100
101 clean-local:
102 $(RM) -rf gen-d $(targets) $(addsuffix .o, $(targets))
103
104
105 # Tests ran as part of make check.
106
107 async_test_runner.sh: async_test
108 thrift_test_runner.sh: thrift_test_client thrift_test_server
109
110 TESTS = $(ran_tests)
111
112 precross: $(targets)