3 AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
5 LOG_DRIVER_FLAGS='--merge'
6 LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
7 $(top_srcdir)/config/tap-driver.sh
9 TESTS = test_kernel_data \
12 test_utils_parse_size_suffix \
13 test_utils_expand_path \
16 ini_config/test_ini_config
18 if LTTNG_TOOLS_BUILD_WITH_LIBDL
21 if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
25 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
27 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
28 LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
29 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
30 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
31 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
32 LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
34 # Define test programs
35 noinst_PROGRAMS = test_uri test_session test_kernel_data
36 noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path
37 noinst_PROGRAMS += test_string_utils test_notification
39 if HAVE_LIBLTTNG_UST_CTL
40 noinst_PROGRAMS += test_ust_data
41 TESTS += test_ust_data
45 test_uri_SOURCES = test_uri.c
46 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
49 SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
50 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
51 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
52 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
53 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
54 $(top_builddir)/src/common/libcommon.la \
55 $(top_builddir)/src/common/testpoint/libtestpoint.la \
56 $(top_builddir)/src/common/compat/libcompat.la \
57 $(top_builddir)/src/common/health/libhealth.la \
58 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
61 test_session_SOURCES = test_session.c
62 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
64 test_session_LDADD += $(SESSIONS)
66 # UST data structures unit test
67 if HAVE_LIBLTTNG_UST_CTL
68 UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
74 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
75 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
76 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
77 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
78 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
79 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
80 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
81 $(top_builddir)/src/common/libcommon.la \
82 $(top_builddir)/src/common/health/libhealth.la \
83 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
85 test_ust_data_SOURCES = test_ust_data.c
86 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\
87 $(LIBHASHTABLE) -lrt -llttng-ust-ctl
88 test_ust_data_LDADD += $(UST_DATA_TRACE)
91 # Kernel data structures unit test
92 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
93 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
94 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
95 $(top_builddir)/src/common/libcommon.la \
96 $(top_builddir)/src/common/health/libhealth.la \
97 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
98 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
100 test_kernel_data_SOURCES = test_kernel_data.c
101 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
103 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
105 # utils suffix for unit test
106 UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la
108 # parse_size_suffix unit test
109 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
110 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
111 test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
113 # expand_path unit test
114 test_utils_expand_path_SOURCES = test_utils_expand_path.c
115 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
116 test_utils_expand_path_LDADD += $(UTILS_SUFFIX)
118 # string utilities unit test
119 test_string_utils_SOURCES = test_string_utils.c
120 test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS)
123 test_notification_SOURCES = test_notification.c
124 test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL)