Commit | Line | Data |
---|---|---|
0235b0db MJ |
1 | # SPDX-License-Identifier: MIT |
2 | ||
faf0a8c2 SM |
3 | include $(top_srcdir)/src/Makefile.common.inc |
4 | ||
d0d4e0ed SM |
5 | SUBDIRS = \ |
6 | utils \ | |
7 | lib \ | |
8 | bitfield \ | |
9 | ctf-writer \ | |
10 | plugins \ | |
d0d4e0ed | 11 | param-validation |
ac65e355 | 12 | |
821af099 SM |
13 | AM_CPPFLAGS += -I$(top_srcdir)/tests/utils |
14 | ||
15 | COMMON_TEST_LDADD = \ | |
16 | $(top_builddir)/tests/utils/tap/libtap.la \ | |
17 | $(top_builddir)/src/common/libcommon.la \ | |
18 | $(top_builddir)/src/logging/liblogging.la | |
19 | ||
6a284733 | 20 | # Directories added to EXTRA_DIST will be recursively copied to the distribution. |
bbff0ab4 | 21 | EXTRA_DIST = $(srcdir)/data \ |
7bb90dd0 | 22 | bindings/python/bt2/.coveragerc |
1b83271b | 23 | |
7bb90dd0 | 24 | dist_check_SCRIPTS = \ |
7132b838 | 25 | bindings/python/bt2/test-python-bt2.sh \ |
7bb90dd0 MJ |
26 | bindings/python/bt2/test_clock_class.py \ |
27 | bindings/python/bt2/test_component_class.py \ | |
28 | bindings/python/bt2/test_component.py \ | |
29 | bindings/python/bt2/test_connection.py \ | |
7bb90dd0 MJ |
30 | bindings/python/bt2/test_event_class.py \ |
31 | bindings/python/bt2/test_event.py \ | |
32 | bindings/python/bt2/test_field_class.py \ | |
33 | bindings/python/bt2/test_field.py \ | |
34 | bindings/python/bt2/test_graph.py \ | |
19bb8b5a | 35 | bindings/python/bt2/test_integer_range_set.py \ |
1e920353 | 36 | bindings/python/bt2/test_interrupter.py \ |
7bb90dd0 MJ |
37 | bindings/python/bt2/test_message_iterator.py \ |
38 | bindings/python/bt2/test_message.py \ | |
6c0b3817 | 39 | bindings/python/bt2/test_package.py \ |
7bb90dd0 MJ |
40 | bindings/python/bt2/test_packet.py \ |
41 | bindings/python/bt2/test_plugin.py \ | |
42 | bindings/python/bt2/test_port.py \ | |
43 | bindings/python/bt2/test_query_executor.py \ | |
44 | bindings/python/bt2/test_stream_class.py \ | |
45 | bindings/python/bt2/test_stream.py \ | |
46 | bindings/python/bt2/test_trace_collection_message_iterator.py \ | |
47 | bindings/python/bt2/test_trace.py \ | |
48 | bindings/python/bt2/test_value.py \ | |
49 | bindings/python/bt2/utils.py \ | |
7132b838 PP |
50 | cli/convert/test-auto-source-discovery-grouping.sh \ |
51 | cli/convert/test-auto-source-discovery-params.sh \ | |
52 | cli/convert/test-auto-source-discovery-log-level.sh \ | |
53 | cli/convert/test-convert-args.sh \ | |
54 | cli/list-plugins/test-list-plugins.sh \ | |
55 | cli/params/test-params.sh \ | |
56 | cli/query/test-query.sh \ | |
57 | cli/test-exit-status.sh \ | |
58 | cli/test-help.sh \ | |
59 | cli/test-intersection.sh \ | |
60 | cli/test-output-ctf-metadata.sh \ | |
61 | cli/test-output-path-ctf-non-lttng-trace.sh \ | |
62 | cli/test-packet-seq-num.sh \ | |
63 | cli/test-trace-copy.sh \ | |
64 | cli/test-trace-read.sh \ | |
65 | cli/test-trimmer.sh \ | |
66 | plugins/sink.text.details/succeed/test-succeed.sh \ | |
67 | plugins/sink.text.pretty/test-enum.sh \ | |
440ffe59 | 68 | plugins/sink.text.pretty/test_pretty.py \ |
7132b838 PP |
69 | plugins/sink.text.pretty/test-pretty-python.sh \ |
70 | plugins/src.ctf.lttng-live/test-live.sh \ | |
7bb90dd0 | 71 | python-plugin-provider/bt_plugin_test_python_plugin_provider.py \ |
7132b838 | 72 | python-plugin-provider/test-python-plugin-provider.sh \ |
7bb90dd0 | 73 | python-plugin-provider/test_python_plugin_provider.py |
cd1c5347 | 74 | |
821af099 SM |
75 | noinst_PROGRAMS = |
76 | ||
7bb90dd0 | 77 | TESTS_BINDINGS = |
9e607e7c JG |
78 | |
79 | if ENABLE_PYTHON_BINDINGS | |
7132b838 | 80 | TESTS_BINDINGS += bindings/python/bt2/test-python-bt2.sh |
cd1c5347 PP |
81 | endif |
82 | ||
83 | TESTS_CLI = \ | |
7132b838 PP |
84 | cli/convert/test-convert-args.sh \ |
85 | cli/test-help.sh \ | |
86 | cli/test-intersection.sh \ | |
87 | cli/test-output-ctf-metadata.sh \ | |
88 | cli/test-output-path-ctf-non-lttng-trace.sh \ | |
89 | cli/test-packet-seq-num.sh \ | |
90 | cli/test-trace-copy.sh \ | |
91 | cli/test-trace-read.sh \ | |
92 | cli/test-trimmer.sh | |
cd1c5347 | 93 | |
821af099 SM |
94 | noinst_PROGRAMS += \ |
95 | cpp-common/test-c-string-view | |
96 | ||
97 | cpp_common_test_c_string_view_SOURCES = \ | |
98 | cpp-common/test-c-string-view.cpp | |
99 | ||
100 | cpp_common_test_c_string_view_LDADD = \ | |
101 | $(COMMON_TEST_LDADD) | |
102 | ||
e05975eb SM |
103 | noinst_PROGRAMS += \ |
104 | cpp-common/test-uuid | |
105 | ||
106 | cpp_common_test_uuid_SOURCES = \ | |
107 | cpp-common/test-uuid.cpp | |
108 | ||
109 | cpp_common_test_uuid_LDADD = \ | |
110 | $(COMMON_TEST_LDADD) \ | |
111 | $(top_builddir)/src/cpp-common/vendor/fmt/libfmt.la | |
112 | ||
821af099 | 113 | TESTS_CPP_COMMON = \ |
e05975eb SM |
114 | cpp-common/test-c-string-view \ |
115 | cpp-common/test-uuid | |
821af099 | 116 | |
cd1c5347 | 117 | TESTS_LIB = \ |
7132b838 PP |
118 | lib/test-bt-uuid \ |
119 | lib/test-bt-values \ | |
120 | lib/test-fields.sh \ | |
121 | lib/test-graph-topo \ | |
122 | lib/test-remove-destruction-listener-in-destruction-listener \ | |
123 | lib/test-simple-sink \ | |
124 | lib/test-trace-ir-ref | |
cd1c5347 | 125 | |
906ac65f | 126 | TESTS_BITFIELD = \ |
7132b838 | 127 | bitfield/test-bitfield |
906ac65f | 128 | |
331731aa | 129 | TESTS_CTF_WRITER = \ |
7132b838 | 130 | ctf-writer/test-ctf-writer.sh |
331731aa | 131 | |
cd1c5347 | 132 | if !ENABLE_BUILT_IN_PLUGINS |
9f5bdcae | 133 | TESTS_LIB += lib/test-plugins.sh |
1805e0b4 PP |
134 | endif |
135 | ||
faf0a8c2 SM |
136 | # plugins/flt.utils.muxer |
137 | ||
138 | noinst_PROGRAMS += plugins/flt.utils.muxer/test-clock-compatibility | |
139 | ||
140 | plugins_flt_utils_muxer_test_clock_compatibility_SOURCES = \ | |
141 | plugins/flt.utils.muxer/test-clock-compatibility.cpp | |
142 | ||
143 | plugins_flt_utils_muxer_test_clock_compatibility_LDADD = \ | |
144 | $(COMMON_TEST_LDADD) \ | |
145 | $(top_builddir)/src/lib/libbabeltrace2.la \ | |
146 | $(top_builddir)/src/cpp-common/vendor/fmt/libfmt.la | |
147 | ||
148 | dist_check_SCRIPTS += plugins/flt.utils.muxer/test-clock-compatibility.sh | |
149 | ||
150 | if ENABLE_BUILT_IN_PLUGINS | |
151 | plugins_flt_utils_muxer_test_clock_compatibility_LDFLAGS = $(call pluginarchive,utils) | |
152 | plugins_flt_utils_muxer_test_clock_compatibility_LDADD += \ | |
153 | $(top_builddir)/src/plugins/common/param-validation/libparam-validation.la | |
154 | endif # ENABLE_BUILT_IN_PLUGINS | |
155 | ||
e30aed9e | 156 | TESTS_PLUGINS = \ |
7132b838 PP |
157 | plugins/src.ctf.fs/fail/test-fail.sh \ |
158 | plugins/src.ctf.fs/succeed/test-succeed.sh \ | |
159 | plugins/src.ctf.fs/test-deterministic-ordering.sh \ | |
160 | plugins/sink.ctf.fs/succeed/test-succeed.sh \ | |
faf0a8c2 SM |
161 | plugins/sink.text.details/succeed/test-succeed.sh \ |
162 | plugins/flt.utils.muxer/test-clock-compatibility.sh | |
cd1c5347 PP |
163 | |
164 | if !ENABLE_BUILT_IN_PLUGINS | |
d8992d68 | 165 | if ENABLE_PYTHON_BINDINGS |
7132b838 PP |
166 | TESTS_PLUGINS += plugins/src.ctf.fs/query/test-query-support-info.sh |
167 | TESTS_PLUGINS += plugins/src.ctf.fs/query/test-query-trace-info.sh | |
168 | TESTS_PLUGINS += plugins/src.ctf.fs/query/test-query-metadata-info.sh | |
169 | TESTS_PLUGINS += plugins/sink.ctf.fs/test-assume-single-trace.sh | |
170 | TESTS_PLUGINS += plugins/sink.ctf.fs/test-stream-names.sh | |
d3765576 | 171 | endif |
cd1c5347 PP |
172 | endif |
173 | ||
174 | if ENABLE_DEBUG_INFO | |
175 | TESTS_PLUGINS += \ | |
7132b838 PP |
176 | plugins/flt.lttng-utils.debug-info/test-dwarf-i386-linux-gnu.sh \ |
177 | plugins/flt.lttng-utils.debug-info/test-dwarf-powerpc-linux-gnu.sh \ | |
178 | plugins/flt.lttng-utils.debug-info/test-dwarf-powerpc64le-linux-gnu.sh \ | |
179 | plugins/flt.lttng-utils.debug-info/test-dwarf-x86-64-linux-gnu.sh \ | |
180 | plugins/flt.lttng-utils.debug-info/test-bin-info-i386-linux-gnu.sh \ | |
181 | plugins/flt.lttng-utils.debug-info/test-bin-info-powerpc-linux-gnu.sh \ | |
182 | plugins/flt.lttng-utils.debug-info/test-bin-info-powerpc64le-linux-gnu.sh \ | |
183 | plugins/flt.lttng-utils.debug-info/test-bin-info-x86-64-linux-gnu.sh | |
cd1c5347 PP |
184 | endif |
185 | ||
188edac1 SM |
186 | if ENABLE_PYTHON_PLUGINS |
187 | if ENABLE_PYTHON_BINDINGS | |
c7fa6619 | 188 | TESTS_CLI += \ |
7132b838 PP |
189 | cli/convert/test-auto-source-discovery-grouping.sh \ |
190 | cli/convert/test-auto-source-discovery-log-level.sh \ | |
191 | cli/convert/test-auto-source-discovery-params.sh \ | |
192 | cli/list-plugins/test-list-plugins.sh \ | |
193 | cli/params/test-params.sh \ | |
194 | cli/query/test-query.sh \ | |
195 | cli/test-exit-status.sh | |
196 | ||
197 | TESTS_PLUGINS += plugins/flt.utils.trimmer/test-trimming.sh \ | |
198 | plugins/flt.utils.muxer/succeed/test-succeed.sh \ | |
10ba5f69 OD |
199 | plugins/sink.text.pretty/test-enum.sh \ |
200 | plugins/src.ctf.fs/field/test-field.sh | |
188edac1 SM |
201 | endif |
202 | endif | |
203 | ||
584af91e | 204 | if HAVE_PYTHON |
7132b838 | 205 | TESTS_PLUGINS += plugins/src.ctf.lttng-live/test-live.sh |
5d7e8359 PP |
206 | |
207 | if DEV_MODE | |
7132b838 | 208 | TESTS_LIB += lib/conds/test-conds.sh |
5d7e8359 | 209 | endif |
584af91e PP |
210 | endif |
211 | ||
cd1c5347 PP |
212 | TESTS_PYTHON_PLUGIN_PROVIDER = |
213 | ||
9e607e7c | 214 | if ENABLE_PYTHON_PLUGINS |
7132b838 PP |
215 | TESTS_PYTHON_PLUGIN_PROVIDER += python-plugin-provider/test-python-plugin-provider.sh |
216 | TESTS_PLUGINS += plugins/sink.text.pretty/test-pretty-python.sh | |
8cca03c6 FD |
217 | if ENABLE_DEBUG_INFO |
218 | TESTS_PLUGINS += \ | |
7132b838 | 219 | plugins/flt.lttng-utils.debug-info/test-succeed.sh |
8cca03c6 | 220 | endif |
cd1c5347 PP |
221 | endif |
222 | ||
42f2718c | 223 | TESTS_PARAM_VALIDATION = \ |
7132b838 | 224 | param-validation/test-param-validation |
42f2718c | 225 | |
644e0364 MJ |
226 | LOG_DRIVER_FLAGS = --merge --comments |
227 | LOG_DRIVER = env AM_TAP_AWK='$(AWK)' \ | |
228 | BT_TESTS_SRCDIR='$(abs_top_srcdir)/tests' \ | |
229 | BT_TESTS_BUILDDIR='$(abs_top_builddir)/tests' \ | |
86f2cc9e | 230 | $(SHELL) $(srcdir)/utils/tap-driver.sh |
11d328de | 231 | |
906ac65f PP |
232 | TESTS_NO_BITFIELD = \ |
233 | $(TESTS_BINDINGS) \ | |
234 | $(TESTS_CLI) \ | |
821af099 | 235 | $(TESTS_CPP_COMMON) \ |
906ac65f PP |
236 | $(TESTS_CTF_WRITER) \ |
237 | $(TESTS_LIB) \ | |
42f2718c | 238 | $(TESTS_PARAM_VALIDATION) \ |
906ac65f PP |
239 | $(TESTS_PLUGINS) \ |
240 | $(TESTS_PYTHON_PLUGIN_PROVIDER) | |
241 | ||
242 | TESTS = $(TESTS_NO_BITFIELD) $(TESTS_BITFIELD) | |
cd1c5347 PP |
243 | |
244 | define check_target | |
245 | check-$(1): | |
246 | $(MAKE) $(AM_MAKEFLAGS) TESTS="$2" check | |
247 | endef | |
248 | ||
249 | $(eval $(call check_target,bindings,$(TESTS_BINDINGS))) | |
906ac65f | 250 | $(eval $(call check_target,bitfield,$(TESTS_BITFIELD))) |
cd1c5347 | 251 | $(eval $(call check_target,cli,$(TESTS_CLI))) |
821af099 | 252 | $(eval $(call check_target,cpp-common,$(TESTS_CPP_COMMON))) |
331731aa | 253 | $(eval $(call check_target,ctf-writer,$(TESTS_CTF_WRITER))) |
cd1c5347 PP |
254 | $(eval $(call check_target,lib,$(TESTS_LIB))) |
255 | $(eval $(call check_target,plugins,$(TESTS_PLUGINS))) | |
256 | $(eval $(call check_target,python-plugin-provider,$(TESTS_PYTHON_PLUGIN_PROVIDER))) | |
906ac65f PP |
257 | |
258 | check-no-bitfield: | |
259 | $(MAKE) $(AM_MAKEFLAGS) TESTS="$(TESTS_NO_BITFIELD)" check |