Tests: Add test_utils_expand_path to unit tests
[lttng-tools.git] / tests / unit / Makefile.am
1 AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils/ -I$(srcdir)
2 AM_LDFLAGS =
3
4 if LTTNG_TOOLS_BUILD_WITH_LIBDL
5 AM_LDFLAGS += -ldl
6 endif
7 if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
8 AM_LDFLAGS += -lc
9 endif
10
11 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
12
13 LIBCOMMON=$(top_builddir)/src/common/libcommon.la
14 LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
15 LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
16 LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
17
18 # Define test programs
19 noinst_PROGRAMS = test_uri test_session test_kernel_data
20 noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_resolve_relative test_utils_expand_path
21
22 if HAVE_LIBLTTNG_UST_CTL
23 noinst_PROGRAMS += test_ust_data
24 endif
25
26 # URI unit tests
27 test_uri_SOURCES = test_uri.c
28 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
29
30 # Session unit test
31 SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.o \
32 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
33 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
34 $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \
35 $(top_builddir)/src/common/.libs/uri.o \
36 $(top_builddir)/src/common/.libs/utils.o \
37 $(top_builddir)/src/common/.libs/error.o \
38 $(top_builddir)/src/common/health/libhealth.la \
39 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
40
41
42 test_session_SOURCES = test_session.c
43 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
44 $(LIBHASHTABLE) -lrt
45 test_session_LDADD += $(SESSIONS)
46
47 # UST data structures unit test
48 if HAVE_LIBLTTNG_UST_CTL
49 UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.o \
50 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
51 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
52 $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.o \
53 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.o \
54 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.o \
55 $(top_builddir)/src/bin/lttng-sessiond/ust-app.o \
56 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.o \
57 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.o \
58 $(top_builddir)/src/bin/lttng-sessiond/session.o \
59 $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \
60 $(top_builddir)/src/bin/lttng-sessiond/jul.o \
61 $(top_builddir)/src/common/.libs/uri.o \
62 $(top_builddir)/src/common/.libs/utils.o \
63 $(top_builddir)/src/common/health/libhealth.la \
64 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
65
66 test_ust_data_SOURCES = test_ust_data.c
67 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\
68 $(LIBHASHTABLE) -lrt -llttng-ust-ctl
69 test_ust_data_LDADD += $(UST_DATA_TRACE)
70 endif
71
72 # Kernel data structures unit test
73 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.o \
74 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
75 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
76 $(top_builddir)/src/common/.libs/uri.o \
77 $(top_builddir)/src/common/.libs/utils.o \
78 $(top_builddir)/src/common/health/libhealth.la \
79 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
80
81 test_kernel_data_SOURCES = test_kernel_data.c
82 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
83 $(LIBHASHTABLE) -lrt
84 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
85
86 # utils suffix for unit test
87 UTILS_SUFFIX=$(top_builddir)/src/common/.libs/utils.o \
88 $(top_builddir)/src/common/.libs/runas.o
89
90 # parse_size_suffix unit test
91 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
92 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
93 test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX)
94
95 # resolve_relative unit test
96 test_utils_resolve_relative_SOURCES = test_utils_resolve_relative.c
97 test_utils_resolve_relative_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
98 test_utils_resolve_relative_LDADD += $(UTILS_SUFFIX)
99
100 # expand_path unit test
101 test_utils_expand_path_SOURCES = test_utils_expand_path.c
102 test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
103 test_utils_expand_path_LDADD += $(UTILS_SUFFIX)
This page took 0.045087 seconds and 4 git commands to generate.