Fix: Define MANPATH in config.h
[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 \
15 ini_config/test_ini_config
16
81d029da 17if LTTNG_TOOLS_BUILD_WITH_LIBDL
d7c54334 18LIBS += -ldl
81d029da
CB
19endif
20if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
d7c54334 21LIBS += -lc
81d029da
CB
22endif
23
83c55082
CB
24LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
25
81d029da
CB
26LIBCOMMON=$(top_builddir)/src/common/libcommon.la
27LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
28LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
d3e2ba59 29LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
81d029da 30
70d0b120 31# Define test programs
c77d8c84 32noinst_PROGRAMS = test_uri test_session test_kernel_data
635eb1df 33noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path
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
fe4477ee 42test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
81d029da
CB
43
44# Session unit test
f1789650
DG
45SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.o \
46 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
47 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
6dc3064a 48 $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \
3622d7c3
SM
49 $(top_builddir)/src/common/uri.o \
50 $(top_builddir)/src/common/utils.o \
51 $(top_builddir)/src/common/error.o \
8782cc74
MD
52 $(top_builddir)/src/common/health/libhealth.la \
53 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
54
81d029da 55
9a363369 56test_session_SOURCES = test_session.c
d3e2ba59
JD
57test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
58 $(LIBHASHTABLE) -lrt
9a363369 59test_session_LDADD += $(SESSIONS)
81d029da
CB
60
61# UST data structures unit test
62if HAVE_LIBLTTNG_UST_CTL
f1789650
DG
63UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.o \
64 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
65 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
66 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.o \
67 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.o \
68 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.o \
69 $(top_builddir)/src/bin/lttng-sessiond/ust-app.o \
70 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.o \
71 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.o \
f1789650 72 $(top_builddir)/src/bin/lttng-sessiond/session.o \
6dc3064a 73 $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \
022d91ba 74 $(top_builddir)/src/bin/lttng-sessiond/agent.o \
3622d7c3
SM
75 $(top_builddir)/src/common/uri.o \
76 $(top_builddir)/src/common/utils.o \
8782cc74
MD
77 $(top_builddir)/src/common/health/libhealth.la \
78 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81d029da 79
9a363369 80test_ust_data_SOURCES = test_ust_data.c
d3e2ba59
JD
81test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\
82 $(LIBHASHTABLE) -lrt -llttng-ust-ctl
9a363369 83test_ust_data_LDADD += $(UST_DATA_TRACE)
81d029da
CB
84endif
85
86# Kernel data structures unit test
f1789650
DG
87KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.o \
88 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
f1789650 89 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
3622d7c3
SM
90 $(top_builddir)/src/common/uri.o \
91 $(top_builddir)/src/common/utils.o \
8782cc74
MD
92 $(top_builddir)/src/common/health/libhealth.la \
93 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81d029da 94
9a363369 95test_kernel_data_SOURCES = test_kernel_data.c
d3e2ba59
JD
96test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
97 $(LIBHASHTABLE) -lrt
9a363369 98test_kernel_data_LDADD += $(KERN_DATA_TRACE)
70d0b120 99
c77d8c84 100# utils suffix for unit test
3622d7c3
SM
101UTILS_SUFFIX=$(top_builddir)/src/common/utils.o \
102 $(top_builddir)/src/common/runas.o
70d0b120 103
c77d8c84 104# parse_size_suffix unit test
70d0b120
SM
105test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
106test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
c77d8c84
RB
107test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
108
cc7f9e36
RB
109# expand_path unit test
110test_utils_expand_path_SOURCES = test_utils_expand_path.c
111test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
112test_utils_expand_path_LDADD += $(UTILS_SUFFIX)
This page took 0.067457 seconds and 5 git commands to generate.