Add --userspace-probe kernel event type
[lttng-tools.git] / tests / unit / Makefile.am
1 SUBDIRS = ini_config
2
3 AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
4
5 LOG_DRIVER_FLAGS='--merge'
6 LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
7 $(top_srcdir)/config/tap-driver.sh
8
9 TESTS = test_kernel_data \
10 test_session \
11 test_uri \
12 test_utils_parse_size_suffix \
13 test_utils_parse_time_suffix \
14 test_utils_expand_path \
15 test_string_utils \
16 test_notification \
17 ini_config/test_ini_config
18
19 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
20
21 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
22 LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
23 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
24 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
25 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
26 LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
27
28 # Define test programs
29 noinst_PROGRAMS = test_uri test_session test_kernel_data \
30 test_utils_parse_size_suffix test_utils_parse_time_suffix \
31 test_utils_expand_path test_string_utils test_notification
32
33 if HAVE_LIBLTTNG_UST_CTL
34 noinst_PROGRAMS += test_ust_data
35 TESTS += test_ust_data
36 endif
37
38 # URI unit tests
39 test_uri_SOURCES = test_uri.c
40 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
41
42 # Session unit test
43 SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
44 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
45 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
46 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
47 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
48 $(top_builddir)/src/common/libcommon.la \
49 $(top_builddir)/src/common/testpoint/libtestpoint.la \
50 $(top_builddir)/src/common/compat/libcompat.la \
51 $(top_builddir)/src/common/health/libhealth.la \
52 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
53
54
55 test_session_SOURCES = test_session.c
56 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
57 $(LIBHASHTABLE) $(DL_LIBS) -lrt
58 test_session_LDADD += $(SESSIONS)
59
60 # UST data structures unit test
61 if HAVE_LIBLTTNG_UST_CTL
62 UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
63 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
64 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
65 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
66 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
67 $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT) \
68 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
73 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
74 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
75 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(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) $(DL_LIBS) -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/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
93 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
94 $(LIBLTTNG_CTL)
95
96 test_kernel_data_SOURCES = test_kernel_data.c
97 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
98 $(LIBHASHTABLE) $(DL_LIBS) -lrt
99 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
100
101 # utils suffix for unit test
102 UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la
103
104 # parse_size_suffix unit test
105 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
106 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
107 test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
108
109 # parse_time_suffix unit test
110 test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
111 test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
112 test_utils_parse_time_suffix_LDADD += $(UTILS_SUFFIX)
113
114 # expand_path unit test
115 test_utils_expand_path_SOURCES = test_utils_expand_path.c
116 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
117 test_utils_expand_path_LDADD += $(UTILS_SUFFIX)
118
119 # string utilities unit test
120 test_string_utils_SOURCES = test_string_utils.c
121 test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
122
123 # Notification api
124 test_notification_SOURCES = test_notification.c
125 test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
This page took 0.033419 seconds and 5 git commands to generate.