Commit | Line | Data |
---|---|---|
9d16b343 MJ |
1 | # SPDX-License-Identifier: GPL-2.0-only |
2 | ||
1501a7f3 JG |
3 | SUBDIRS = ini_config |
4 | ||
343af227 | 5 | AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir) |
81d029da | 6 | |
8689ad30 | 7 | LOG_DRIVER_FLAGS='--merge' |
a36b26b4 | 8 | LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ |
a81cb945 | 9 | $(top_srcdir)/tests/utils/tap-driver.sh |
a36b26b4 MJ |
10 | |
11 | TESTS = 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 \ |
93bed9fe | 20 | test_directory_handle \ |
73e9abbe | 21 | test_relayd_backward_compat_group_by_session \ |
9ca3e8a2 | 22 | ini_config/test_ini_config \ |
c70636a7 MJ |
23 | test_fd_tracker \ |
24 | test_uuid | |
a36b26b4 | 25 | |
83c55082 CB |
26 | LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la |
27 | ||
6ac46b1d | 28 | LIBCOMMON_GPL=$(top_builddir)/src/common/libcommon-gpl.la |
dbfea1ab | 29 | LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la |
9ca3e8a2 | 30 | LIBFDTRACKER=$(top_builddir)/src/common/fd-tracker/libfd-tracker.la |
81d029da | 31 | LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la |
d3e2ba59 | 32 | LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la |
572cb877 | 33 | LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la |
81d029da | 34 | |
70d0b120 | 35 | # Define test programs |
7010c033 SM |
36 | noinst_PROGRAMS = test_uri test_session test_kernel_data \ |
37 | test_utils_parse_size_suffix test_utils_parse_time_suffix \ | |
b12e3724 | 38 | test_utils_expand_path test_utils_compat_poll \ |
73e9abbe | 39 | test_string_utils test_notification test_directory_handle \ |
9ca3e8a2 | 40 | test_relayd_backward_compat_group_by_session \ |
c70636a7 | 41 | test_fd_tracker test_uuid |
70d0b120 | 42 | |
81d029da | 43 | if HAVE_LIBLTTNG_UST_CTL |
70d0b120 | 44 | noinst_PROGRAMS += test_ust_data |
a36b26b4 | 45 | TESTS += test_ust_data |
81d029da CB |
46 | endif |
47 | ||
48 | # URI unit tests | |
49 | test_uri_SOURCES = test_uri.c | |
04952f7c | 50 | test_uri_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) |
81d029da | 51 | |
a7333da7 JG |
52 | # Sessiond objects |
53 | SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \ | |
a7333da7 JG |
54 | $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \ |
55 | $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \ | |
56 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \ | |
57 | $(top_builddir)/src/bin/lttng-sessiond/shm.$(OBJEXT) \ | |
58 | $(top_builddir)/src/bin/lttng-sessiond/kernel.$(OBJEXT) \ | |
59 | $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \ | |
60 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread.$(OBJEXT) \ | |
61 | $(top_builddir)/src/bin/lttng-sessiond/lttng-syscall.$(OBJEXT) \ | |
62 | $(top_builddir)/src/bin/lttng-sessiond/channel.$(OBJEXT) \ | |
63 | $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \ | |
a7333da7 JG |
64 | $(top_builddir)/src/bin/lttng-sessiond/kernel-consumer.$(OBJEXT) \ |
65 | $(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \ | |
66 | $(top_builddir)/src/bin/lttng-sessiond/rotation-thread.$(OBJEXT) \ | |
67 | $(top_builddir)/src/bin/lttng-sessiond/context.$(OBJEXT) \ | |
827b3af0 MJ |
68 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ |
69 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ | |
a7333da7 JG |
70 | $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \ |
71 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread-events.$(OBJEXT) \ | |
72 | $(top_builddir)/src/bin/lttng-sessiond/event.$(OBJEXT) \ | |
73 | $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \ | |
827b3af0 | 74 | $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \ |
a7333da7 JG |
75 | $(top_builddir)/src/bin/lttng-sessiond/sessiond-config.$(OBJEXT) \ |
76 | $(top_builddir)/src/bin/lttng-sessiond/rotate.$(OBJEXT) \ | |
77 | $(top_builddir)/src/bin/lttng-sessiond/modprobe.$(OBJEXT) \ | |
78 | $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \ | |
79 | $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \ | |
80 | $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \ | |
81 | $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \ | |
a3707772 | 82 | $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \ |
4e6581a7 | 83 | $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \ |
04952f7c | 84 | $(top_builddir)/src/common/libcommon-gpl.la \ |
5e97de00 JG |
85 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ |
86 | $(top_builddir)/src/common/compat/libcompat.la \ | |
8782cc74 MD |
87 | $(top_builddir)/src/common/health/libhealth.la \ |
88 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
89 | ||
a7333da7 JG |
90 | if HAVE_LIBLTTNG_UST_CTL |
91 | SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \ | |
92 | $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \ | |
93 | $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \ | |
94 | $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \ | |
f9d2ba6a | 95 | $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \ |
a7333da7 JG |
96 | $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \ |
97 | $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \ | |
4e6581a7 | 98 | $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT) |
a7333da7 | 99 | endif |
81d029da | 100 | |
73e9abbe JR |
101 | RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT) |
102 | ||
9a363369 | 103 | test_session_SOURCES = test_session.c |
d3e2ba59 | 104 | test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
a7333da7 JG |
105 | $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \ |
106 | $(KMOD_LIBS) \ | |
107 | $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ | |
108 | $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ | |
109 | $(top_builddir)/src/common/compat/libcompat.la \ | |
110 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ | |
111 | $(top_builddir)/src/common/health/libhealth.la \ | |
112 | $(top_builddir)/src/common/config/libconfig.la \ | |
113 | $(top_builddir)/src/common/string-utils/libstring-utils.la | |
114 | ||
115 | test_session_LDADD += $(SESSIOND_OBJS) | |
81d029da | 116 | |
81d029da | 117 | if HAVE_LIBLTTNG_UST_CTL |
20dd2de1 | 118 | test_session_LDADD += $(UST_CTL_LIBS) |
a7333da7 | 119 | endif |
81d029da | 120 | |
a7333da7 JG |
121 | # UST data structures unit test |
122 | if HAVE_LIBLTTNG_UST_CTL | |
9a363369 | 123 | test_ust_data_SOURCES = test_ust_data.c |
a7333da7 JG |
124 | test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
125 | $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \ | |
20dd2de1 | 126 | $(UST_CTL_LIBS) \ |
a7333da7 JG |
127 | $(KMOD_LIBS) \ |
128 | $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ | |
129 | $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ | |
130 | $(top_builddir)/src/common/compat/libcompat.la \ | |
131 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ | |
132 | $(top_builddir)/src/common/health/libhealth.la \ | |
133 | $(top_builddir)/src/common/config/libconfig.la \ | |
134 | $(top_builddir)/src/common/string-utils/libstring-utils.la | |
135 | test_ust_data_LDADD += $(SESSIOND_OBJS) | |
81d029da CB |
136 | endif |
137 | ||
138 | # Kernel data structures unit test | |
827b3af0 | 139 | KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \ |
658f12fa | 140 | $(top_builddir)/src/common/compat/libcompat.la \ |
827b3af0 | 141 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ |
658f12fa | 142 | $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \ |
827b3af0 | 143 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ |
55c9e7ca | 144 | $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \ |
8782cc74 | 145 | $(top_builddir)/src/common/health/libhealth.la \ |
83b45089 | 146 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \ |
dcabc190 | 147 | $(LIBLTTNG_CTL) |
81d029da | 148 | |
9a363369 | 149 | test_kernel_data_SOURCES = test_kernel_data.c |
6ac46b1d | 150 | test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
b1c46f87 | 151 | $(LIBHASHTABLE) $(DL_LIBS) -lrt |
9a363369 | 152 | test_kernel_data_LDADD += $(KERN_DATA_TRACE) |
70d0b120 | 153 | |
c77d8c84 | 154 | # utils suffix for unit test |
70d0b120 | 155 | |
c77d8c84 | 156 | # parse_size_suffix unit test |
70d0b120 | 157 | test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c |
04952f7c | 158 | test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) |
c77d8c84 | 159 | |
7010c033 SM |
160 | # parse_time_suffix unit test |
161 | test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c | |
04952f7c | 162 | test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) |
7010c033 | 163 | |
b12e3724 YL |
164 | # compat_poll unit test |
165 | test_utils_compat_poll_SOURCES = test_utils_compat_poll.c | |
04952f7c | 166 | test_utils_compat_poll_LDADD = $(LIBTAP) $(DL_LIBS) \ |
6ac46b1d | 167 | $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON_GPL) |
b12e3724 | 168 | |
cc7f9e36 RB |
169 | # expand_path unit test |
170 | test_utils_expand_path_SOURCES = test_utils_expand_path.c | |
04952f7c | 171 | test_utils_expand_path_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) |
dbfea1ab | 172 | |
93bed9fe JG |
173 | # directory handle unit test |
174 | test_directory_handle_SOURCES = test_directory_handle.c | |
04952f7c | 175 | test_directory_handle_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) |
93bed9fe | 176 | |
dbfea1ab PP |
177 | # string utilities unit test |
178 | test_string_utils_SOURCES = test_string_utils.c | |
6ac46b1d | 179 | test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBSTRINGUTILS) $(DL_LIBS) |
b1c46f87 | 180 | |
572cb877 JR |
181 | # Notification api |
182 | test_notification_SOURCES = test_notification.c | |
b1c46f87 | 183 | test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS) |
73e9abbe JR |
184 | |
185 | # relayd backward compat for groou-by-session utilities | |
186 | test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c | |
6ac46b1d | 187 | test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(RELAYD_OBJS) |
73e9abbe | 188 | test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd |
9ca3e8a2 JG |
189 | |
190 | # fd tracker unit test | |
191 | test_fd_tracker_SOURCES = test_fd_tracker.c | |
04952f7c | 192 | test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) -lurcu $(LIBCOMMON_GPL) |
c70636a7 MJ |
193 | |
194 | # uuid unit test | |
195 | test_uuid_SOURCES = test_uuid.c | |
6ac46b1d | 196 | test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) |