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 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
20 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
21 LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
22 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
23 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
24 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
25 LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
27 # Define test programs
28 noinst_PROGRAMS = test_uri test_session test_kernel_data
29 noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path
30 noinst_PROGRAMS += test_string_utils test_notification
32 if HAVE_LIBLTTNG_UST_CTL
33 noinst_PROGRAMS += test_ust_data
34 TESTS += test_ust_data
38 test_uri_SOURCES = test_uri.c
39 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
42 SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
43 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
44 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
45 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
46 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
47 $(top_builddir)/src/common/libcommon.la \
48 $(top_builddir)/src/common/testpoint/libtestpoint.la \
49 $(top_builddir)/src/common/compat/libcompat.la \
50 $(top_builddir)/src/common/health/libhealth.la \
51 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
54 test_session_SOURCES = test_session.c
55 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
56 $(LIBHASHTABLE) $(DL_LIBS) -lrt
57 test_session_LDADD += $(SESSIONS)
59 # UST data structures unit test
60 if HAVE_LIBLTTNG_UST_CTL
61 UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
62 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
63 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
64 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
65 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
66 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
67 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
68 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
74 $(top_builddir)/src/common/libcommon.la \
75 $(top_builddir)/src/common/health/libhealth.la \
76 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
78 test_ust_data_SOURCES = test_ust_data.c
79 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\
80 $(LIBHASHTABLE) $(DL_LIBS) -lrt -llttng-ust-ctl
81 test_ust_data_LDADD += $(UST_DATA_TRACE)
84 # Kernel data structures unit test
85 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
86 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
87 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
88 $(top_builddir)/src/common/libcommon.la \
89 $(top_builddir)/src/common/health/libhealth.la \
90 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
91 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
93 test_kernel_data_SOURCES = test_kernel_data.c
94 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
95 $(LIBHASHTABLE) $(DL_LIBS) -lrt
96 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
98 # utils suffix for unit test
99 UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la
101 # parse_size_suffix unit test
102 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
103 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
104 test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
106 # expand_path unit test
107 test_utils_expand_path_SOURCES = test_utils_expand_path.c
108 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
109 test_utils_expand_path_LDADD += $(UTILS_SUFFIX)
111 # string utilities unit test
112 test_string_utils_SOURCES = test_string_utils.c
113 test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
116 test_notification_SOURCES = test_notification.c
117 test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)