relayd: Add backward compatibility for --group-output-by-session
[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 \
a36b26b4
MJ
19 ini_config/test_ini_config
20
83c55082
CB
21LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
22
81d029da 23LIBCOMMON=$(top_builddir)/src/common/libcommon.la
dbfea1ab 24LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
81d029da
CB
25LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
26LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
d3e2ba59 27LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
572cb877 28LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
81d029da 29
70d0b120 30# Define test programs
7010c033
SM
31noinst_PROGRAMS = test_uri test_session test_kernel_data \
32 test_utils_parse_size_suffix test_utils_parse_time_suffix \
b12e3724 33 test_utils_expand_path test_utils_compat_poll \
93bed9fe 34 test_string_utils test_notification test_directory_handle
70d0b120 35
81d029da 36if HAVE_LIBLTTNG_UST_CTL
70d0b120 37noinst_PROGRAMS += test_ust_data
a36b26b4 38TESTS += test_ust_data
81d029da
CB
39endif
40
41# URI unit tests
42test_uri_SOURCES = test_uri.c
b1c46f87 43test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
81d029da 44
a7333da7
JG
45# Sessiond objects
46SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
a7333da7
JG
47 $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \
48 $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \
49 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
50 $(top_builddir)/src/bin/lttng-sessiond/shm.$(OBJEXT) \
51 $(top_builddir)/src/bin/lttng-sessiond/kernel.$(OBJEXT) \
52 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
53 $(top_builddir)/src/bin/lttng-sessiond/notification-thread.$(OBJEXT) \
54 $(top_builddir)/src/bin/lttng-sessiond/lttng-syscall.$(OBJEXT) \
55 $(top_builddir)/src/bin/lttng-sessiond/channel.$(OBJEXT) \
56 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
a7333da7
JG
57 $(top_builddir)/src/bin/lttng-sessiond/kernel-consumer.$(OBJEXT) \
58 $(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
59 $(top_builddir)/src/bin/lttng-sessiond/rotation-thread.$(OBJEXT) \
60 $(top_builddir)/src/bin/lttng-sessiond/context.$(OBJEXT) \
827b3af0
MJ
61 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
62 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
a7333da7
JG
63 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
64 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-events.$(OBJEXT) \
65 $(top_builddir)/src/bin/lttng-sessiond/event.$(OBJEXT) \
66 $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \
827b3af0 67 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
a7333da7
JG
68 $(top_builddir)/src/bin/lttng-sessiond/sessiond-config.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/rotate.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/modprobe.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \
74 $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \
a3707772 75 $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
9354f1d0 76 $(top_builddir)/src/common/libcommon.la \
5e97de00
JG
77 $(top_builddir)/src/common/testpoint/libtestpoint.la \
78 $(top_builddir)/src/common/compat/libcompat.la \
8782cc74
MD
79 $(top_builddir)/src/common/health/libhealth.la \
80 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81
a7333da7
JG
82if HAVE_LIBLTTNG_UST_CTL
83SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
84 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
85 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
86 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
f9d2ba6a 87 $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \
a7333da7
JG
88 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
89 $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \
90 $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT)
91endif
81d029da 92
9a363369 93test_session_SOURCES = test_session.c
d3e2ba59 94test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
a7333da7
JG
95 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
96 $(KMOD_LIBS) \
97 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
98 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
99 $(top_builddir)/src/common/compat/libcompat.la \
100 $(top_builddir)/src/common/testpoint/libtestpoint.la \
101 $(top_builddir)/src/common/health/libhealth.la \
102 $(top_builddir)/src/common/config/libconfig.la \
103 $(top_builddir)/src/common/string-utils/libstring-utils.la
104
105test_session_LDADD += $(SESSIOND_OBJS)
81d029da 106
81d029da 107if HAVE_LIBLTTNG_UST_CTL
20dd2de1 108test_session_LDADD += $(UST_CTL_LIBS)
a7333da7 109endif
81d029da 110
a7333da7
JG
111# UST data structures unit test
112if HAVE_LIBLTTNG_UST_CTL
9a363369 113test_ust_data_SOURCES = test_ust_data.c
a7333da7
JG
114test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
115 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
20dd2de1 116 $(UST_CTL_LIBS) \
a7333da7
JG
117 $(KMOD_LIBS) \
118 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
119 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
120 $(top_builddir)/src/common/compat/libcompat.la \
121 $(top_builddir)/src/common/testpoint/libtestpoint.la \
122 $(top_builddir)/src/common/health/libhealth.la \
123 $(top_builddir)/src/common/config/libconfig.la \
124 $(top_builddir)/src/common/string-utils/libstring-utils.la
125test_ust_data_LDADD += $(SESSIOND_OBJS)
81d029da
CB
126endif
127
128# Kernel data structures unit test
827b3af0 129KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
658f12fa 130 $(top_builddir)/src/common/compat/libcompat.la \
827b3af0 131 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
658f12fa 132 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
827b3af0 133 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
8782cc74 134 $(top_builddir)/src/common/health/libhealth.la \
83b45089 135 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
dcabc190 136 $(LIBLTTNG_CTL)
81d029da 137
9a363369 138test_kernel_data_SOURCES = test_kernel_data.c
d3e2ba59 139test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
b1c46f87 140 $(LIBHASHTABLE) $(DL_LIBS) -lrt
9a363369 141test_kernel_data_LDADD += $(KERN_DATA_TRACE)
70d0b120 142
c77d8c84 143# utils suffix for unit test
70d0b120 144
c77d8c84 145# parse_size_suffix unit test
70d0b120 146test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
b1c46f87 147test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
c77d8c84 148
7010c033
SM
149# parse_time_suffix unit test
150test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
151test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
7010c033 152
b12e3724
YL
153# compat_poll unit test
154test_utils_compat_poll_SOURCES = test_utils_compat_poll.c
155test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \
156 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
157
cc7f9e36
RB
158# expand_path unit test
159test_utils_expand_path_SOURCES = test_utils_expand_path.c
b1c46f87 160test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
dbfea1ab 161
93bed9fe
JG
162# directory handle unit test
163test_directory_handle_SOURCES = test_directory_handle.c
164test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
165
dbfea1ab
PP
166# string utilities unit test
167test_string_utils_SOURCES = test_string_utils.c
b1c46f87
MJ
168test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
169
572cb877
JR
170# Notification api
171test_notification_SOURCES = test_notification.c
b1c46f87 172test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
This page took 0.089108 seconds and 5 git commands to generate.