trackers: support tracking feature
[lttng-tools.git] / tests / unit / Makefile.am
1 SUBDIRS = ini_config
2
3 AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
4
5 LOG_DRIVER_FLAGS='--merge'
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 \
13 test_utils_parse_time_suffix \
14 test_utils_expand_path \
15 test_utils_compat_poll \
16 test_string_utils \
17 test_notification \
18 test_directory_handle \
19 test_relayd_backward_compat_group_by_session \
20 ini_config/test_ini_config \
21 test_fd_tracker \
22 test_uuid
23
24 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
25
26 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
27 LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
28 LIBFDTRACKER=$(top_builddir)/src/common/fd-tracker/libfd-tracker.la
29 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
30 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
31 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
32 LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
33
34 # Define test programs
35 noinst_PROGRAMS = test_uri test_session test_kernel_data \
36 test_utils_parse_size_suffix test_utils_parse_time_suffix \
37 test_utils_expand_path test_utils_compat_poll \
38 test_string_utils test_notification test_directory_handle \
39 test_relayd_backward_compat_group_by_session \
40 test_fd_tracker test_uuid
41
42 if HAVE_LIBLTTNG_UST_CTL
43 noinst_PROGRAMS += test_ust_data
44 TESTS += test_ust_data
45 endif
46
47 # URI unit tests
48 test_uri_SOURCES = test_uri.c
49 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
50
51 # Sessiond objects
52 SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
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) \
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) \
67 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
68 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
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) \
73 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
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) \
81 $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
82 $(top_builddir)/src/common/libcommon.la \
83 $(top_builddir)/src/common/testpoint/libtestpoint.la \
84 $(top_builddir)/src/common/compat/libcompat.la \
85 $(top_builddir)/src/common/health/libhealth.la \
86 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
87
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) \
93 $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \
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 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT)
98 endif
99
100 RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT)
101
102 test_session_SOURCES = test_session.c
103 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
104 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
105 $(KMOD_LIBS) \
106 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
107 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
108 $(top_builddir)/src/common/compat/libcompat.la \
109 $(top_builddir)/src/common/testpoint/libtestpoint.la \
110 $(top_builddir)/src/common/health/libhealth.la \
111 $(top_builddir)/src/common/config/libconfig.la \
112 $(top_builddir)/src/common/string-utils/libstring-utils.la
113
114 test_session_LDADD += $(SESSIOND_OBJS)
115
116 if HAVE_LIBLTTNG_UST_CTL
117 test_session_LDADD += $(UST_CTL_LIBS)
118 endif
119
120 # UST data structures unit test
121 if HAVE_LIBLTTNG_UST_CTL
122 test_ust_data_SOURCES = test_ust_data.c
123 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
124 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
125 $(UST_CTL_LIBS) \
126 $(KMOD_LIBS) \
127 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
128 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
129 $(top_builddir)/src/common/compat/libcompat.la \
130 $(top_builddir)/src/common/testpoint/libtestpoint.la \
131 $(top_builddir)/src/common/health/libhealth.la \
132 $(top_builddir)/src/common/config/libconfig.la \
133 $(top_builddir)/src/common/string-utils/libstring-utils.la
134 test_ust_data_LDADD += $(SESSIOND_OBJS)
135 endif
136
137 # Kernel data structures unit test
138 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
139 $(top_builddir)/src/common/compat/libcompat.la \
140 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
141 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
142 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
143 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
144 $(top_builddir)/src/common/health/libhealth.la \
145 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
146 $(LIBLTTNG_CTL)
147
148 test_kernel_data_SOURCES = test_kernel_data.c
149 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
150 $(LIBHASHTABLE) $(DL_LIBS) -lrt
151 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
152
153 # utils suffix for unit test
154
155 # parse_size_suffix unit test
156 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
157 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
158
159 # parse_time_suffix unit test
160 test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
161 test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
162
163 # compat_poll unit test
164 test_utils_compat_poll_SOURCES = test_utils_compat_poll.c
165 test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \
166 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
167
168 # expand_path unit test
169 test_utils_expand_path_SOURCES = test_utils_expand_path.c
170 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
171
172 # directory handle unit test
173 test_directory_handle_SOURCES = test_directory_handle.c
174 test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
175
176 # string utilities unit test
177 test_string_utils_SOURCES = test_string_utils.c
178 test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
179
180 # Notification api
181 test_notification_SOURCES = test_notification.c
182 test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
183
184 # relayd backward compat for groou-by-session utilities
185 test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c
186 test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS)
187 test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd
188
189 # fd tracker unit test
190 test_fd_tracker_SOURCES = test_fd_tracker.c
191 test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) -lurcu $(LIBCOMMON) $(LIBHASHTABLE)
192
193 # uuid unit test
194 test_uuid_SOURCES = test_uuid.c
195 test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON)
This page took 0.032223 seconds and 4 git commands to generate.