Unit tests: don't rebuild units under test
[lttng-tools.git] / tests / unit / Makefile.am
CommitLineData
81d029da
CB
1AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/utils/ -I$(srcdir)
2AM_LDFLAGS =
3
4if LTTNG_TOOLS_BUILD_WITH_LIBDL
5AM_LDFLAGS += -ldl
6endif
7if LTTNG_TOOLS_BUILD_WITH_LIBC_DL
8AM_LDFLAGS += -lc
9endif
10
83c55082
CB
11LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
12
81d029da
CB
13LIBCOMMON=$(top_builddir)/src/common/libcommon.la
14LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
15LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
16
81d029da
CB
17if HAVE_LIBLTTNG_UST_CTL
18noinst_PROGRAMS = test_uri test_session test_ust_data test_kernel_data
19else
20noinst_PROGRAMS = test_uri test_session test_kernel_data
21endif
22
23# URI unit tests
24test_uri_SOURCES = test_uri.c
fe4477ee 25test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
81d029da
CB
26
27# Session unit test
9a363369
SM
28SESSIONS=$(top_srcdir)/src/bin/lttng-sessiond/session.o \
29 $(top_srcdir)/src/bin/lttng-sessiond/consumer.o \
30 $(top_srcdir)/src/bin/lttng-sessiond/health.o \
31 $(top_srcdir)/src/common/uri.o \
32 $(top_srcdir)/src/common/utils.o \
33 $(top_srcdir)/src/common/error.o
81d029da 34
9a363369 35test_session_SOURCES = test_session.c
7972aab2
DG
36test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSESSIOND_COMM) $(LIBHASHTABLE) \
37 -lrt
9a363369 38test_session_LDADD += $(SESSIONS)
81d029da
CB
39
40# UST data structures unit test
41if HAVE_LIBLTTNG_UST_CTL
9a363369
SM
42UST_DATA_TRACE=$(top_srcdir)/src/bin/lttng-sessiond/trace-ust.o \
43 $(top_srcdir)/src/bin/lttng-sessiond/consumer.o \
44 $(top_srcdir)/src/bin/lttng-sessiond/buffer-registry.o \
45 $(top_srcdir)/src/bin/lttng-sessiond/ust-registry.o \
46 $(top_srcdir)/src/bin/lttng-sessiond/ust-metadata.o \
47 $(top_srcdir)/src/bin/lttng-sessiond/ust-app.o \
48 $(top_srcdir)/src/bin/lttng-sessiond/ust-consumer.o \
49 $(top_srcdir)/src/bin/lttng-sessiond/fd-limit.o \
50 $(top_srcdir)/src/bin/lttng-sessiond/health.o \
51 $(top_srcdir)/src/bin/lttng-sessiond/session.o \
52 $(top_srcdir)/src/common/uri.o \
53 $(top_srcdir)/src/common/utils.o
81d029da 54
9a363369 55test_ust_data_SOURCES = test_ust_data.c
7972aab2
DG
56test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSESSIOND_COMM) $(LIBHASHTABLE) \
57 -lrt -llttng-ust-ctl
9a363369 58test_ust_data_LDADD += $(UST_DATA_TRACE)
81d029da
CB
59endif
60
61# Kernel data structures unit test
9a363369
SM
62KERN_DATA_TRACE=$(top_srcdir)/src/bin/lttng-sessiond/trace-kernel.o \
63 $(top_srcdir)/src/bin/lttng-sessiond/consumer.o \
64 $(top_srcdir)/src/bin/lttng-sessiond/health.o \
65 $(top_srcdir)/src/common/uri.o \
66 $(top_srcdir)/src/common/utils.o
81d029da 67
9a363369 68test_kernel_data_SOURCES = test_kernel_data.c
7972aab2
DG
69test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSESSIOND_COMM) $(LIBHASHTABLE) \
70 -lrt
9a363369 71test_kernel_data_LDADD += $(KERN_DATA_TRACE)
This page took 0.036546 seconds and 4 git commands to generate.