Commit | Line | Data |
---|---|---|
9d16b343 MJ |
1 | # SPDX-License-Identifier: GPL-2.0-only |
2 | ||
1501a7f3 JG |
3 | SUBDIRS = ini_config |
4 | ||
343af227 | 5 | AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir) |
81d029da | 6 | |
8689ad30 | 7 | LOG_DRIVER_FLAGS='--merge' |
a36b26b4 MJ |
8 | LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ |
9 | $(top_srcdir)/config/tap-driver.sh | |
10 | ||
ba72b3e8 | 11 | TESTS = \ |
9ca3e8a2 | 12 | ini_config/test_ini_config \ |
9cff59ec | 13 | test_action \ |
c0a66c84 | 14 | test_buffer_view \ |
ba72b3e8 | 15 | test_directory_handle \ |
748b5f7b | 16 | test_event_expr_to_bytecode \ |
ba72b3e8 JR |
17 | test_event_rule \ |
18 | test_fd_tracker \ | |
7f4d5b07 | 19 | test_rate_policy \ |
ba72b3e8 JR |
20 | test_kernel_data \ |
21 | test_kernel_probe \ | |
85b05318 | 22 | test_log_level_rule \ |
ba72b3e8 | 23 | test_notification \ |
0b5a4de9 | 24 | test_payload \ |
ba72b3e8 JR |
25 | test_relayd_backward_compat_group_by_session \ |
26 | test_session \ | |
27 | test_string_utils \ | |
808cb744 | 28 | test_unix_socket \ |
ba72b3e8 JR |
29 | test_uri \ |
30 | test_utils_compat_poll \ | |
31 | test_utils_compat_pthread \ | |
32 | test_utils_expand_path \ | |
33 | test_utils_parse_size_suffix \ | |
34 | test_utils_parse_time_suffix \ | |
35 | test_uuid | |
a36b26b4 | 36 | |
83c55082 CB |
37 | LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la |
38 | ||
81d029da | 39 | LIBCOMMON=$(top_builddir)/src/common/libcommon.la |
dbfea1ab | 40 | LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la |
9ca3e8a2 | 41 | LIBFDTRACKER=$(top_builddir)/src/common/fd-tracker/libfd-tracker.la |
81d029da CB |
42 | LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la |
43 | LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la | |
d3e2ba59 | 44 | LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la |
572cb877 | 45 | LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la |
81d029da | 46 | |
70d0b120 | 47 | # Define test programs |
26d0e356 | 48 | noinst_PROGRAMS = \ |
9cff59ec | 49 | test_action \ |
26d0e356 JR |
50 | test_buffer_view \ |
51 | test_condition \ | |
52 | test_directory_handle \ | |
53 | test_event_expr_to_bytecode \ | |
54 | test_event_rule \ | |
55 | test_fd_tracker \ | |
7f4d5b07 | 56 | test_rate_policy \ |
26d0e356 JR |
57 | test_kernel_data \ |
58 | test_kernel_probe \ | |
85b05318 | 59 | test_log_level_rule \ |
26d0e356 JR |
60 | test_notification \ |
61 | test_payload \ | |
62 | test_relayd_backward_compat_group_by_session \ | |
63 | test_session \ | |
64 | test_string_utils \ | |
65 | test_unix_socket \ | |
66 | test_uri \ | |
67 | test_utils_compat_poll \ | |
68 | test_utils_compat_pthread \ | |
69 | test_utils_expand_path \ | |
70 | test_utils_parse_size_suffix \ | |
71 | test_utils_parse_time_suffix \ | |
72 | test_uuid | |
70d0b120 | 73 | |
81d029da | 74 | if HAVE_LIBLTTNG_UST_CTL |
70d0b120 | 75 | noinst_PROGRAMS += test_ust_data |
a36b26b4 | 76 | TESTS += test_ust_data |
81d029da CB |
77 | endif |
78 | ||
79 | # URI unit tests | |
80 | test_uri_SOURCES = test_uri.c | |
b1c46f87 | 81 | test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS) |
81d029da | 82 | |
a7333da7 JG |
83 | # Sessiond objects |
84 | SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \ | |
a7333da7 | 85 | $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \ |
e98a976a | 86 | $(top_builddir)/src/bin/lttng-sessiond/condition-internal.$(OBJEXT) \ |
a7333da7 JG |
87 | $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \ |
88 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \ | |
a7333da7 JG |
89 | $(top_builddir)/src/bin/lttng-sessiond/kernel.$(OBJEXT) \ |
90 | $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \ | |
91 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread.$(OBJEXT) \ | |
f2b3ef9f | 92 | $(top_builddir)/src/bin/lttng-sessiond/action-executor.$(OBJEXT) \ |
a7333da7 JG |
93 | $(top_builddir)/src/bin/lttng-sessiond/lttng-syscall.$(OBJEXT) \ |
94 | $(top_builddir)/src/bin/lttng-sessiond/channel.$(OBJEXT) \ | |
95 | $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \ | |
a7333da7 JG |
96 | $(top_builddir)/src/bin/lttng-sessiond/kernel-consumer.$(OBJEXT) \ |
97 | $(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \ | |
98 | $(top_builddir)/src/bin/lttng-sessiond/rotation-thread.$(OBJEXT) \ | |
99 | $(top_builddir)/src/bin/lttng-sessiond/context.$(OBJEXT) \ | |
827b3af0 MJ |
100 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ |
101 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ | |
a7333da7 JG |
102 | $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \ |
103 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread-events.$(OBJEXT) \ | |
104 | $(top_builddir)/src/bin/lttng-sessiond/event.$(OBJEXT) \ | |
90aa04a1 | 105 | $(top_builddir)/src/bin/lttng-sessiond/event-notifier-error-accounting.$(OBJEXT) \ |
a7333da7 | 106 | $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \ |
827b3af0 | 107 | $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \ |
a7333da7 JG |
108 | $(top_builddir)/src/bin/lttng-sessiond/sessiond-config.$(OBJEXT) \ |
109 | $(top_builddir)/src/bin/lttng-sessiond/rotate.$(OBJEXT) \ | |
110 | $(top_builddir)/src/bin/lttng-sessiond/modprobe.$(OBJEXT) \ | |
111 | $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \ | |
112 | $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \ | |
113 | $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \ | |
114 | $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \ | |
a3707772 | 115 | $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \ |
4e6581a7 | 116 | $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \ |
588c4b0d | 117 | $(top_builddir)/src/bin/lttng-sessiond/trigger-error-query.$(OBJEXT) \ |
9354f1d0 | 118 | $(top_builddir)/src/common/libcommon.la \ |
5e97de00 JG |
119 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ |
120 | $(top_builddir)/src/common/compat/libcompat.la \ | |
8782cc74 MD |
121 | $(top_builddir)/src/common/health/libhealth.la \ |
122 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
123 | ||
a7333da7 JG |
124 | if HAVE_LIBLTTNG_UST_CTL |
125 | SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \ | |
126 | $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \ | |
127 | $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \ | |
128 | $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \ | |
f9d2ba6a | 129 | $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \ |
a7333da7 JG |
130 | $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \ |
131 | $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \ | |
4e6581a7 | 132 | $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT) |
a7333da7 | 133 | endif |
81d029da | 134 | |
73e9abbe JR |
135 | RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT) |
136 | ||
9a363369 | 137 | test_session_SOURCES = test_session.c |
d3e2ba59 | 138 | test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
62b7418e | 139 | $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \ |
a7333da7 JG |
140 | $(KMOD_LIBS) \ |
141 | $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ | |
142 | $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ | |
143 | $(top_builddir)/src/common/compat/libcompat.la \ | |
144 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ | |
145 | $(top_builddir)/src/common/health/libhealth.la \ | |
146 | $(top_builddir)/src/common/config/libconfig.la \ | |
147 | $(top_builddir)/src/common/string-utils/libstring-utils.la | |
148 | ||
149 | test_session_LDADD += $(SESSIOND_OBJS) | |
81d029da | 150 | |
81d029da | 151 | if HAVE_LIBLTTNG_UST_CTL |
881fc67f | 152 | test_session_SOURCES += ust-sigbus.c |
20dd2de1 | 153 | test_session_LDADD += $(UST_CTL_LIBS) |
a7333da7 | 154 | endif |
81d029da | 155 | |
a7333da7 JG |
156 | # UST data structures unit test |
157 | if HAVE_LIBLTTNG_UST_CTL | |
9a363369 | 158 | test_ust_data_SOURCES = test_ust_data.c |
a7333da7 | 159 | test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
62b7418e | 160 | $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \ |
20dd2de1 | 161 | $(UST_CTL_LIBS) \ |
a7333da7 JG |
162 | $(KMOD_LIBS) \ |
163 | $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ | |
164 | $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ | |
165 | $(top_builddir)/src/common/compat/libcompat.la \ | |
166 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ | |
167 | $(top_builddir)/src/common/health/libhealth.la \ | |
168 | $(top_builddir)/src/common/config/libconfig.la \ | |
169 | $(top_builddir)/src/common/string-utils/libstring-utils.la | |
170 | test_ust_data_LDADD += $(SESSIOND_OBJS) | |
81d029da CB |
171 | endif |
172 | ||
173 | # Kernel data structures unit test | |
827b3af0 | 174 | KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \ |
658f12fa | 175 | $(top_builddir)/src/common/compat/libcompat.la \ |
827b3af0 | 176 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ |
658f12fa | 177 | $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \ |
827b3af0 | 178 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ |
55c9e7ca | 179 | $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \ |
8782cc74 | 180 | $(top_builddir)/src/common/health/libhealth.la \ |
83b45089 | 181 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \ |
dcabc190 | 182 | $(LIBLTTNG_CTL) |
81d029da | 183 | |
9a363369 | 184 | test_kernel_data_SOURCES = test_kernel_data.c |
d3e2ba59 | 185 | test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
b1c46f87 | 186 | $(LIBHASHTABLE) $(DL_LIBS) -lrt |
9a363369 | 187 | test_kernel_data_LDADD += $(KERN_DATA_TRACE) |
70d0b120 | 188 | |
c77d8c84 | 189 | # utils suffix for unit test |
70d0b120 | 190 | |
c77d8c84 | 191 | # parse_size_suffix unit test |
70d0b120 | 192 | test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c |
b1c46f87 | 193 | test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS) |
c77d8c84 | 194 | |
7010c033 SM |
195 | # parse_time_suffix unit test |
196 | test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c | |
197 | test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) | |
7010c033 | 198 | |
b12e3724 YL |
199 | # compat_poll unit test |
200 | test_utils_compat_poll_SOURCES = test_utils_compat_poll.c | |
201 | test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \ | |
202 | $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON) | |
203 | ||
014d7d3b MJ |
204 | # compat_pthread unit test |
205 | test_utils_compat_pthread_SOURCES = test_utils_compat_pthread.c | |
206 | test_utils_compat_pthread_LDADD = $(LIBTAP) \ | |
207 | $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON) | |
208 | ||
cc7f9e36 RB |
209 | # expand_path unit test |
210 | test_utils_expand_path_SOURCES = test_utils_expand_path.c | |
b1c46f87 | 211 | test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS) |
dbfea1ab | 212 | |
93bed9fe JG |
213 | # directory handle unit test |
214 | test_directory_handle_SOURCES = test_directory_handle.c | |
215 | test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS) | |
216 | ||
dbfea1ab PP |
217 | # string utilities unit test |
218 | test_string_utils_SOURCES = test_string_utils.c | |
b1c46f87 MJ |
219 | test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS) |
220 | ||
572cb877 JR |
221 | # Notification api |
222 | test_notification_SOURCES = test_notification.c | |
b1c46f87 | 223 | test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS) |
2b4c142d | 224 | |
dbc20d3c JR |
225 | # Event rule api |
226 | test_event_rule_SOURCES = test_event_rule.c | |
2b4c142d JG |
227 | test_event_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) \ |
228 | $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) | |
73e9abbe | 229 | |
d17cfa5d JR |
230 | # Condition api |
231 | test_condition_SOURCES = test_condition.c | |
232 | test_condition_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) | |
233 | ||
73e9abbe JR |
234 | # relayd backward compat for groou-by-session utilities |
235 | test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c | |
236 | test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS) | |
237 | test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd | |
9ca3e8a2 | 238 | |
7f4d5b07 JR |
239 | # rate policy object unit test |
240 | test_rate_policy_SOURCES = test_rate_policy.c | |
241 | test_rate_policy_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) \ | |
e44b5645 JR |
242 | $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) |
243 | ||
9ca3e8a2 JG |
244 | # fd tracker unit test |
245 | test_fd_tracker_SOURCES = test_fd_tracker.c | |
62b7418e | 246 | test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON) $(LIBHASHTABLE) |
c70636a7 MJ |
247 | |
248 | # uuid unit test | |
249 | test_uuid_SOURCES = test_uuid.c | |
250 | test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON) | |
67d8e2ef SM |
251 | |
252 | # buffer view unit test | |
253 | test_buffer_view_SOURCES = test_buffer_view.c | |
254 | test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON) | |
c0a66c84 JG |
255 | |
256 | # payload unit test | |
257 | test_payload_SOURCES = test_payload.c | |
258 | test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON) | |
0b5a4de9 JG |
259 | |
260 | # unix socket test | |
261 | test_unix_socket_SOURCES = test_unix_socket.c | |
262 | test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON) | |
808cb744 JR |
263 | |
264 | # Kernel probe location api test | |
265 | test_kernel_probe_SOURCES = test_kernel_probe.c | |
266 | test_kernel_probe_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) | |
748b5f7b SM |
267 | # |
268 | # Event expression to bytecode test | |
269 | test_event_expr_to_bytecode_SOURCES = test_event_expr_to_bytecode.c | |
270 | test_event_expr_to_bytecode_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(LIBCOMMON) | |
85b05318 JR |
271 | |
272 | # Log level rule api | |
273 | test_log_level_rule_SOURCES = test_log_level_rule.c | |
274 | test_log_level_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) | |
9cff59ec JR |
275 | |
276 | # Action api | |
277 | test_action_SOURCES = test_action.c | |
278 | test_action_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) |