fd-tracker: add pipe management wrappers to fd-tracker
[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 \
a36b26b4
MJ
20 ini_config/test_ini_config
21
83c55082
CB
22LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
23
81d029da 24LIBCOMMON=$(top_builddir)/src/common/libcommon.la
dbfea1ab 25LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
81d029da
CB
26LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
27LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
d3e2ba59 28LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
572cb877 29LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
81d029da 30
70d0b120 31# Define test programs
7010c033
SM
32noinst_PROGRAMS = test_uri test_session test_kernel_data \
33 test_utils_parse_size_suffix test_utils_parse_time_suffix \
b12e3724 34 test_utils_expand_path test_utils_compat_poll \
73e9abbe
JR
35 test_string_utils test_notification test_directory_handle \
36 test_relayd_backward_compat_group_by_session
70d0b120 37
81d029da 38if HAVE_LIBLTTNG_UST_CTL
70d0b120 39noinst_PROGRAMS += test_ust_data
a36b26b4 40TESTS += test_ust_data
81d029da
CB
41endif
42
43# URI unit tests
44test_uri_SOURCES = test_uri.c
b1c46f87 45test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
81d029da 46
a7333da7
JG
47# Sessiond objects
48SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
a7333da7
JG
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) \
a7333da7
JG
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) \
827b3af0
MJ
63 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
64 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
a7333da7
JG
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) \
827b3af0 69 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
a7333da7
JG
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) \
a3707772 77 $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
9354f1d0 78 $(top_builddir)/src/common/libcommon.la \
5e97de00
JG
79 $(top_builddir)/src/common/testpoint/libtestpoint.la \
80 $(top_builddir)/src/common/compat/libcompat.la \
8782cc74
MD
81 $(top_builddir)/src/common/health/libhealth.la \
82 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
83
a7333da7
JG
84if HAVE_LIBLTTNG_UST_CTL
85SESSIOND_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) \
f9d2ba6a 89 $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \
a7333da7
JG
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)
93endif
81d029da 94
73e9abbe
JR
95RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT)
96
9a363369 97test_session_SOURCES = test_session.c
d3e2ba59 98test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
a7333da7
JG
99 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
100 $(KMOD_LIBS) \
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
108
109test_session_LDADD += $(SESSIOND_OBJS)
81d029da 110
81d029da 111if HAVE_LIBLTTNG_UST_CTL
20dd2de1 112test_session_LDADD += $(UST_CTL_LIBS)
a7333da7 113endif
81d029da 114
a7333da7
JG
115# UST data structures unit test
116if HAVE_LIBLTTNG_UST_CTL
9a363369 117test_ust_data_SOURCES = test_ust_data.c
a7333da7
JG
118test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
119 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
20dd2de1 120 $(UST_CTL_LIBS) \
a7333da7
JG
121 $(KMOD_LIBS) \
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
129test_ust_data_LDADD += $(SESSIOND_OBJS)
81d029da
CB
130endif
131
132# Kernel data structures unit test
827b3af0 133KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
658f12fa 134 $(top_builddir)/src/common/compat/libcompat.la \
827b3af0 135 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
658f12fa 136 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
827b3af0 137 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
8782cc74 138 $(top_builddir)/src/common/health/libhealth.la \
83b45089 139 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
dcabc190 140 $(LIBLTTNG_CTL)
81d029da 141
9a363369 142test_kernel_data_SOURCES = test_kernel_data.c
d3e2ba59 143test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
b1c46f87 144 $(LIBHASHTABLE) $(DL_LIBS) -lrt
9a363369 145test_kernel_data_LDADD += $(KERN_DATA_TRACE)
70d0b120 146
c77d8c84 147# utils suffix for unit test
70d0b120 148
c77d8c84 149# parse_size_suffix unit test
70d0b120 150test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
b1c46f87 151test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
c77d8c84 152
7010c033
SM
153# parse_time_suffix unit test
154test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
155test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
7010c033 156
b12e3724
YL
157# compat_poll unit test
158test_utils_compat_poll_SOURCES = test_utils_compat_poll.c
159test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \
160 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
161
cc7f9e36
RB
162# expand_path unit test
163test_utils_expand_path_SOURCES = test_utils_expand_path.c
b1c46f87 164test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
dbfea1ab 165
93bed9fe
JG
166# directory handle unit test
167test_directory_handle_SOURCES = test_directory_handle.c
168test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
169
dbfea1ab
PP
170# string utilities unit test
171test_string_utils_SOURCES = test_string_utils.c
b1c46f87
MJ
172test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
173
572cb877
JR
174# Notification api
175test_notification_SOURCES = test_notification.c
b1c46f87 176test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
73e9abbe
JR
177
178# relayd backward compat for groou-by-session utilities
179test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c
180test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS)
181test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd
This page took 0.088495 seconds and 5 git commands to generate.