5f485f007b7d3bf4ca874d4482f73c7faa5ef3b5
[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 # Sessiond objects
43 SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
44 $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \
45 $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \
46 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
47 $(top_builddir)/src/bin/lttng-sessiond/shm.$(OBJEXT) \
48 $(top_builddir)/src/bin/lttng-sessiond/kernel.$(OBJEXT) \
49 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
50 $(top_builddir)/src/bin/lttng-sessiond/notification-thread.$(OBJEXT) \
51 $(top_builddir)/src/bin/lttng-sessiond/lttng-syscall.$(OBJEXT) \
52 $(top_builddir)/src/bin/lttng-sessiond/channel.$(OBJEXT) \
53 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
54 $(top_builddir)/src/bin/lttng-sessiond/kernel-consumer.$(OBJEXT) \
55 $(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
56 $(top_builddir)/src/bin/lttng-sessiond/rotation-thread.$(OBJEXT) \
57 $(top_builddir)/src/bin/lttng-sessiond/context.$(OBJEXT) \
58 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
59 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
60 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
61 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-events.$(OBJEXT) \
62 $(top_builddir)/src/bin/lttng-sessiond/event.$(OBJEXT) \
63 $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \
64 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
65 $(top_builddir)/src/bin/lttng-sessiond/sessiond-config.$(OBJEXT) \
66 $(top_builddir)/src/bin/lttng-sessiond/rotate.$(OBJEXT) \
67 $(top_builddir)/src/bin/lttng-sessiond/modprobe.$(OBJEXT) \
68 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
69 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
70 $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \
71 $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \
72 $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
73 $(top_builddir)/src/common/libcommon.la \
74 $(top_builddir)/src/common/testpoint/libtestpoint.la \
75 $(top_builddir)/src/common/compat/libcompat.la \
76 $(top_builddir)/src/common/health/libhealth.la \
77 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
78
79 if HAVE_LIBLTTNG_UST_CTL
80 SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
81 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
82 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
83 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
84 $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \
85 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
86 $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \
87 $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT)
88 endif
89
90 test_session_SOURCES = test_session.c
91 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
92 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
93 $(KMOD_LIBS) \
94 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
95 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
96 $(top_builddir)/src/common/compat/libcompat.la \
97 $(top_builddir)/src/common/testpoint/libtestpoint.la \
98 $(top_builddir)/src/common/health/libhealth.la \
99 $(top_builddir)/src/common/config/libconfig.la \
100 $(top_builddir)/src/common/string-utils/libstring-utils.la
101
102 test_session_LDADD += $(SESSIOND_OBJS)
103
104 if HAVE_LIBLTTNG_UST_CTL
105 test_session_LDADD += -llttng-ust-ctl
106 endif
107
108 # UST data structures unit test
109 if HAVE_LIBLTTNG_UST_CTL
110 test_ust_data_SOURCES = test_ust_data.c
111 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
112 $(LIBHASHTABLE) $(DL_LIBS) -lrt -lurcu-common -lurcu \
113 -llttng-ust-ctl \
114 $(KMOD_LIBS) \
115 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
116 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
117 $(top_builddir)/src/common/compat/libcompat.la \
118 $(top_builddir)/src/common/testpoint/libtestpoint.la \
119 $(top_builddir)/src/common/health/libhealth.la \
120 $(top_builddir)/src/common/config/libconfig.la \
121 $(top_builddir)/src/common/string-utils/libstring-utils.la
122 test_ust_data_LDADD += $(SESSIOND_OBJS)
123 endif
124
125 # Kernel data structures unit test
126 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
127 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
128 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
129 $(top_builddir)/src/common/health/libhealth.la \
130 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
131 $(LIBLTTNG_CTL)
132
133 test_kernel_data_SOURCES = test_kernel_data.c
134 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
135 $(LIBHASHTABLE) $(DL_LIBS) -lrt
136 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
137
138 # utils suffix for unit test
139
140 # parse_size_suffix unit test
141 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
142 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
143
144 # parse_time_suffix unit test
145 test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
146 test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
147
148 # expand_path unit test
149 test_utils_expand_path_SOURCES = test_utils_expand_path.c
150 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
151
152 # string utilities unit test
153 test_string_utils_SOURCES = test_string_utils.c
154 test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
155
156 # Notification api
157 test_notification_SOURCES = test_notification.c
158 test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
This page took 0.044551 seconds and 4 git commands to generate.