Tests: add string-utils library unit tests
[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 \
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
81d029da 32
70d0b120 33# Define test programs
c77d8c84 34noinst_PROGRAMS = test_uri test_session test_kernel_data
635eb1df 35noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path
dbfea1ab 36noinst_PROGRAMS += test_string_utils
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
fe4477ee 45test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
81d029da
CB
46
47# Session unit test
827b3af0
MJ
48SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
49 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
50 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
51 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
5e97de00 52 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
9354f1d0 53 $(top_builddir)/src/common/libcommon.la \
5e97de00
JG
54 $(top_builddir)/src/common/testpoint/libtestpoint.la \
55 $(top_builddir)/src/common/compat/libcompat.la \
8782cc74
MD
56 $(top_builddir)/src/common/health/libhealth.la \
57 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
58
81d029da 59
9a363369 60test_session_SOURCES = test_session.c
d3e2ba59
JD
61test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
62 $(LIBHASHTABLE) -lrt
9a363369 63test_session_LDADD += $(SESSIONS)
81d029da
CB
64
65# UST data structures unit test
66if HAVE_LIBLTTNG_UST_CTL
827b3af0
MJ
67UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
68 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
74 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
75 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
76 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
77 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
78 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
83b45089 79 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
9354f1d0 80 $(top_builddir)/src/common/libcommon.la \
8782cc74
MD
81 $(top_builddir)/src/common/health/libhealth.la \
82 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81d029da 83
9a363369 84test_ust_data_SOURCES = test_ust_data.c
d3e2ba59
JD
85test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\
86 $(LIBHASHTABLE) -lrt -llttng-ust-ctl
9a363369 87test_ust_data_LDADD += $(UST_DATA_TRACE)
81d029da
CB
88endif
89
90# Kernel data structures unit test
827b3af0
MJ
91KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
92 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
93 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
9354f1d0 94 $(top_builddir)/src/common/libcommon.la \
8782cc74 95 $(top_builddir)/src/common/health/libhealth.la \
83b45089 96 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
8782cc74 97 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81d029da 98
9a363369 99test_kernel_data_SOURCES = test_kernel_data.c
d3e2ba59
JD
100test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
101 $(LIBHASHTABLE) -lrt
9a363369 102test_kernel_data_LDADD += $(KERN_DATA_TRACE)
70d0b120 103
c77d8c84 104# utils suffix for unit test
9354f1d0 105UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la
70d0b120 106
c77d8c84 107# parse_size_suffix unit test
70d0b120
SM
108test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
109test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
c77d8c84
RB
110test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
111
cc7f9e36
RB
112# expand_path unit test
113test_utils_expand_path_SOURCES = test_utils_expand_path.c
114test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
115test_utils_expand_path_LDADD += $(UTILS_SUFFIX)
dbfea1ab
PP
116
117# string utilities unit test
118test_string_utils_SOURCES = test_string_utils.c
119test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS)
This page took 0.047798 seconds and 5 git commands to generate.