Fix: include scripts for distribution
[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_expand_path \
14 test_string_utils \
15 test_notification \
16 ini_config/test_ini_config
17
18 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
19
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
26
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
31
32 if HAVE_LIBLTTNG_UST_CTL
33 noinst_PROGRAMS += test_ust_data
34 TESTS += test_ust_data
35 endif
36
37 # URI unit tests
38 test_uri_SOURCES = test_uri.c
39 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
40
41 # Session unit test
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
52
53
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)
58
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
77
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)
82 endif
83
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
92
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)
97
98 # utils suffix for unit test
99 UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la
100
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)
105
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)
110
111 # string utilities unit test
112 test_string_utils_SOURCES = test_string_utils.c
113 test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
114
115 # Notification api
116 test_notification_SOURCES = test_notification.c
117 test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
This page took 0.035152 seconds and 4 git commands to generate.