3 AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
5 LOG_DRIVER_FLAGS='--merge'
6 LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
7 $(top_srcdir)/config/tap-driver.sh
9 TESTS = test_kernel_data \
12 test_utils_parse_size_suffix \
13 test_utils_parse_time_suffix \
14 test_utils_expand_path \
15 test_utils_compat_poll \
18 test_directory_handle \
19 test_relayd_backward_compat_group_by_session \
20 ini_config/test_ini_config
22 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
24 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
25 LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
26 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
27 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
28 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
29 LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
31 # Define test programs
32 noinst_PROGRAMS = test_uri test_session test_kernel_data \
33 test_utils_parse_size_suffix test_utils_parse_time_suffix \
34 test_utils_expand_path test_utils_compat_poll \
35 test_string_utils test_notification test_directory_handle \
36 test_relayd_backward_compat_group_by_session
38 if HAVE_LIBLTTNG_UST_CTL
39 noinst_PROGRAMS += test_ust_data
40 TESTS += test_ust_data
44 test_uri_SOURCES = test_uri.c
45 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
48 SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
49 $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \
50 $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \
51 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
52 $(top_builddir)/src/bin/lttng-sessiond/shm.$(OBJEXT) \
53 $(top_builddir)/src/bin/lttng-sessiond/kernel.$(OBJEXT) \
54 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
55 $(top_builddir)/src/bin/lttng-sessiond/notification-thread.$(OBJEXT) \
56 $(top_builddir)/src/bin/lttng-sessiond/lttng-syscall.$(OBJEXT) \
57 $(top_builddir)/src/bin/lttng-sessiond/channel.$(OBJEXT) \
58 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
59 $(top_builddir)/src/bin/lttng-sessiond/kernel-consumer.$(OBJEXT) \
60 $(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
61 $(top_builddir)/src/bin/lttng-sessiond/rotation-thread.$(OBJEXT) \
62 $(top_builddir)/src/bin/lttng-sessiond/context.$(OBJEXT) \
63 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
64 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
65 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
66 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-events.$(OBJEXT) \
67 $(top_builddir)/src/bin/lttng-sessiond/event.$(OBJEXT) \
68 $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/sessiond-config.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/rotate.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/modprobe.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
74 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
75 $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \
76 $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \
77 $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
78 $(top_builddir)/src/common/libcommon.la \
79 $(top_builddir)/src/common/testpoint/libtestpoint.la \
80 $(top_builddir)/src/common/compat/libcompat.la \
81 $(top_builddir)/src/common/health/libhealth.la \
82 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
84 if HAVE_LIBLTTNG_UST_CTL
85 SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
86 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
87 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
88 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
89 $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \
90 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
91 $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \
92 $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT)
95 RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT)
97 test_session_SOURCES = test_session.c
98 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
99 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
101 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
102 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
103 $(top_builddir)/src/common/compat/libcompat.la \
104 $(top_builddir)/src/common/testpoint/libtestpoint.la \
105 $(top_builddir)/src/common/health/libhealth.la \
106 $(top_builddir)/src/common/config/libconfig.la \
107 $(top_builddir)/src/common/string-utils/libstring-utils.la
109 test_session_LDADD += $(SESSIOND_OBJS)
111 if HAVE_LIBLTTNG_UST_CTL
112 test_session_LDADD += $(UST_CTL_LIBS)
115 # UST data structures unit test
116 if HAVE_LIBLTTNG_UST_CTL
117 test_ust_data_SOURCES = test_ust_data.c
118 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
119 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
122 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
123 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
124 $(top_builddir)/src/common/compat/libcompat.la \
125 $(top_builddir)/src/common/testpoint/libtestpoint.la \
126 $(top_builddir)/src/common/health/libhealth.la \
127 $(top_builddir)/src/common/config/libconfig.la \
128 $(top_builddir)/src/common/string-utils/libstring-utils.la
129 test_ust_data_LDADD += $(SESSIOND_OBJS)
132 # Kernel data structures unit test
133 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
134 $(top_builddir)/src/common/compat/libcompat.la \
135 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
136 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
137 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
138 $(top_builddir)/src/common/health/libhealth.la \
139 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
142 test_kernel_data_SOURCES = test_kernel_data.c
143 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
144 $(LIBHASHTABLE) $(DL_LIBS) -lrt
145 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
147 # utils suffix for unit test
149 # parse_size_suffix unit test
150 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
151 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
153 # parse_time_suffix unit test
154 test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
155 test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
157 # compat_poll unit test
158 test_utils_compat_poll_SOURCES = test_utils_compat_poll.c
159 test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \
160 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
162 # expand_path unit test
163 test_utils_expand_path_SOURCES = test_utils_expand_path.c
164 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
166 # directory handle unit test
167 test_directory_handle_SOURCES = test_directory_handle.c
168 test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
170 # string utilities unit test
171 test_string_utils_SOURCES = test_string_utils.c
172 test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
175 test_notification_SOURCES = test_notification.c
176 test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
178 # relayd backward compat for groou-by-session utilities
179 test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c
180 test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS)
181 test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd