Commit | Line | Data |
---|---|---|
1501a7f3 JG |
1 | SUBDIRS = ini_config |
2 | ||
81d029da CB |
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 | AM_LDFLAGS += -ldl | |
8 | endif | |
9 | if LTTNG_TOOLS_BUILD_WITH_LIBC_DL | |
10 | AM_LDFLAGS += -lc | |
11 | endif | |
12 | ||
83c55082 CB |
13 | LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la |
14 | ||
81d029da CB |
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 | |
d3e2ba59 | 18 | LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la |
81d029da | 19 | |
70d0b120 | 20 | # Define test programs |
c77d8c84 | 21 | noinst_PROGRAMS = test_uri test_session test_kernel_data |
635eb1df | 22 | noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path |
70d0b120 | 23 | |
81d029da | 24 | if HAVE_LIBLTTNG_UST_CTL |
70d0b120 | 25 | noinst_PROGRAMS += test_ust_data |
81d029da CB |
26 | endif |
27 | ||
28 | # URI unit tests | |
29 | test_uri_SOURCES = test_uri.c | |
fe4477ee | 30 | test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) |
81d029da CB |
31 | |
32 | # Session unit test | |
f1789650 DG |
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 \ | |
6dc3064a | 36 | $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \ |
f1789650 DG |
37 | $(top_builddir)/src/common/.libs/uri.o \ |
38 | $(top_builddir)/src/common/.libs/utils.o \ | |
8782cc74 MD |
39 | $(top_builddir)/src/common/.libs/error.o \ |
40 | $(top_builddir)/src/common/health/libhealth.la \ | |
41 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
42 | ||
81d029da | 43 | |
9a363369 | 44 | test_session_SOURCES = test_session.c |
d3e2ba59 JD |
45 | test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
46 | $(LIBHASHTABLE) -lrt | |
9a363369 | 47 | test_session_LDADD += $(SESSIONS) |
81d029da CB |
48 | |
49 | # UST data structures unit test | |
50 | if HAVE_LIBLTTNG_UST_CTL | |
f1789650 DG |
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 \ | |
f1789650 | 60 | $(top_builddir)/src/bin/lttng-sessiond/session.o \ |
6dc3064a | 61 | $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \ |
022d91ba | 62 | $(top_builddir)/src/bin/lttng-sessiond/agent.o \ |
f1789650 | 63 | $(top_builddir)/src/common/.libs/uri.o \ |
8782cc74 MD |
64 | $(top_builddir)/src/common/.libs/utils.o \ |
65 | $(top_builddir)/src/common/health/libhealth.la \ | |
66 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
81d029da | 67 | |
9a363369 | 68 | test_ust_data_SOURCES = test_ust_data.c |
d3e2ba59 JD |
69 | test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\ |
70 | $(LIBHASHTABLE) -lrt -llttng-ust-ctl | |
9a363369 | 71 | test_ust_data_LDADD += $(UST_DATA_TRACE) |
81d029da CB |
72 | endif |
73 | ||
74 | # Kernel data structures unit test | |
f1789650 DG |
75 | KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.o \ |
76 | $(top_builddir)/src/bin/lttng-sessiond/consumer.o \ | |
f1789650 DG |
77 | $(top_builddir)/src/bin/lttng-sessiond/utils.o \ |
78 | $(top_builddir)/src/common/.libs/uri.o \ | |
8782cc74 MD |
79 | $(top_builddir)/src/common/.libs/utils.o \ |
80 | $(top_builddir)/src/common/health/libhealth.la \ | |
81 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
81d029da | 82 | |
9a363369 | 83 | test_kernel_data_SOURCES = test_kernel_data.c |
d3e2ba59 JD |
84 | test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
85 | $(LIBHASHTABLE) -lrt | |
9a363369 | 86 | test_kernel_data_LDADD += $(KERN_DATA_TRACE) |
70d0b120 | 87 | |
c77d8c84 RB |
88 | # utils suffix for unit test |
89 | UTILS_SUFFIX=$(top_builddir)/src/common/.libs/utils.o \ | |
f1789650 | 90 | $(top_builddir)/src/common/.libs/runas.o |
70d0b120 | 91 | |
c77d8c84 | 92 | # parse_size_suffix unit test |
70d0b120 SM |
93 | test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c |
94 | test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) | |
c77d8c84 RB |
95 | test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX) |
96 | ||
cc7f9e36 RB |
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) |