port: Add pthread_setname_np FreeBSD compat
[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 \
014d7d3b 18 test_utils_compat_pthread \
dbfea1ab 19 test_string_utils \
572cb877 20 test_notification \
dbc20d3c 21 test_event_rule \
93bed9fe 22 test_directory_handle \
73e9abbe 23 test_relayd_backward_compat_group_by_session \
9ca3e8a2 24 ini_config/test_ini_config \
c70636a7 25 test_fd_tracker \
67d8e2ef 26 test_uuid \
c0a66c84 27 test_buffer_view \
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 \
014d7d3b 45 test_utils_expand_path test_utils_compat_poll test_utils_compat_pthread \
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
JR
52 test_kernel_probe \
53 test_event_rule
70d0b120 54
81d029da 55if HAVE_LIBLTTNG_UST_CTL
70d0b120 56noinst_PROGRAMS += test_ust_data
a36b26b4 57TESTS += test_ust_data
81d029da
CB
58endif
59
60# URI unit tests
61test_uri_SOURCES = test_uri.c
b1c46f87 62test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
81d029da 63
a7333da7
JG
64# Sessiond objects
65SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
a7333da7
JG
66 $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \
67 $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \
68 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/shm.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/kernel.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/notification-thread.$(OBJEXT) \
f2b3ef9f 73 $(top_builddir)/src/bin/lttng-sessiond/action-executor.$(OBJEXT) \
a7333da7
JG
74 $(top_builddir)/src/bin/lttng-sessiond/lttng-syscall.$(OBJEXT) \
75 $(top_builddir)/src/bin/lttng-sessiond/channel.$(OBJEXT) \
76 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
a7333da7
JG
77 $(top_builddir)/src/bin/lttng-sessiond/kernel-consumer.$(OBJEXT) \
78 $(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
79 $(top_builddir)/src/bin/lttng-sessiond/rotation-thread.$(OBJEXT) \
80 $(top_builddir)/src/bin/lttng-sessiond/context.$(OBJEXT) \
827b3af0
MJ
81 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
82 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
a7333da7
JG
83 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
84 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-events.$(OBJEXT) \
85 $(top_builddir)/src/bin/lttng-sessiond/event.$(OBJEXT) \
86 $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \
827b3af0 87 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
a7333da7
JG
88 $(top_builddir)/src/bin/lttng-sessiond/sessiond-config.$(OBJEXT) \
89 $(top_builddir)/src/bin/lttng-sessiond/rotate.$(OBJEXT) \
90 $(top_builddir)/src/bin/lttng-sessiond/modprobe.$(OBJEXT) \
91 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
92 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
93 $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \
94 $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \
a3707772 95 $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
4e6581a7 96 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
9354f1d0 97 $(top_builddir)/src/common/libcommon.la \
5e97de00
JG
98 $(top_builddir)/src/common/testpoint/libtestpoint.la \
99 $(top_builddir)/src/common/compat/libcompat.la \
8782cc74
MD
100 $(top_builddir)/src/common/health/libhealth.la \
101 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
102
a7333da7
JG
103if HAVE_LIBLTTNG_UST_CTL
104SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
105 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
106 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
107 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
f9d2ba6a 108 $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \
a7333da7
JG
109 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
110 $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \
4e6581a7 111 $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT)
a7333da7 112endif
81d029da 113
73e9abbe
JR
114RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT)
115
9a363369 116test_session_SOURCES = test_session.c
d3e2ba59 117test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
62b7418e 118 $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \
a7333da7
JG
119 $(KMOD_LIBS) \
120 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
121 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
122 $(top_builddir)/src/common/compat/libcompat.la \
123 $(top_builddir)/src/common/testpoint/libtestpoint.la \
124 $(top_builddir)/src/common/health/libhealth.la \
125 $(top_builddir)/src/common/config/libconfig.la \
126 $(top_builddir)/src/common/string-utils/libstring-utils.la
127
128test_session_LDADD += $(SESSIOND_OBJS)
81d029da 129
81d029da 130if HAVE_LIBLTTNG_UST_CTL
20dd2de1 131test_session_LDADD += $(UST_CTL_LIBS)
a7333da7 132endif
81d029da 133
a7333da7
JG
134# UST data structures unit test
135if HAVE_LIBLTTNG_UST_CTL
9a363369 136test_ust_data_SOURCES = test_ust_data.c
a7333da7 137test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
62b7418e 138 $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \
20dd2de1 139 $(UST_CTL_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
148test_ust_data_LDADD += $(SESSIOND_OBJS)
81d029da
CB
149endif
150
151# Kernel data structures unit test
827b3af0 152KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
658f12fa 153 $(top_builddir)/src/common/compat/libcompat.la \
827b3af0 154 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
658f12fa 155 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
827b3af0 156 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
55c9e7ca 157 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
8782cc74 158 $(top_builddir)/src/common/health/libhealth.la \
83b45089 159 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
dcabc190 160 $(LIBLTTNG_CTL)
81d029da 161
9a363369 162test_kernel_data_SOURCES = test_kernel_data.c
d3e2ba59 163test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
b1c46f87 164 $(LIBHASHTABLE) $(DL_LIBS) -lrt
9a363369 165test_kernel_data_LDADD += $(KERN_DATA_TRACE)
70d0b120 166
c77d8c84 167# utils suffix for unit test
70d0b120 168
c77d8c84 169# parse_size_suffix unit test
70d0b120 170test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
b1c46f87 171test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
c77d8c84 172
7010c033
SM
173# parse_time_suffix unit test
174test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
175test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
7010c033 176
b12e3724
YL
177# compat_poll unit test
178test_utils_compat_poll_SOURCES = test_utils_compat_poll.c
179test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \
180 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
181
014d7d3b
MJ
182# compat_pthread unit test
183test_utils_compat_pthread_SOURCES = test_utils_compat_pthread.c
184test_utils_compat_pthread_LDADD = $(LIBTAP) \
185 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
186
cc7f9e36
RB
187# expand_path unit test
188test_utils_expand_path_SOURCES = test_utils_expand_path.c
b1c46f87 189test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
dbfea1ab 190
93bed9fe
JG
191# directory handle unit test
192test_directory_handle_SOURCES = test_directory_handle.c
193test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
194
dbfea1ab
PP
195# string utilities unit test
196test_string_utils_SOURCES = test_string_utils.c
b1c46f87
MJ
197test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
198
572cb877
JR
199# Notification api
200test_notification_SOURCES = test_notification.c
b1c46f87 201test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
dbc20d3c
JR
202#
203# Event rule api
204test_event_rule_SOURCES = test_event_rule.c
205test_event_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
73e9abbe
JR
206
207# relayd backward compat for groou-by-session utilities
208test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c
209test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS)
210test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd
9ca3e8a2
JG
211
212# fd tracker unit test
213test_fd_tracker_SOURCES = test_fd_tracker.c
62b7418e 214test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON) $(LIBHASHTABLE)
c70636a7
MJ
215
216# uuid unit test
217test_uuid_SOURCES = test_uuid.c
218test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON)
67d8e2ef
SM
219
220# buffer view unit test
221test_buffer_view_SOURCES = test_buffer_view.c
222test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON)
c0a66c84
JG
223
224# payload unit test
225test_payload_SOURCES = test_payload.c
226test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON)
0b5a4de9
JG
227
228# unix socket test
229test_unix_socket_SOURCES = test_unix_socket.c
230test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON)
808cb744
JR
231
232# Kernel probe location api test
233test_kernel_probe_SOURCES = test_kernel_probe.c
234test_kernel_probe_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
This page took 0.077724 seconds and 4 git commands to generate.