Cleanup: uuid library detection
[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 \
13 test_utils_expand_path \
dbfea1ab 14 test_string_utils \
572cb877 15 test_notification \
a36b26b4
MJ
16 ini_config/test_ini_config
17
81d029da 18if LTTNG_TOOLS_BUILD_WITH_LIBDL
d7c54334 19LIBS += -ldl
81d029da
CB
20endif
21if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
d7c54334 22LIBS += -lc
81d029da
CB
23endif
24
83c55082
CB
25LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
26
81d029da 27LIBCOMMON=$(top_builddir)/src/common/libcommon.la
dbfea1ab 28LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.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
c77d8c84 35noinst_PROGRAMS = test_uri test_session test_kernel_data
635eb1df 36noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path
572cb877 37noinst_PROGRAMS += test_string_utils test_notification
70d0b120 38
81d029da 39if HAVE_LIBLTTNG_UST_CTL
70d0b120 40noinst_PROGRAMS += test_ust_data
a36b26b4 41TESTS += test_ust_data
81d029da
CB
42endif
43
44# URI unit tests
45test_uri_SOURCES = test_uri.c
fe4477ee 46test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
81d029da
CB
47
48# Session unit test
827b3af0
MJ
49SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
50 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
51 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
52 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
5e97de00 53 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
9354f1d0 54 $(top_builddir)/src/common/libcommon.la \
5e97de00
JG
55 $(top_builddir)/src/common/testpoint/libtestpoint.la \
56 $(top_builddir)/src/common/compat/libcompat.la \
8782cc74
MD
57 $(top_builddir)/src/common/health/libhealth.la \
58 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
59
81d029da 60
9a363369 61test_session_SOURCES = test_session.c
d3e2ba59
JD
62test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
63 $(LIBHASHTABLE) -lrt
9a363369 64test_session_LDADD += $(SESSIONS)
81d029da
CB
65
66# UST data structures unit test
67if HAVE_LIBLTTNG_UST_CTL
827b3af0
MJ
68UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
74 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
75 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
76 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
77 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
78 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
79 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
83b45089 80 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
9354f1d0 81 $(top_builddir)/src/common/libcommon.la \
8782cc74
MD
82 $(top_builddir)/src/common/health/libhealth.la \
83 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81d029da 84
9a363369 85test_ust_data_SOURCES = test_ust_data.c
d3e2ba59
JD
86test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\
87 $(LIBHASHTABLE) -lrt -llttng-ust-ctl
9a363369 88test_ust_data_LDADD += $(UST_DATA_TRACE)
81d029da
CB
89endif
90
91# Kernel data structures unit test
827b3af0
MJ
92KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
93 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
94 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
9354f1d0 95 $(top_builddir)/src/common/libcommon.la \
8782cc74 96 $(top_builddir)/src/common/health/libhealth.la \
83b45089 97 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
8782cc74 98 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81d029da 99
9a363369 100test_kernel_data_SOURCES = test_kernel_data.c
d3e2ba59
JD
101test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
102 $(LIBHASHTABLE) -lrt
9a363369 103test_kernel_data_LDADD += $(KERN_DATA_TRACE)
70d0b120 104
c77d8c84 105# utils suffix for unit test
9354f1d0 106UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la
70d0b120 107
c77d8c84 108# parse_size_suffix unit test
70d0b120
SM
109test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
110test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
c77d8c84
RB
111test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
112
cc7f9e36
RB
113# expand_path unit test
114test_utils_expand_path_SOURCES = test_utils_expand_path.c
115test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
116test_utils_expand_path_LDADD += $(UTILS_SUFFIX)
dbfea1ab
PP
117
118# string utilities unit test
119test_string_utils_SOURCES = test_string_utils.c
120test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS)
572cb877
JR
121#
122# Notification api
123test_notification_SOURCES = test_notification.c
124test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL)
This page took 0.071193 seconds and 5 git commands to generate.