Fix: registry can be null on lookup
[lttng-tools.git] / tests / unit / Makefile.am
CommitLineData
1501a7f3
JG
1SUBDIRS = ini_config
2
81d029da
CB
3AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils/ -I$(srcdir)
4AM_LDFLAGS =
5
8689ad30 6LOG_DRIVER_FLAGS='--merge'
a36b26b4
MJ
7LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
8 $(top_srcdir)/config/tap-driver.sh
9
10TESTS = test_kernel_data \
11 test_session \
12 test_uri \
13 test_utils_parse_size_suffix \
14 test_utils_expand_path \
dbfea1ab 15 test_string_utils \
572cb877 16 test_notification \
a36b26b4
MJ
17 ini_config/test_ini_config
18
81d029da 19if LTTNG_TOOLS_BUILD_WITH_LIBDL
d7c54334 20LIBS += -ldl
81d029da
CB
21endif
22if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
d7c54334 23LIBS += -lc
81d029da
CB
24endif
25
83c55082
CB
26LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
27
81d029da 28LIBCOMMON=$(top_builddir)/src/common/libcommon.la
dbfea1ab 29LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
81d029da
CB
30LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
31LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
d3e2ba59 32LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
572cb877 33LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
81d029da 34
70d0b120 35# Define test programs
c77d8c84 36noinst_PROGRAMS = test_uri test_session test_kernel_data
635eb1df 37noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path
572cb877 38noinst_PROGRAMS += test_string_utils test_notification
70d0b120 39
81d029da 40if HAVE_LIBLTTNG_UST_CTL
70d0b120 41noinst_PROGRAMS += test_ust_data
a36b26b4 42TESTS += test_ust_data
81d029da
CB
43endif
44
45# URI unit tests
46test_uri_SOURCES = test_uri.c
fe4477ee 47test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
81d029da
CB
48
49# Session unit test
827b3af0
MJ
50SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
51 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
52 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
53 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
5e97de00 54 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
9354f1d0 55 $(top_builddir)/src/common/libcommon.la \
5e97de00
JG
56 $(top_builddir)/src/common/testpoint/libtestpoint.la \
57 $(top_builddir)/src/common/compat/libcompat.la \
8782cc74
MD
58 $(top_builddir)/src/common/health/libhealth.la \
59 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
60
81d029da 61
9a363369 62test_session_SOURCES = test_session.c
d3e2ba59
JD
63test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
64 $(LIBHASHTABLE) -lrt
9a363369 65test_session_LDADD += $(SESSIONS)
81d029da
CB
66
67# UST data structures unit test
68if HAVE_LIBLTTNG_UST_CTL
827b3af0
MJ
69UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
74 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
75 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
76 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
77 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
78 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
79 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
80 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
83b45089 81 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
9354f1d0 82 $(top_builddir)/src/common/libcommon.la \
8782cc74
MD
83 $(top_builddir)/src/common/health/libhealth.la \
84 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81d029da 85
9a363369 86test_ust_data_SOURCES = test_ust_data.c
d3e2ba59
JD
87test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\
88 $(LIBHASHTABLE) -lrt -llttng-ust-ctl
9a363369 89test_ust_data_LDADD += $(UST_DATA_TRACE)
81d029da
CB
90endif
91
92# Kernel data structures unit test
827b3af0
MJ
93KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
94 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
95 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
9354f1d0 96 $(top_builddir)/src/common/libcommon.la \
8782cc74 97 $(top_builddir)/src/common/health/libhealth.la \
83b45089 98 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
8782cc74 99 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81d029da 100
9a363369 101test_kernel_data_SOURCES = test_kernel_data.c
d3e2ba59
JD
102test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
103 $(LIBHASHTABLE) -lrt
9a363369 104test_kernel_data_LDADD += $(KERN_DATA_TRACE)
70d0b120 105
c77d8c84 106# utils suffix for unit test
9354f1d0 107UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la
70d0b120 108
c77d8c84 109# parse_size_suffix unit test
70d0b120
SM
110test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
111test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
c77d8c84
RB
112test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
113
cc7f9e36
RB
114# expand_path unit test
115test_utils_expand_path_SOURCES = test_utils_expand_path.c
116test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
117test_utils_expand_path_LDADD += $(UTILS_SUFFIX)
dbfea1ab
PP
118
119# string utilities unit test
120test_string_utils_SOURCES = test_string_utils.c
121test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS)
572cb877
JR
122#
123# Notification api
124test_notification_SOURCES = test_notification.c
125test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL)
This page took 0.073622 seconds and 5 git commands to generate.