3 AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils/ -I$(srcdir)
6 if LTTNG_TOOLS_BUILD_WITH_LIBDL
9 if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
13 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
15 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
16 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
17 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
18 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
20 # Define test programs
21 noinst_PROGRAMS = test_uri test_session test_kernel_data
22 noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path
24 if HAVE_LIBLTTNG_UST_CTL
25 noinst_PROGRAMS += test_ust_data
29 test_uri_SOURCES = test_uri.c
30 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
33 SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.o \
34 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
35 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
36 $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \
37 $(top_builddir)/src/common/.libs/uri.o \
38 $(top_builddir)/src/common/.libs/utils.o \
39 $(top_builddir)/src/common/.libs/error.o \
40 $(top_builddir)/src/common/health/libhealth.la \
41 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
44 test_session_SOURCES = test_session.c
45 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
47 test_session_LDADD += $(SESSIONS)
49 # UST data structures unit test
50 if HAVE_LIBLTTNG_UST_CTL
51 UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.o \
52 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
53 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
54 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.o \
55 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.o \
56 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.o \
57 $(top_builddir)/src/bin/lttng-sessiond/ust-app.o \
58 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.o \
59 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.o \
60 $(top_builddir)/src/bin/lttng-sessiond/session.o \
61 $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \
62 $(top_builddir)/src/bin/lttng-sessiond/agent.o \
63 $(top_builddir)/src/common/.libs/uri.o \
64 $(top_builddir)/src/common/.libs/utils.o \
65 $(top_builddir)/src/common/health/libhealth.la \
66 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
68 test_ust_data_SOURCES = test_ust_data.c
69 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\
70 $(LIBHASHTABLE) -lrt -llttng-ust-ctl
71 test_ust_data_LDADD += $(UST_DATA_TRACE)
74 # Kernel data structures unit test
75 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.o \
76 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
77 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
78 $(top_builddir)/src/common/.libs/uri.o \
79 $(top_builddir)/src/common/.libs/utils.o \
80 $(top_builddir)/src/common/health/libhealth.la \
81 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
83 test_kernel_data_SOURCES = test_kernel_data.c
84 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
86 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
88 # utils suffix for unit test
89 UTILS_SUFFIX=$(top_builddir)/src/common/.libs/utils.o \
90 $(top_builddir)/src/common/.libs/runas.o
92 # parse_size_suffix unit test
93 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
94 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
95 test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
97 # expand_path unit test
98 test_utils_expand_path_SOURCES = test_utils_expand_path.c
99 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
100 test_utils_expand_path_LDADD += $(UTILS_SUFFIX)