tests: Implement tests for lttng-ust LTTNG_UST_BLOCKING_RETRY_TIMEOUT
[lttng-tools.git] / tests / unit / Makefile.am
1 SUBDIRS = ini_config
2
3 AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils/ -I$(srcdir)
4 AM_LDFLAGS =
5
6 LOG_DRIVER_FLAGS='--merge'
7 LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
8 $(top_srcdir)/config/tap-driver.sh
9
10 TESTS = 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
17 if LTTNG_TOOLS_BUILD_WITH_LIBDL
18 LIBS += -ldl
19 endif
20 if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
21 LIBS += -lc
22 endif
23
24 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
25
26 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
27 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
28 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
29 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
30
31 # Define test programs
32 noinst_PROGRAMS = test_uri test_session test_kernel_data
33 noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path
34
35 if HAVE_LIBLTTNG_UST_CTL
36 noinst_PROGRAMS += test_ust_data
37 TESTS += test_ust_data
38 endif
39
40 # URI unit tests
41 test_uri_SOURCES = test_uri.c
42 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
43
44 # Session unit test
45 SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
46 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
47 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
48 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
49 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
50 $(top_builddir)/src/common/libcommon.la \
51 $(top_builddir)/src/common/testpoint/libtestpoint.la \
52 $(top_builddir)/src/common/compat/libcompat.la \
53 $(top_builddir)/src/common/health/libhealth.la \
54 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
55
56
57 test_session_SOURCES = test_session.c
58 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
59 $(LIBHASHTABLE) -lrt
60 test_session_LDADD += $(SESSIONS)
61
62 # UST data structures unit test
63 if HAVE_LIBLTTNG_UST_CTL
64 UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
65 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
66 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
67 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
68 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
74 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
75 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
76 $(top_builddir)/src/common/libcommon.la \
77 $(top_builddir)/src/common/health/libhealth.la \
78 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
79
80 test_ust_data_SOURCES = test_ust_data.c
81 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\
82 $(LIBHASHTABLE) -lrt -llttng-ust-ctl
83 test_ust_data_LDADD += $(UST_DATA_TRACE)
84 endif
85
86 # Kernel data structures unit test
87 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
88 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
89 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
90 $(top_builddir)/src/common/libcommon.la \
91 $(top_builddir)/src/common/health/libhealth.la \
92 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
93
94 test_kernel_data_SOURCES = test_kernel_data.c
95 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
96 $(LIBHASHTABLE) -lrt
97 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
98
99 # utils suffix for unit test
100 UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la
101
102 # parse_size_suffix unit test
103 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
104 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
105 test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
106
107 # expand_path unit test
108 test_utils_expand_path_SOURCES = test_utils_expand_path.c
109 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
110 test_utils_expand_path_LDADD += $(UTILS_SUFFIX)
This page took 0.039043 seconds and 4 git commands to generate.