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