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