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 | ||
2733d135 | 6 | LOG_DRIVER_FLAGS='--merge' |
83666813 MJ |
7 | LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ |
8 | $(top_srcdir)/config/tap-driver.sh | |
9 | ||
10 | TESTS = test_kernel_data \ | |
11 | test_session \ | |
12 | test_uri \ | |
13 | test_utils_parse_size_suffix \ | |
14 | test_utils_expand_path \ | |
15 | ini_config/test_ini_config | |
16 | ||
81d029da | 17 | if LTTNG_TOOLS_BUILD_WITH_LIBDL |
d7c54334 | 18 | LIBS += -ldl |
81d029da CB |
19 | endif |
20 | if LTTNG_TOOLS_BUILD_WITH_LIBC_DL | |
d7c54334 | 21 | LIBS += -lc |
81d029da CB |
22 | endif |
23 | ||
83c55082 CB |
24 | LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la |
25 | ||
81d029da CB |
26 | LIBCOMMON=$(top_builddir)/src/common/libcommon.la |
27 | LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
28 | LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la | |
d3e2ba59 | 29 | LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la |
81d029da | 30 | |
70d0b120 | 31 | # Define test programs |
c77d8c84 | 32 | noinst_PROGRAMS = test_uri test_session test_kernel_data |
635eb1df | 33 | noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path |
70d0b120 | 34 | |
81d029da | 35 | if HAVE_LIBLTTNG_UST_CTL |
70d0b120 | 36 | noinst_PROGRAMS += test_ust_data |
83666813 | 37 | TESTS += test_ust_data |
81d029da CB |
38 | endif |
39 | ||
40 | # URI unit tests | |
41 | test_uri_SOURCES = test_uri.c | |
fe4477ee | 42 | test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) |
81d029da CB |
43 | |
44 | # Session unit test | |
ed72940a MJ |
45 | SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \ |
46 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ | |
47 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ | |
48 | $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \ | |
4b5fc482 | 49 | $(top_builddir)/src/common/libcommon.la \ |
8782cc74 MD |
50 | $(top_builddir)/src/common/health/libhealth.la \ |
51 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
52 | ||
81d029da | 53 | |
9a363369 | 54 | test_session_SOURCES = test_session.c |
d3e2ba59 JD |
55 | test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
56 | $(LIBHASHTABLE) -lrt | |
9a363369 | 57 | test_session_LDADD += $(SESSIONS) |
81d029da CB |
58 | |
59 | # UST data structures unit test | |
60 | if HAVE_LIBLTTNG_UST_CTL | |
ed72940a MJ |
61 | UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \ |
62 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ | |
63 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ | |
64 | $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \ | |
65 | $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \ | |
66 | $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \ | |
67 | $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \ | |
68 | $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \ | |
69 | $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \ | |
70 | $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \ | |
71 | $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \ | |
72 | $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \ | |
4b5fc482 | 73 | $(top_builddir)/src/common/libcommon.la \ |
8782cc74 MD |
74 | $(top_builddir)/src/common/health/libhealth.la \ |
75 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
81d029da | 76 | |
9a363369 | 77 | test_ust_data_SOURCES = test_ust_data.c |
d3e2ba59 JD |
78 | test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\ |
79 | $(LIBHASHTABLE) -lrt -llttng-ust-ctl | |
9a363369 | 80 | test_ust_data_LDADD += $(UST_DATA_TRACE) |
81d029da CB |
81 | endif |
82 | ||
83 | # Kernel data structures unit test | |
ed72940a MJ |
84 | KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \ |
85 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ | |
86 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ | |
4b5fc482 | 87 | $(top_builddir)/src/common/libcommon.la \ |
8782cc74 MD |
88 | $(top_builddir)/src/common/health/libhealth.la \ |
89 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
81d029da | 90 | |
9a363369 | 91 | test_kernel_data_SOURCES = test_kernel_data.c |
d3e2ba59 JD |
92 | test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
93 | $(LIBHASHTABLE) -lrt | |
9a363369 | 94 | test_kernel_data_LDADD += $(KERN_DATA_TRACE) |
70d0b120 | 95 | |
c77d8c84 | 96 | # utils suffix for unit test |
4b5fc482 | 97 | UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la |
70d0b120 | 98 | |
c77d8c84 | 99 | # parse_size_suffix unit test |
70d0b120 SM |
100 | test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c |
101 | test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) | |
c77d8c84 RB |
102 | test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX) |
103 | ||
cc7f9e36 RB |
104 | # expand_path unit test |
105 | test_utils_expand_path_SOURCES = test_utils_expand_path.c | |
106 | test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) | |
107 | test_utils_expand_path_LDADD += $(UTILS_SUFFIX) |