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