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 | ||
8689ad30 | 6 | LOG_DRIVER_FLAGS='--merge' |
a36b26b4 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 \ | |
dbfea1ab | 15 | test_string_utils \ |
572cb877 | 16 | test_notification \ |
a36b26b4 MJ |
17 | ini_config/test_ini_config |
18 | ||
81d029da | 19 | if LTTNG_TOOLS_BUILD_WITH_LIBDL |
d7c54334 | 20 | LIBS += -ldl |
81d029da CB |
21 | endif |
22 | if LTTNG_TOOLS_BUILD_WITH_LIBC_DL | |
d7c54334 | 23 | LIBS += -lc |
81d029da CB |
24 | endif |
25 | ||
83c55082 CB |
26 | LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la |
27 | ||
81d029da | 28 | LIBCOMMON=$(top_builddir)/src/common/libcommon.la |
dbfea1ab | 29 | LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la |
81d029da CB |
30 | LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la |
31 | LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la | |
d3e2ba59 | 32 | LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la |
572cb877 | 33 | LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la |
81d029da | 34 | |
70d0b120 | 35 | # Define test programs |
c77d8c84 | 36 | noinst_PROGRAMS = test_uri test_session test_kernel_data |
635eb1df | 37 | noinst_PROGRAMS += test_utils_parse_size_suffix test_utils_expand_path |
572cb877 | 38 | noinst_PROGRAMS += test_string_utils test_notification |
70d0b120 | 39 | |
81d029da | 40 | if HAVE_LIBLTTNG_UST_CTL |
70d0b120 | 41 | noinst_PROGRAMS += test_ust_data |
a36b26b4 | 42 | TESTS += test_ust_data |
81d029da CB |
43 | endif |
44 | ||
45 | # URI unit tests | |
46 | test_uri_SOURCES = test_uri.c | |
fe4477ee | 47 | test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) |
81d029da CB |
48 | |
49 | # Session unit test | |
827b3af0 MJ |
50 | SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \ |
51 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ | |
52 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ | |
53 | $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \ | |
5e97de00 | 54 | $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \ |
9354f1d0 | 55 | $(top_builddir)/src/common/libcommon.la \ |
5e97de00 JG |
56 | $(top_builddir)/src/common/testpoint/libtestpoint.la \ |
57 | $(top_builddir)/src/common/compat/libcompat.la \ | |
8782cc74 MD |
58 | $(top_builddir)/src/common/health/libhealth.la \ |
59 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
60 | ||
81d029da | 61 | |
9a363369 | 62 | test_session_SOURCES = test_session.c |
d3e2ba59 JD |
63 | test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
64 | $(LIBHASHTABLE) -lrt | |
9a363369 | 65 | test_session_LDADD += $(SESSIONS) |
81d029da CB |
66 | |
67 | # UST data structures unit test | |
68 | if HAVE_LIBLTTNG_UST_CTL | |
827b3af0 MJ |
69 | UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \ |
70 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ | |
71 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ | |
72 | $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \ | |
73 | $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \ | |
74 | $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \ | |
75 | $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \ | |
76 | $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \ | |
77 | $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \ | |
78 | $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \ | |
79 | $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \ | |
80 | $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \ | |
83b45089 | 81 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \ |
9354f1d0 | 82 | $(top_builddir)/src/common/libcommon.la \ |
8782cc74 MD |
83 | $(top_builddir)/src/common/health/libhealth.la \ |
84 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la | |
81d029da | 85 | |
9a363369 | 86 | test_ust_data_SOURCES = test_ust_data.c |
d3e2ba59 JD |
87 | test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)\ |
88 | $(LIBHASHTABLE) -lrt -llttng-ust-ctl | |
9a363369 | 89 | test_ust_data_LDADD += $(UST_DATA_TRACE) |
81d029da CB |
90 | endif |
91 | ||
92 | # Kernel data structures unit test | |
827b3af0 MJ |
93 | KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \ |
94 | $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ | |
95 | $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ | |
9354f1d0 | 96 | $(top_builddir)/src/common/libcommon.la \ |
8782cc74 | 97 | $(top_builddir)/src/common/health/libhealth.la \ |
83b45089 | 98 | $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \ |
8782cc74 | 99 | $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la |
81d029da | 100 | |
9a363369 | 101 | test_kernel_data_SOURCES = test_kernel_data.c |
d3e2ba59 JD |
102 | test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ |
103 | $(LIBHASHTABLE) -lrt | |
9a363369 | 104 | test_kernel_data_LDADD += $(KERN_DATA_TRACE) |
70d0b120 | 105 | |
c77d8c84 | 106 | # utils suffix for unit test |
9354f1d0 | 107 | UTILS_SUFFIX=$(top_builddir)/src/common/libcommon.la |
70d0b120 | 108 | |
c77d8c84 | 109 | # parse_size_suffix unit test |
70d0b120 SM |
110 | test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c |
111 | test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) | |
c77d8c84 RB |
112 | test_utils_parse_size_suffix_LDADD += $(UTILS_SUFFIX) |
113 | ||
cc7f9e36 RB |
114 | # expand_path unit test |
115 | test_utils_expand_path_SOURCES = test_utils_expand_path.c | |
116 | test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) | |
117 | test_utils_expand_path_LDADD += $(UTILS_SUFFIX) | |
dbfea1ab PP |
118 | |
119 | # string utilities unit test | |
120 | test_string_utils_SOURCES = test_string_utils.c | |
121 | test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) | |
572cb877 JR |
122 | # |
123 | # Notification api | |
124 | test_notification_SOURCES = test_notification.c | |
125 | test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) |