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