Unit tests: don't rebuild units under test
[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 if HAVE_LIBLTTNG_UST_CTL
18 noinst_PROGRAMS = test_uri test_session test_ust_data test_kernel_data
19 else
20 noinst_PROGRAMS = test_uri test_session test_kernel_data
21 endif
22
23 # URI unit tests
24 test_uri_SOURCES = test_uri.c
25 test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE)
26
27 # Session unit test
28 SESSIONS=$(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
34
35 test_session_SOURCES = test_session.c
36 test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSESSIOND_COMM) $(LIBHASHTABLE) \
37 -lrt
38 test_session_LDADD += $(SESSIONS)
39
40 # UST data structures unit test
41 if HAVE_LIBLTTNG_UST_CTL
42 UST_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
54
55 test_ust_data_SOURCES = test_ust_data.c
56 test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSESSIOND_COMM) $(LIBHASHTABLE) \
57 -lrt -llttng-ust-ctl
58 test_ust_data_LDADD += $(UST_DATA_TRACE)
59 endif
60
61 # Kernel data structures unit test
62 KERN_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
67
68 test_kernel_data_SOURCES = test_kernel_data.c
69 test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSESSIOND_COMM) $(LIBHASHTABLE) \
70 -lrt
71 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
This page took 0.031203 seconds and 5 git commands to generate.