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