ea208d70a218edc6250de99942d525c1b6c3cbea
[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
17 # Define test programs
18 noinst_PROGRAMS = test_uri test_session test_kernel_data test_utils_parse_size_suffix
19
20 if HAVE_LIBLTTNG_UST_CTL
21 noinst_PROGRAMS += test_ust_data
22 endif
23
24 # URI unit tests
25 test_uri_SOURCES = test_uri.c
26 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
27
28 # Session unit test
29 SESSIONS=$(top_srcdir)/src/bin/lttng-sessiond/session.o \
30 $(top_srcdir)/src/bin/lttng-sessiond/consumer.o \
31 $(top_srcdir)/src/bin/lttng-sessiond/utils.o \
32 $(top_srcdir)/src/bin/lttng-sessiond/health.o \
33 $(top_srcdir)/src/common/.libs/uri.o \
34 $(top_srcdir)/src/common/.libs/utils.o \
35 $(top_srcdir)/src/common/.libs/error.o
36
37 test_session_SOURCES = test_session.c
38 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSESSIOND_COMM) $(LIBHASHTABLE) \
39 -lrt
40 test_session_LDADD += $(SESSIONS)
41
42 # UST data structures unit test
43 if HAVE_LIBLTTNG_UST_CTL
44 UST_DATA_TRACE=$(top_srcdir)/src/bin/lttng-sessiond/trace-ust.o \
45 $(top_srcdir)/src/bin/lttng-sessiond/consumer.o \
46 $(top_srcdir)/src/bin/lttng-sessiond/utils.o \
47 $(top_srcdir)/src/bin/lttng-sessiond/buffer-registry.o \
48 $(top_srcdir)/src/bin/lttng-sessiond/ust-registry.o \
49 $(top_srcdir)/src/bin/lttng-sessiond/ust-metadata.o \
50 $(top_srcdir)/src/bin/lttng-sessiond/ust-app.o \
51 $(top_srcdir)/src/bin/lttng-sessiond/ust-consumer.o \
52 $(top_srcdir)/src/bin/lttng-sessiond/fd-limit.o \
53 $(top_srcdir)/src/bin/lttng-sessiond/health.o \
54 $(top_srcdir)/src/bin/lttng-sessiond/session.o \
55 $(top_srcdir)/src/common/.libs/uri.o \
56 $(top_srcdir)/src/common/.libs/utils.o
57
58 test_ust_data_SOURCES = test_ust_data.c
59 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSESSIOND_COMM) $(LIBHASHTABLE) \
60 -lrt -llttng-ust-ctl
61 test_ust_data_LDADD += $(UST_DATA_TRACE)
62 endif
63
64 # Kernel data structures unit test
65 KERN_DATA_TRACE=$(top_srcdir)/src/bin/lttng-sessiond/trace-kernel.o \
66 $(top_srcdir)/src/bin/lttng-sessiond/consumer.o \
67 $(top_srcdir)/src/bin/lttng-sessiond/health.o \
68 $(top_srcdir)/src/bin/lttng-sessiond/utils.o \
69 $(top_srcdir)/src/common/.libs/uri.o \
70 $(top_srcdir)/src/common/.libs/utils.o
71
72 test_kernel_data_SOURCES = test_kernel_data.c
73 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSESSIOND_COMM) $(LIBHASHTABLE) \
74 -lrt
75 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
76
77 # parse_size_suffix unit test
78 UTILS_PARSE_SIZE_SUFFIX=$(top_srcdir)/src/common/.libs/utils.o \
79 $(top_srcdir)/src/common/.libs/runas.o
80
81 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
82 test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
83 test_utils_parse_size_suffix_LDADD += $(UTILS_PARSE_SIZE_SUFFIX)
This page took 0.032034 seconds and 4 git commands to generate.