buffer-view: introduce lttng_buffer_view_contains_string
[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 = test_kernel_data \
12 test_session \
13 test_uri \
14 test_utils_parse_size_suffix \
15 test_utils_parse_time_suffix \
16 test_utils_expand_path \
17 test_utils_compat_poll \
18 test_string_utils \
19 test_notification \
20 test_directory_handle \
21 test_relayd_backward_compat_group_by_session \
22 ini_config/test_ini_config \
23 test_fd_tracker \
24 test_uuid \
25 test_buffer_view
26
27 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
28
29 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
30 LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
31 LIBFDTRACKER=$(top_builddir)/src/common/fd-tracker/libfd-tracker.la
32 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
33 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
34 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
35 LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
36
37 # Define test programs
38 noinst_PROGRAMS = test_uri test_session test_kernel_data \
39 test_utils_parse_size_suffix test_utils_parse_time_suffix \
40 test_utils_expand_path test_utils_compat_poll \
41 test_string_utils test_notification test_directory_handle \
42 test_relayd_backward_compat_group_by_session \
43 test_fd_tracker test_uuid \
44 test_buffer_view
45
46 if HAVE_LIBLTTNG_UST_CTL
47 noinst_PROGRAMS += test_ust_data
48 TESTS += test_ust_data
49 endif
50
51 # URI unit tests
52 test_uri_SOURCES = test_uri.c
53 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
54
55 # Sessiond objects
56 SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
57 $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \
58 $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \
59 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
60 $(top_builddir)/src/bin/lttng-sessiond/shm.$(OBJEXT) \
61 $(top_builddir)/src/bin/lttng-sessiond/kernel.$(OBJEXT) \
62 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
63 $(top_builddir)/src/bin/lttng-sessiond/notification-thread.$(OBJEXT) \
64 $(top_builddir)/src/bin/lttng-sessiond/lttng-syscall.$(OBJEXT) \
65 $(top_builddir)/src/bin/lttng-sessiond/channel.$(OBJEXT) \
66 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
67 $(top_builddir)/src/bin/lttng-sessiond/kernel-consumer.$(OBJEXT) \
68 $(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/rotation-thread.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/context.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
74 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-events.$(OBJEXT) \
75 $(top_builddir)/src/bin/lttng-sessiond/event.$(OBJEXT) \
76 $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \
77 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
78 $(top_builddir)/src/bin/lttng-sessiond/sessiond-config.$(OBJEXT) \
79 $(top_builddir)/src/bin/lttng-sessiond/rotate.$(OBJEXT) \
80 $(top_builddir)/src/bin/lttng-sessiond/modprobe.$(OBJEXT) \
81 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
82 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
83 $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \
84 $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \
85 $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
86 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
87 $(top_builddir)/src/common/libcommon.la \
88 $(top_builddir)/src/common/testpoint/libtestpoint.la \
89 $(top_builddir)/src/common/compat/libcompat.la \
90 $(top_builddir)/src/common/health/libhealth.la \
91 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
92
93 if HAVE_LIBLTTNG_UST_CTL
94 SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
95 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
96 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
97 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
98 $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \
99 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
100 $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \
101 $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT)
102 endif
103
104 RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT)
105
106 test_session_SOURCES = test_session.c
107 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
108 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
109 $(KMOD_LIBS) \
110 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
111 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
112 $(top_builddir)/src/common/compat/libcompat.la \
113 $(top_builddir)/src/common/testpoint/libtestpoint.la \
114 $(top_builddir)/src/common/health/libhealth.la \
115 $(top_builddir)/src/common/config/libconfig.la \
116 $(top_builddir)/src/common/string-utils/libstring-utils.la
117
118 test_session_LDADD += $(SESSIOND_OBJS)
119
120 if HAVE_LIBLTTNG_UST_CTL
121 test_session_LDADD += $(UST_CTL_LIBS)
122 endif
123
124 # UST data structures unit test
125 if HAVE_LIBLTTNG_UST_CTL
126 test_ust_data_SOURCES = test_ust_data.c
127 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
128 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
129 $(UST_CTL_LIBS) \
130 $(KMOD_LIBS) \
131 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
132 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
133 $(top_builddir)/src/common/compat/libcompat.la \
134 $(top_builddir)/src/common/testpoint/libtestpoint.la \
135 $(top_builddir)/src/common/health/libhealth.la \
136 $(top_builddir)/src/common/config/libconfig.la \
137 $(top_builddir)/src/common/string-utils/libstring-utils.la
138 test_ust_data_LDADD += $(SESSIOND_OBJS)
139 endif
140
141 # Kernel data structures unit test
142 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
143 $(top_builddir)/src/common/compat/libcompat.la \
144 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
145 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
146 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
147 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
148 $(top_builddir)/src/common/health/libhealth.la \
149 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
150 $(LIBLTTNG_CTL)
151
152 test_kernel_data_SOURCES = test_kernel_data.c
153 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
154 $(LIBHASHTABLE) $(DL_LIBS) -lrt
155 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
156
157 # utils suffix for unit test
158
159 # parse_size_suffix unit test
160 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
161 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
162
163 # parse_time_suffix unit test
164 test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
165 test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
166
167 # compat_poll unit test
168 test_utils_compat_poll_SOURCES = test_utils_compat_poll.c
169 test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \
170 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
171
172 # expand_path unit test
173 test_utils_expand_path_SOURCES = test_utils_expand_path.c
174 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
175
176 # directory handle unit test
177 test_directory_handle_SOURCES = test_directory_handle.c
178 test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
179
180 # string utilities unit test
181 test_string_utils_SOURCES = test_string_utils.c
182 test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
183
184 # Notification api
185 test_notification_SOURCES = test_notification.c
186 test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
187
188 # relayd backward compat for groou-by-session utilities
189 test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c
190 test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS)
191 test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd
192
193 # fd tracker unit test
194 test_fd_tracker_SOURCES = test_fd_tracker.c
195 test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) -lurcu $(LIBCOMMON) $(LIBHASHTABLE)
196
197 # uuid unit test
198 test_uuid_SOURCES = test_uuid.c
199 test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON)
200
201 # buffer view unit test
202 test_buffer_view_SOURCES = test_buffer_view.c
203 test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON)
This page took 0.046794 seconds and 4 git commands to generate.