tests: add `src.ctf.fs` single field testing framework
[babeltrace.git] / tests / Makefile.am
1 # SPDX-License-Identifier: MIT
2
3 SUBDIRS = \
4 utils \
5 lib \
6 bitfield \
7 ctf-writer \
8 plugins \
9 param-validation
10
11 AM_CPPFLAGS += -I$(top_srcdir)/tests/utils
12
13 COMMON_TEST_LDADD = \
14 $(top_builddir)/tests/utils/tap/libtap.la \
15 $(top_builddir)/src/common/libcommon.la \
16 $(top_builddir)/src/logging/liblogging.la
17
18 # Directories added to EXTRA_DIST will be recursively copied to the distribution.
19 EXTRA_DIST = $(srcdir)/data \
20 bindings/python/bt2/.coveragerc
21
22 dist_check_SCRIPTS = \
23 bindings/python/bt2/test-python-bt2.sh \
24 bindings/python/bt2/test_clock_class.py \
25 bindings/python/bt2/test_component_class.py \
26 bindings/python/bt2/test_component.py \
27 bindings/python/bt2/test_connection.py \
28 bindings/python/bt2/test_event_class.py \
29 bindings/python/bt2/test_event.py \
30 bindings/python/bt2/test_field_class.py \
31 bindings/python/bt2/test_field.py \
32 bindings/python/bt2/test_graph.py \
33 bindings/python/bt2/test_integer_range_set.py \
34 bindings/python/bt2/test_interrupter.py \
35 bindings/python/bt2/test_message_iterator.py \
36 bindings/python/bt2/test_message.py \
37 bindings/python/bt2/test_package.py \
38 bindings/python/bt2/test_packet.py \
39 bindings/python/bt2/test_plugin.py \
40 bindings/python/bt2/test_port.py \
41 bindings/python/bt2/test_query_executor.py \
42 bindings/python/bt2/test_stream_class.py \
43 bindings/python/bt2/test_stream.py \
44 bindings/python/bt2/test_trace_collection_message_iterator.py \
45 bindings/python/bt2/test_trace.py \
46 bindings/python/bt2/test_value.py \
47 bindings/python/bt2/utils.py \
48 cli/convert/test-auto-source-discovery-grouping.sh \
49 cli/convert/test-auto-source-discovery-params.sh \
50 cli/convert/test-auto-source-discovery-log-level.sh \
51 cli/convert/test-convert-args.sh \
52 cli/list-plugins/test-list-plugins.sh \
53 cli/params/test-params.sh \
54 cli/query/test-query.sh \
55 cli/test-exit-status.sh \
56 cli/test-help.sh \
57 cli/test-intersection.sh \
58 cli/test-output-ctf-metadata.sh \
59 cli/test-output-path-ctf-non-lttng-trace.sh \
60 cli/test-packet-seq-num.sh \
61 cli/test-trace-copy.sh \
62 cli/test-trace-read.sh \
63 cli/test-trimmer.sh \
64 plugins/sink.text.details/succeed/test-succeed.sh \
65 plugins/sink.text.pretty/test-enum.sh \
66 plugins/sink.text.pretty/test_pretty.py \
67 plugins/sink.text.pretty/test-pretty-python.sh \
68 plugins/src.ctf.lttng-live/test-live.sh \
69 python-plugin-provider/bt_plugin_test_python_plugin_provider.py \
70 python-plugin-provider/test-python-plugin-provider.sh \
71 python-plugin-provider/test_python_plugin_provider.py
72
73 noinst_PROGRAMS =
74
75 TESTS_BINDINGS =
76
77 if ENABLE_PYTHON_BINDINGS
78 TESTS_BINDINGS += bindings/python/bt2/test-python-bt2.sh
79 endif
80
81 TESTS_CLI = \
82 cli/convert/test-convert-args.sh \
83 cli/test-help.sh \
84 cli/test-intersection.sh \
85 cli/test-output-ctf-metadata.sh \
86 cli/test-output-path-ctf-non-lttng-trace.sh \
87 cli/test-packet-seq-num.sh \
88 cli/test-trace-copy.sh \
89 cli/test-trace-read.sh \
90 cli/test-trimmer.sh
91
92 noinst_PROGRAMS += \
93 cpp-common/test-c-string-view
94
95 cpp_common_test_c_string_view_SOURCES = \
96 cpp-common/test-c-string-view.cpp
97
98 cpp_common_test_c_string_view_LDADD = \
99 $(COMMON_TEST_LDADD)
100
101 TESTS_CPP_COMMON = \
102 cpp-common/test-c-string-view
103
104 TESTS_LIB = \
105 lib/test-bt-uuid \
106 lib/test-bt-values \
107 lib/test-fields.sh \
108 lib/test-graph-topo \
109 lib/test-remove-destruction-listener-in-destruction-listener \
110 lib/test-simple-sink \
111 lib/test-trace-ir-ref
112
113 TESTS_BITFIELD = \
114 bitfield/test-bitfield
115
116 TESTS_CTF_WRITER = \
117 ctf-writer/test-ctf-writer.sh
118
119 if !ENABLE_BUILT_IN_PLUGINS
120 TESTS_LIB += lib/test-plugins.sh
121 endif
122
123 TESTS_PLUGINS = \
124 plugins/src.ctf.fs/fail/test-fail.sh \
125 plugins/src.ctf.fs/succeed/test-succeed.sh \
126 plugins/src.ctf.fs/test-deterministic-ordering.sh \
127 plugins/sink.ctf.fs/succeed/test-succeed.sh \
128 plugins/sink.text.details/succeed/test-succeed.sh
129
130 if !ENABLE_BUILT_IN_PLUGINS
131 if ENABLE_PYTHON_BINDINGS
132 TESTS_PLUGINS += plugins/src.ctf.fs/query/test-query-support-info.sh
133 TESTS_PLUGINS += plugins/src.ctf.fs/query/test-query-trace-info.sh
134 TESTS_PLUGINS += plugins/src.ctf.fs/query/test-query-metadata-info.sh
135 TESTS_PLUGINS += plugins/sink.ctf.fs/test-assume-single-trace.sh
136 TESTS_PLUGINS += plugins/sink.ctf.fs/test-stream-names.sh
137 endif
138 endif
139
140 if ENABLE_DEBUG_INFO
141 TESTS_PLUGINS += \
142 plugins/flt.lttng-utils.debug-info/test-dwarf-i386-linux-gnu.sh \
143 plugins/flt.lttng-utils.debug-info/test-dwarf-powerpc-linux-gnu.sh \
144 plugins/flt.lttng-utils.debug-info/test-dwarf-powerpc64le-linux-gnu.sh \
145 plugins/flt.lttng-utils.debug-info/test-dwarf-x86-64-linux-gnu.sh \
146 plugins/flt.lttng-utils.debug-info/test-bin-info-i386-linux-gnu.sh \
147 plugins/flt.lttng-utils.debug-info/test-bin-info-powerpc-linux-gnu.sh \
148 plugins/flt.lttng-utils.debug-info/test-bin-info-powerpc64le-linux-gnu.sh \
149 plugins/flt.lttng-utils.debug-info/test-bin-info-x86-64-linux-gnu.sh
150 endif
151
152 if ENABLE_PYTHON_PLUGINS
153 if ENABLE_PYTHON_BINDINGS
154 TESTS_CLI += \
155 cli/convert/test-auto-source-discovery-grouping.sh \
156 cli/convert/test-auto-source-discovery-log-level.sh \
157 cli/convert/test-auto-source-discovery-params.sh \
158 cli/list-plugins/test-list-plugins.sh \
159 cli/params/test-params.sh \
160 cli/query/test-query.sh \
161 cli/test-exit-status.sh
162
163 TESTS_PLUGINS += plugins/flt.utils.trimmer/test-trimming.sh \
164 plugins/flt.utils.muxer/succeed/test-succeed.sh \
165 plugins/sink.text.pretty/test-enum.sh \
166 plugins/src.ctf.fs/field/test-field.sh
167 endif
168 endif
169
170 if HAVE_PYTHON
171 TESTS_PLUGINS += plugins/src.ctf.lttng-live/test-live.sh
172
173 if DEV_MODE
174 TESTS_LIB += lib/conds/test-conds.sh
175 endif
176 endif
177
178 TESTS_PYTHON_PLUGIN_PROVIDER =
179
180 if ENABLE_PYTHON_PLUGINS
181 TESTS_PYTHON_PLUGIN_PROVIDER += python-plugin-provider/test-python-plugin-provider.sh
182 TESTS_PLUGINS += plugins/sink.text.pretty/test-pretty-python.sh
183 if ENABLE_DEBUG_INFO
184 TESTS_PLUGINS += \
185 plugins/flt.lttng-utils.debug-info/test-succeed.sh
186 endif
187 endif
188
189 TESTS_PARAM_VALIDATION = \
190 param-validation/test-param-validation
191
192 LOG_DRIVER_FLAGS = --merge --comments
193 LOG_DRIVER = env AM_TAP_AWK='$(AWK)' \
194 BT_TESTS_SRCDIR='$(abs_top_srcdir)/tests' \
195 BT_TESTS_BUILDDIR='$(abs_top_builddir)/tests' \
196 $(SHELL) $(srcdir)/utils/tap-driver.sh
197
198 TESTS_NO_BITFIELD = \
199 $(TESTS_BINDINGS) \
200 $(TESTS_CLI) \
201 $(TESTS_CPP_COMMON) \
202 $(TESTS_CTF_WRITER) \
203 $(TESTS_LIB) \
204 $(TESTS_PARAM_VALIDATION) \
205 $(TESTS_PLUGINS) \
206 $(TESTS_PYTHON_PLUGIN_PROVIDER)
207
208 TESTS = $(TESTS_NO_BITFIELD) $(TESTS_BITFIELD)
209
210 define check_target
211 check-$(1):
212 $(MAKE) $(AM_MAKEFLAGS) TESTS="$2" check
213 endef
214
215 $(eval $(call check_target,bindings,$(TESTS_BINDINGS)))
216 $(eval $(call check_target,bitfield,$(TESTS_BITFIELD)))
217 $(eval $(call check_target,cli,$(TESTS_CLI)))
218 $(eval $(call check_target,cpp-common,$(TESTS_CPP_COMMON)))
219 $(eval $(call check_target,ctf-writer,$(TESTS_CTF_WRITER)))
220 $(eval $(call check_target,lib,$(TESTS_LIB)))
221 $(eval $(call check_target,plugins,$(TESTS_PLUGINS)))
222 $(eval $(call check_target,python-plugin-provider,$(TESTS_PYTHON_PLUGIN_PROVIDER)))
223
224 check-no-bitfield:
225 $(MAKE) $(AM_MAKEFLAGS) TESTS="$(TESTS_NO_BITFIELD)" check
This page took 0.035257 seconds and 5 git commands to generate.