tests: Convert unit tests to TAP
[urcu.git] / tests / unit / Makefile.am
1 if !LIBC_INCLUDES_PTHREAD
2 AM_LDFLAGS=-lpthread
3 endif
4 AM_CFLAGS=-I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/tests/utils -I$(top_srcdir)/tests/common -g
5
6 SCRIPT_LIST = test_loop run.sh unit_tests
7
8 noinst_PROGRAMS = test_uatomic \
9 test_urcu_multiflavor \
10 test_urcu_multiflavor_dynlink
11
12 dist_noinst_SCRIPTS = $(SCRIPT_LIST)
13
14 noinst_HEADERS = test_urcu_multiflavor.h
15
16 URCU_COMMON_LIB=$(top_builddir)/liburcu-common.la
17 URCU_LIB=$(top_builddir)/liburcu.la
18 URCU_QSBR_LIB=$(top_builddir)/liburcu-qsbr.la
19 URCU_MB_LIB=$(top_builddir)/liburcu-mb.la
20 URCU_SIGNAL_LIB=$(top_builddir)/liburcu-signal.la
21 URCU_BP_LIB=$(top_builddir)/liburcu-bp.la
22 URCU_CDS_LIB=$(top_builddir)/liburcu-cds.la
23 TAP_LIB=$(top_builddir)/tests/utils/libtap.a
24
25 test_uatomic_SOURCES = test_uatomic.c
26 test_uatomic_LDADD = $(URCU_COMMON_LIB) $(TAP_LIB)
27
28 test_urcu_multiflavor_SOURCES = test_urcu_multiflavor.c \
29 test_urcu_multiflavor-memb.c \
30 test_urcu_multiflavor-mb.c \
31 test_urcu_multiflavor-signal.c \
32 test_urcu_multiflavor-qsbr.c \
33 test_urcu_multiflavor-bp.c
34 test_urcu_multiflavor_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
35 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
36
37 test_urcu_multiflavor_dynlink_SOURCES = test_urcu_multiflavor.c \
38 test_urcu_multiflavor-memb.c \
39 test_urcu_multiflavor-mb.c \
40 test_urcu_multiflavor-signal.c \
41 test_urcu_multiflavor-qsbr.c \
42 test_urcu_multiflavor-bp.c
43 test_urcu_multiflavor_dynlink_CFLAGS = -DDYNAMIC_LINK_TEST $(AM_CFLAGS)
44 test_urcu_multiflavor_dynlink_LDADD = $(URCU_LIB) $(URCU_MB_LIB) \
45 $(URCU_SIGNAL_LIB) $(URCU_QSBR_LIB) $(URCU_BP_LIB) $(TAP_LIB)
46
47 all-local:
48 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
49 for script in $(SCRIPT_LIST); do \
50 cp -f $(srcdir)/$$script $(builddir); \
51 done; \
52 fi
53
54 clean-local:
55 @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
56 for script in $(SCRIPT_LIST); do \
57 rm -f $(builddir)/$$script; \
58 done; \
59 fi
60
61 check-am:
62 ./run.sh unit_tests
This page took 0.052047 seconds and 4 git commands to generate.