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