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) \ |
9354f1d0 | 117 | $(top_builddir)/src/common/libcommon.la \ |
5e97de00 JG |
118 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ |
119 | $(top_builddir)/src/common/compat/libcompat.la \ | |
8782cc74 MD |
120 | $(top_builddir)/src/common/health/libhealth.la \ |
121 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
122 | ||
a7333da7 JG |
123 | if HAVE_LIBLTTNG_UST_CTL |
124 | SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \ | |
125 | $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \ | |
126 | $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \ | |
127 | $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \ | |
f9d2ba6a | 128 | $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \ |
a7333da7 JG |
129 | $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \ |
130 | $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \ | |
4e6581a7 | 131 | $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT) |
a7333da7 | 132 | endif |
81d029da | 133 | |
73e9abbe JR |
134 | RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT) |
135 | ||
9a363369 | 136 | test_session_SOURCES = test_session.c |
d3e2ba59 | 137 | test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
62b7418e | 138 | $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \ |
a7333da7 JG |
139 | $(KMOD_LIBS) \ |
140 | $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ | |
141 | $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ | |
142 | $(top_builddir)/src/common/compat/libcompat.la \ | |
143 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ | |
144 | $(top_builddir)/src/common/health/libhealth.la \ | |
145 | $(top_builddir)/src/common/config/libconfig.la \ | |
146 | $(top_builddir)/src/common/string-utils/libstring-utils.la | |
147 | ||
148 | test_session_LDADD += $(SESSIOND_OBJS) | |
81d029da | 149 | |
81d029da | 150 | if HAVE_LIBLTTNG_UST_CTL |
20dd2de1 | 151 | test_session_LDADD += $(UST_CTL_LIBS) |
a7333da7 | 152 | endif |
81d029da | 153 | |
a7333da7 JG |
154 | # UST data structures unit test |
155 | if HAVE_LIBLTTNG_UST_CTL | |
9a363369 | 156 | test_ust_data_SOURCES = test_ust_data.c |
a7333da7 | 157 | test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
62b7418e | 158 | $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \ |
20dd2de1 | 159 | $(UST_CTL_LIBS) \ |
a7333da7 JG |
160 | $(KMOD_LIBS) \ |
161 | $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ | |
162 | $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ | |
163 | $(top_builddir)/src/common/compat/libcompat.la \ | |
164 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ | |
165 | $(top_builddir)/src/common/health/libhealth.la \ | |
166 | $(top_builddir)/src/common/config/libconfig.la \ | |
167 | $(top_builddir)/src/common/string-utils/libstring-utils.la | |
168 | test_ust_data_LDADD += $(SESSIOND_OBJS) | |
81d029da CB |
169 | endif |
170 | ||
171 | # Kernel data structures unit test | |
827b3af0 | 172 | KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \ |
658f12fa | 173 | $(top_builddir)/src/common/compat/libcompat.la \ |
827b3af0 | 174 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ |
658f12fa | 175 | $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \ |
827b3af0 | 176 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ |
55c9e7ca | 177 | $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \ |
8782cc74 | 178 | $(top_builddir)/src/common/health/libhealth.la \ |
83b45089 | 179 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \ |
dcabc190 | 180 | $(LIBLTTNG_CTL) |
81d029da | 181 | |
9a363369 | 182 | test_kernel_data_SOURCES = test_kernel_data.c |
d3e2ba59 | 183 | test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
b1c46f87 | 184 | $(LIBHASHTABLE) $(DL_LIBS) -lrt |
9a363369 | 185 | test_kernel_data_LDADD += $(KERN_DATA_TRACE) |
70d0b120 | 186 | |
c77d8c84 | 187 | # utils suffix for unit test |
70d0b120 | 188 | |
c77d8c84 | 189 | # parse_size_suffix unit test |
70d0b120 | 190 | test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c |
b1c46f87 | 191 | test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS) |
c77d8c84 | 192 | |
7010c033 SM |
193 | # parse_time_suffix unit test |
194 | test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c | |
195 | test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) | |
7010c033 | 196 | |
b12e3724 YL |
197 | # compat_poll unit test |
198 | test_utils_compat_poll_SOURCES = test_utils_compat_poll.c | |
199 | test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \ | |
200 | $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON) | |
201 | ||
014d7d3b MJ |
202 | # compat_pthread unit test |
203 | test_utils_compat_pthread_SOURCES = test_utils_compat_pthread.c | |
204 | test_utils_compat_pthread_LDADD = $(LIBTAP) \ | |
205 | $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON) | |
206 | ||
cc7f9e36 RB |
207 | # expand_path unit test |
208 | test_utils_expand_path_SOURCES = test_utils_expand_path.c | |
b1c46f87 | 209 | test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS) |
dbfea1ab | 210 | |
93bed9fe JG |
211 | # directory handle unit test |
212 | test_directory_handle_SOURCES = test_directory_handle.c | |
213 | test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS) | |
214 | ||
dbfea1ab PP |
215 | # string utilities unit test |
216 | test_string_utils_SOURCES = test_string_utils.c | |
b1c46f87 MJ |
217 | test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS) |
218 | ||
572cb877 JR |
219 | # Notification api |
220 | test_notification_SOURCES = test_notification.c | |
b1c46f87 | 221 | test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS) |
2b4c142d | 222 | |
dbc20d3c JR |
223 | # Event rule api |
224 | test_event_rule_SOURCES = test_event_rule.c | |
2b4c142d JG |
225 | test_event_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) \ |
226 | $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) | |
73e9abbe | 227 | |
d17cfa5d JR |
228 | # Condition api |
229 | test_condition_SOURCES = test_condition.c | |
230 | test_condition_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) | |
231 | ||
73e9abbe JR |
232 | # relayd backward compat for groou-by-session utilities |
233 | test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c | |
234 | test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS) | |
235 | test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd | |
9ca3e8a2 | 236 | |
7f4d5b07 JR |
237 | # rate policy object unit test |
238 | test_rate_policy_SOURCES = test_rate_policy.c | |
239 | test_rate_policy_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) \ | |
e44b5645 JR |
240 | $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) |
241 | ||
9ca3e8a2 JG |
242 | # fd tracker unit test |
243 | test_fd_tracker_SOURCES = test_fd_tracker.c | |
62b7418e | 244 | test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON) $(LIBHASHTABLE) |
c70636a7 MJ |
245 | |
246 | # uuid unit test | |
247 | test_uuid_SOURCES = test_uuid.c | |
248 | test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON) | |
67d8e2ef SM |
249 | |
250 | # buffer view unit test | |
251 | test_buffer_view_SOURCES = test_buffer_view.c | |
252 | test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON) | |
c0a66c84 JG |
253 | |
254 | # payload unit test | |
255 | test_payload_SOURCES = test_payload.c | |
256 | test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON) | |
0b5a4de9 JG |
257 | |
258 | # unix socket test | |
259 | test_unix_socket_SOURCES = test_unix_socket.c | |
260 | test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON) | |
808cb744 JR |
261 | |
262 | # Kernel probe location api test | |
263 | test_kernel_probe_SOURCES = test_kernel_probe.c | |
264 | test_kernel_probe_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) | |
748b5f7b SM |
265 | # |
266 | # Event expression to bytecode test | |
267 | test_event_expr_to_bytecode_SOURCES = test_event_expr_to_bytecode.c | |
268 | test_event_expr_to_bytecode_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(LIBCOMMON) | |
85b05318 JR |
269 | |
270 | # Log level rule api | |
271 | test_log_level_rule_SOURCES = test_log_level_rule.c | |
272 | test_log_level_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) | |
9cff59ec JR |
273 | |
274 | # Action api | |
275 | test_action_SOURCES = test_action.c | |
276 | test_action_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) |