tests: unit: action: rotate_session
[lttng-tools.git] / tests / unit / Makefile.am
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 SUBDIRS = ini_config
4
5 AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
6
7 LOG_DRIVER_FLAGS='--merge'
8 LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
9 $(top_srcdir)/config/tap-driver.sh
10
11 TESTS = \
12 ini_config/test_ini_config \
13 test_action \
14 test_buffer_view \
15 test_directory_handle \
16 test_event_expr_to_bytecode \
17 test_event_rule \
18 test_fd_tracker \
19 test_firing_policy \
20 test_kernel_data \
21 test_kernel_probe \
22 test_log_level_rule \
23 test_notification \
24 test_payload \
25 test_relayd_backward_compat_group_by_session \
26 test_session \
27 test_string_utils \
28 test_unix_socket \
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
36
37 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
38
39 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
40 LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
41 LIBFDTRACKER=$(top_builddir)/src/common/fd-tracker/libfd-tracker.la
42 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
43 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
44 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
45 LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
46
47 # Define test programs
48 noinst_PROGRAMS = \
49 test_action \
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 \
56 test_firing_policy \
57 test_kernel_data \
58 test_kernel_probe \
59 test_log_level_rule \
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
73
74 if HAVE_LIBLTTNG_UST_CTL
75 noinst_PROGRAMS += test_ust_data
76 TESTS += test_ust_data
77 endif
78
79 # URI unit tests
80 test_uri_SOURCES = test_uri.c
81 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
82
83 # Sessiond objects
84 SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
85 $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \
86 $(top_builddir)/src/bin/lttng-sessiond/condition-internal.$(OBJEXT) \
87 $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \
88 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
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) \
92 $(top_builddir)/src/bin/lttng-sessiond/action-executor.$(OBJEXT) \
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) \
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) \
100 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
101 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
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) \
105 $(top_builddir)/src/bin/lttng-sessiond/event-notifier-error-accounting.$(OBJEXT) \
106 $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \
107 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
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) \
115 $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
116 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
117 $(top_builddir)/src/common/libcommon.la \
118 $(top_builddir)/src/common/testpoint/libtestpoint.la \
119 $(top_builddir)/src/common/compat/libcompat.la \
120 $(top_builddir)/src/common/health/libhealth.la \
121 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
122
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) \
128 $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \
129 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
130 $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \
131 $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT)
132 endif
133
134 RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT)
135
136 test_session_SOURCES = test_session.c
137 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
138 $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \
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)
149
150 if HAVE_LIBLTTNG_UST_CTL
151 test_session_LDADD += $(UST_CTL_LIBS)
152 endif
153
154 # UST data structures unit test
155 if HAVE_LIBLTTNG_UST_CTL
156 test_ust_data_SOURCES = test_ust_data.c
157 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
158 $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \
159 $(UST_CTL_LIBS) \
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)
169 endif
170
171 # Kernel data structures unit test
172 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
173 $(top_builddir)/src/common/compat/libcompat.la \
174 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
175 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
176 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
177 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
178 $(top_builddir)/src/common/health/libhealth.la \
179 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
180 $(LIBLTTNG_CTL)
181
182 test_kernel_data_SOURCES = test_kernel_data.c
183 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
184 $(LIBHASHTABLE) $(DL_LIBS) -lrt
185 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
186
187 # utils suffix for unit test
188
189 # parse_size_suffix unit test
190 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
191 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
192
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)
196
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
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
207 # expand_path unit test
208 test_utils_expand_path_SOURCES = test_utils_expand_path.c
209 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
210
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
215 # string utilities unit test
216 test_string_utils_SOURCES = test_string_utils.c
217 test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
218
219 # Notification api
220 test_notification_SOURCES = test_notification.c
221 test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
222
223 # Event rule api
224 test_event_rule_SOURCES = test_event_rule.c
225 test_event_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) \
226 $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT)
227
228 # Condition api
229 test_condition_SOURCES = test_condition.c
230 test_condition_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
231
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
236
237 # firing policy object unit test
238 test_firing_policy_SOURCES = test_firing_policy.c
239 test_firing_policy_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) \
240 $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT)
241
242 # fd tracker unit test
243 test_fd_tracker_SOURCES = test_fd_tracker.c
244 test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON) $(LIBHASHTABLE)
245
246 # uuid unit test
247 test_uuid_SOURCES = test_uuid.c
248 test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON)
249
250 # buffer view unit test
251 test_buffer_view_SOURCES = test_buffer_view.c
252 test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON)
253
254 # payload unit test
255 test_payload_SOURCES = test_payload.c
256 test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON)
257
258 # unix socket test
259 test_unix_socket_SOURCES = test_unix_socket.c
260 test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON)
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)
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)
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)
273
274 # Action api
275 test_action_SOURCES = test_action.c
276 test_action_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
This page took 0.038754 seconds and 4 git commands to generate.