Sync lttng-ust ABI version in ust-abi-internal.h
[lttng-tools.git] / tests / unit / Makefile.am
CommitLineData
1501a7f3
JG
1SUBDIRS = ini_config
2
343af227 3AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
81d029da 4
8689ad30 5LOG_DRIVER_FLAGS='--merge'
a36b26b4
MJ
6LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
7 $(top_srcdir)/config/tap-driver.sh
8
9TESTS = 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
24LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
25
81d029da 26LIBCOMMON=$(top_builddir)/src/common/libcommon.la
dbfea1ab 27LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
9ca3e8a2 28LIBFDTRACKER=$(top_builddir)/src/common/fd-tracker/libfd-tracker.la
81d029da
CB
29LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
30LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
d3e2ba59 31LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
572cb877 32LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
81d029da 33
70d0b120 34# Define test programs
7010c033
SM
35noinst_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 42if HAVE_LIBLTTNG_UST_CTL
70d0b120 43noinst_PROGRAMS += test_ust_data
a36b26b4 44TESTS += test_ust_data
81d029da
CB
45endif
46
47# URI unit tests
48test_uri_SOURCES = test_uri.c
b1c46f87 49test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
81d029da 50
a7333da7
JG
51# Sessiond objects
52SESSIOND_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
88if HAVE_LIBLTTNG_UST_CTL
89SESSIOND_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) \
55c9e7ca
JR
96 $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT) \
97 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT)
a7333da7 98endif
81d029da 99
73e9abbe
JR
100RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT)
101
9a363369 102test_session_SOURCES = test_session.c
d3e2ba59 103test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
a7333da7
JG
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
114test_session_LDADD += $(SESSIOND_OBJS)
81d029da 115
81d029da 116if HAVE_LIBLTTNG_UST_CTL
20dd2de1 117test_session_LDADD += $(UST_CTL_LIBS)
a7333da7 118endif
81d029da 119
a7333da7
JG
120# UST data structures unit test
121if HAVE_LIBLTTNG_UST_CTL
9a363369 122test_ust_data_SOURCES = test_ust_data.c
a7333da7
JG
123test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
124 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
20dd2de1 125 $(UST_CTL_LIBS) \
a7333da7
JG
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
134test_ust_data_LDADD += $(SESSIOND_OBJS)
81d029da
CB
135endif
136
137# Kernel data structures unit test
827b3af0 138KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
658f12fa 139 $(top_builddir)/src/common/compat/libcompat.la \
827b3af0 140 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
658f12fa 141 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
827b3af0 142 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
55c9e7ca 143 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
8782cc74 144 $(top_builddir)/src/common/health/libhealth.la \
83b45089 145 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
dcabc190 146 $(LIBLTTNG_CTL)
81d029da 147
9a363369 148test_kernel_data_SOURCES = test_kernel_data.c
d3e2ba59 149test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
b1c46f87 150 $(LIBHASHTABLE) $(DL_LIBS) -lrt
9a363369 151test_kernel_data_LDADD += $(KERN_DATA_TRACE)
70d0b120 152
c77d8c84 153# utils suffix for unit test
70d0b120 154
c77d8c84 155# parse_size_suffix unit test
70d0b120 156test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
b1c46f87 157test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
c77d8c84 158
7010c033
SM
159# parse_time_suffix unit test
160test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
161test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
7010c033 162
b12e3724
YL
163# compat_poll unit test
164test_utils_compat_poll_SOURCES = test_utils_compat_poll.c
165test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \
166 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
167
cc7f9e36
RB
168# expand_path unit test
169test_utils_expand_path_SOURCES = test_utils_expand_path.c
b1c46f87 170test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
dbfea1ab 171
93bed9fe
JG
172# directory handle unit test
173test_directory_handle_SOURCES = test_directory_handle.c
174test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
175
dbfea1ab
PP
176# string utilities unit test
177test_string_utils_SOURCES = test_string_utils.c
b1c46f87
MJ
178test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
179
572cb877
JR
180# Notification api
181test_notification_SOURCES = test_notification.c
b1c46f87 182test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
73e9abbe
JR
183
184# relayd backward compat for groou-by-session utilities
185test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c
186test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS)
187test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd
9ca3e8a2
JG
188
189# fd tracker unit test
190test_fd_tracker_SOURCES = test_fd_tracker.c
191test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) -lurcu $(LIBCOMMON) $(LIBHASHTABLE)
c70636a7
MJ
192
193# uuid unit test
194test_uuid_SOURCES = test_uuid.c
195test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON)
This page took 0.0988 seconds and 5 git commands to generate.