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) \ |
202486fa | 9 | $(top_srcdir)/tests/utils/tap-driver.sh |
a36b26b4 | 10 | |
ba72b3e8 | 11 | TESTS = \ |
9ca3e8a2 | 12 | ini_config/test_ini_config \ |
9cff59ec | 13 | test_action \ |
c0a66c84 | 14 | test_buffer_view \ |
ba72b3e8 | 15 | test_directory_handle \ |
748b5f7b | 16 | test_event_expr_to_bytecode \ |
ba72b3e8 JR |
17 | test_event_rule \ |
18 | test_fd_tracker \ | |
7f4d5b07 | 19 | test_rate_policy \ |
ba72b3e8 JR |
20 | test_kernel_data \ |
21 | test_kernel_probe \ | |
85b05318 | 22 | test_log_level_rule \ |
ba72b3e8 | 23 | test_notification \ |
0b5a4de9 | 24 | test_payload \ |
ba72b3e8 JR |
25 | test_relayd_backward_compat_group_by_session \ |
26 | test_session \ | |
27 | test_string_utils \ | |
808cb744 | 28 | test_unix_socket \ |
ba72b3e8 JR |
29 | test_uri \ |
30 | test_utils_compat_poll \ | |
31 | test_utils_compat_pthread \ | |
32 | test_utils_expand_path \ | |
33 | test_utils_parse_size_suffix \ | |
34 | test_utils_parse_time_suffix \ | |
55b1df44 | 35 | test_trace_format_descriptor \ |
ba72b3e8 | 36 | test_uuid |
a36b26b4 | 37 | |
83c55082 CB |
38 | LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la |
39 | ||
6a5596ac | 40 | LIBCOMMON_GPL=$(top_builddir)/src/common/libcommon-gpl.la |
4ae04234 MJ |
41 | LIBSTRINGUTILS=$(top_builddir)/src/common/libstring-utils.la |
42 | LIBFDTRACKER=$(top_builddir)/src/common/libfd-tracker.la | |
43 | LIBSESSIOND_COMM=$(top_builddir)/src/common/libsessiond-comm.la | |
44 | LIBRELAYD=$(top_builddir)/src/common/librelayd.la | |
572cb877 | 45 | LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la |
3efe5ec9 | 46 | LIBLTTNG_SESSIOND_COMMON=$(top_builddir)/src/bin/lttng-sessiond/liblttng-sessiond-common.la |
81d029da | 47 | |
70d0b120 | 48 | # Define test programs |
26d0e356 | 49 | noinst_PROGRAMS = \ |
9cff59ec | 50 | test_action \ |
26d0e356 JR |
51 | test_buffer_view \ |
52 | test_condition \ | |
53 | test_directory_handle \ | |
54 | test_event_expr_to_bytecode \ | |
55 | test_event_rule \ | |
56 | test_fd_tracker \ | |
7f4d5b07 | 57 | test_rate_policy \ |
26d0e356 JR |
58 | test_kernel_data \ |
59 | test_kernel_probe \ | |
85b05318 | 60 | test_log_level_rule \ |
26d0e356 JR |
61 | test_notification \ |
62 | test_payload \ | |
63 | test_relayd_backward_compat_group_by_session \ | |
64 | test_session \ | |
65 | test_string_utils \ | |
55b1df44 | 66 | test_trace_format_descriptor \ |
26d0e356 JR |
67 | test_unix_socket \ |
68 | test_uri \ | |
69 | test_utils_compat_poll \ | |
70 | test_utils_compat_pthread \ | |
71 | test_utils_expand_path \ | |
72 | test_utils_parse_size_suffix \ | |
73 | test_utils_parse_time_suffix \ | |
74 | test_uuid | |
70d0b120 | 75 | |
81d029da | 76 | if HAVE_LIBLTTNG_UST_CTL |
70d0b120 | 77 | noinst_PROGRAMS += test_ust_data |
a36b26b4 | 78 | TESTS += test_ust_data |
81d029da CB |
79 | endif |
80 | ||
81 | # URI unit tests | |
740da7d5 | 82 | test_uri_SOURCES = test_uri.cpp |
93903fd5 | 83 | test_uri_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) |
81d029da | 84 | |
73e9abbe JR |
85 | RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT) |
86 | ||
7966af57 | 87 | test_session_SOURCES = test_session.cpp |
2e0bfcbf | 88 | test_session_LDADD = $(LIBTAP) $(LIBLTTNG_SESSIOND_COMMON) $(DL_LIBS) |
81d029da | 89 | |
81d029da | 90 | if HAVE_LIBLTTNG_UST_CTL |
488dbb60 | 91 | test_session_SOURCES += ust-sigbus.cpp |
20dd2de1 | 92 | test_session_LDADD += $(UST_CTL_LIBS) |
a7333da7 | 93 | endif |
81d029da | 94 | |
a7333da7 JG |
95 | # UST data structures unit test |
96 | if HAVE_LIBLTTNG_UST_CTL | |
7966af57 | 97 | test_ust_data_SOURCES = test_ust_data.cpp |
2e0bfcbf | 98 | test_ust_data_LDADD = $(LIBTAP) $(LIBLTTNG_SESSIOND_COMMON) $(DL_LIBS) |
81d029da CB |
99 | endif |
100 | ||
7966af57 | 101 | test_kernel_data_SOURCES = test_kernel_data.cpp |
3efe5ec9 | 102 | test_kernel_data_LDADD = $(LIBTAP) $(LIBLTTNG_SESSIOND_COMMON) $(DL_LIBS) |
70d0b120 | 103 | |
c77d8c84 | 104 | # utils suffix for unit test |
70d0b120 | 105 | |
c77d8c84 | 106 | # parse_size_suffix unit test |
740da7d5 | 107 | test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.cpp |
93903fd5 | 108 | test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) |
c77d8c84 | 109 | |
7010c033 | 110 | # parse_time_suffix unit test |
740da7d5 | 111 | test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.cpp |
93903fd5 | 112 | test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) |
7010c033 | 113 | |
b12e3724 | 114 | # compat_poll unit test |
740da7d5 | 115 | test_utils_compat_poll_SOURCES = test_utils_compat_poll.cpp |
93903fd5 | 116 | test_utils_compat_poll_LDADD = $(LIBTAP) $(DL_LIBS) \ |
4ae04234 | 117 | $(top_builddir)/src/common/libcompat.la $(LIBCOMMON_GPL) |
b12e3724 | 118 | |
014d7d3b | 119 | # compat_pthread unit test |
740da7d5 | 120 | test_utils_compat_pthread_SOURCES = test_utils_compat_pthread.cpp |
014d7d3b | 121 | test_utils_compat_pthread_LDADD = $(LIBTAP) \ |
4ae04234 | 122 | $(top_builddir)/src/common/libcompat.la $(LIBCOMMON_GPL) |
014d7d3b | 123 | |
cc7f9e36 | 124 | # expand_path unit test |
740da7d5 | 125 | test_utils_expand_path_SOURCES = test_utils_expand_path.cpp |
93903fd5 | 126 | test_utils_expand_path_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) |
dbfea1ab | 127 | |
93bed9fe | 128 | # directory handle unit test |
740da7d5 | 129 | test_directory_handle_SOURCES = test_directory_handle.cpp |
93903fd5 | 130 | test_directory_handle_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) |
93bed9fe | 131 | |
dbfea1ab | 132 | # string utilities unit test |
740da7d5 | 133 | test_string_utils_SOURCES = test_string_utils.cpp |
6a5596ac | 134 | test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBSTRINGUTILS) $(DL_LIBS) |
b1c46f87 | 135 | |
572cb877 | 136 | # Notification api |
740da7d5 | 137 | test_notification_SOURCES = test_notification.cpp |
b1c46f87 | 138 | test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS) |
2b4c142d | 139 | |
dbc20d3c | 140 | # Event rule api |
740da7d5 | 141 | test_event_rule_SOURCES = test_event_rule.cpp |
6a5596ac | 142 | test_event_rule_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \ |
2b4c142d | 143 | $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) |
73e9abbe | 144 | |
d17cfa5d | 145 | # Condition api |
740da7d5 | 146 | test_condition_SOURCES = test_condition.cpp |
6a5596ac | 147 | test_condition_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) |
d17cfa5d | 148 | |
73e9abbe | 149 | # relayd backward compat for groou-by-session utilities |
ac497a37 | 150 | test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.cpp |
6a5596ac | 151 | test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(RELAYD_OBJS) |
73e9abbe | 152 | test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd |
9ca3e8a2 | 153 | |
7f4d5b07 | 154 | # rate policy object unit test |
740da7d5 | 155 | test_rate_policy_SOURCES = test_rate_policy.cpp |
6a5596ac | 156 | test_rate_policy_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \ |
e44b5645 JR |
157 | $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) |
158 | ||
9ca3e8a2 | 159 | # fd tracker unit test |
740da7d5 | 160 | test_fd_tracker_SOURCES = test_fd_tracker.cpp |
93903fd5 | 161 | test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON_GPL) |
c70636a7 MJ |
162 | |
163 | # uuid unit test | |
740da7d5 | 164 | test_uuid_SOURCES = test_uuid.cpp |
6a5596ac | 165 | test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) |
67d8e2ef SM |
166 | |
167 | # buffer view unit test | |
740da7d5 | 168 | test_buffer_view_SOURCES = test_buffer_view.cpp |
6a5596ac | 169 | test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) |
c0a66c84 JG |
170 | |
171 | # payload unit test | |
740da7d5 | 172 | test_payload_SOURCES = test_payload.cpp |
6a5596ac | 173 | test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON_GPL) |
0b5a4de9 JG |
174 | |
175 | # unix socket test | |
740da7d5 | 176 | test_unix_socket_SOURCES = test_unix_socket.cpp |
6a5596ac | 177 | test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON_GPL) |
808cb744 JR |
178 | |
179 | # Kernel probe location api test | |
740da7d5 | 180 | test_kernel_probe_SOURCES = test_kernel_probe.cpp |
6a5596ac | 181 | test_kernel_probe_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) |
748b5f7b SM |
182 | # |
183 | # Event expression to bytecode test | |
740da7d5 | 184 | test_event_expr_to_bytecode_SOURCES = test_event_expr_to_bytecode.cpp |
6a5596ac | 185 | test_event_expr_to_bytecode_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(LIBCOMMON_GPL) |
85b05318 JR |
186 | |
187 | # Log level rule api | |
740da7d5 | 188 | test_log_level_rule_SOURCES = test_log_level_rule.cpp |
6a5596ac | 189 | test_log_level_rule_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) |
9cff59ec JR |
190 | |
191 | # Action api | |
740da7d5 | 192 | test_action_SOURCES = test_action.cpp |
6a5596ac | 193 | test_action_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) |
55b1df44 JR |
194 | |
195 | # Trace format descriptor | |
196 | test_trace_format_descriptor_SOURCES = test_trace_format_descriptor.cpp | |
197 | test_trace_format_descriptor_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) |