]> git.proxmox.com Git - mirror_frr.git/blob - tests/Makefile.am
build: fix ttable test
[mirror_frr.git] / tests / Makefile.am
1 include ../common.am
2
3 PYTHON ?= python
4
5 AUTOMAKE_OPTIONS = subdir-objects
6 AM_CPPFLAGS = \
7 -I.. \
8 -I$(top_srcdir) \
9 -I$(top_srcdir)/lib \
10 -I$(top_builddir)/lib \
11 -I$(top_srcdir)/tests/helpers/c \
12 -I$(top_builddir)/tests/helpers/c \
13 -O
14 DEFS = @DEFS@ $(LOCAL_OPTS) -DSYSCONFDIR=\"$(sysconfdir)/\"
15
16 if BGPD
17 TESTS_BGPD = \
18 bgpd/test_aspath \
19 bgpd/test_capability \
20 bgpd/test_ecommunity \
21 bgpd/test_mp_attr \
22 bgpd/test_mpath
23 else
24 TESTS_BGPD =
25 endif
26
27 if ENABLE_BGP_VNC
28 BGP_VNC_RFP_LIB=@top_builddir@/$(LIBRFP)/librfp.a
29 else
30 BGP_VNC_RFP_LIB =
31 endif
32
33 lib/cli/test_cli.o: lib/cli/test_cli_clippy.c
34
35 check_PROGRAMS = \
36 lib/test_buffer \
37 lib/test_checksum \
38 lib/test_heavy_thread \
39 lib/test_heavy_wq \
40 lib/test_heavy \
41 lib/test_memory \
42 lib/test_nexthop_iter \
43 lib/test_privs \
44 lib/test_srcdest_table \
45 lib/test_segv \
46 lib/test_sig \
47 lib/test_stream \
48 lib/test_table \
49 lib/test_timer_correctness \
50 lib/test_timer_performance \
51 lib/test_ttable \
52 lib/cli/test_cli \
53 lib/cli/test_commands \
54 $(TESTS_BGPD)
55
56 ../vtysh/vtysh_cmd.c:
57 $(MAKE) -C ../vtysh vtysh_cmd.c
58
59 lib/cli/test_commands_defun.c: ../vtysh/vtysh_cmd.c
60 sed \
61 -e 's/"vtysh\.h"/"tests.h"/' \
62 -e 's/vtysh_init_cmd/test_init_cmd/' \
63 -e 's/VTYSH_[A-Z][A-Z_0-9]*/0/g' \
64 < ../vtysh/vtysh_cmd.c \
65 > "$@"
66
67 BUILT_SOURCES = lib/cli/test_commands_defun.c
68
69 noinst_HEADERS = \
70 ./helpers/c/prng.h \
71 ./helpers/c/tests.h \
72 ./lib/cli/common_cli.h
73
74 lib_test_buffer_SOURCES = lib/test_buffer.c
75 lib_test_checksum_SOURCES = lib/test_checksum.c
76 lib_test_heavy_thread_SOURCES = lib/test_heavy_thread.c helpers/c/main.c
77 lib_test_heavy_wq_SOURCES = lib/test_heavy_wq.c helpers/c/main.c
78 lib_test_heavy_SOURCES = lib/test_heavy.c helpers/c/main.c
79 lib_test_memory_SOURCES = lib/test_memory.c
80 lib_test_nexthop_iter_SOURCES = lib/test_nexthop_iter.c helpers/c/prng.c
81 lib_test_privs_SOURCES = lib/test_privs.c
82 lib_test_srcdest_table_SOURCES = lib/test_srcdest_table.c \
83 helpers/c/prng.c
84 lib_test_segv_SOURCES = lib/test_segv.c
85 lib_test_sig_SOURCES = lib/test_sig.c
86 lib_test_stream_SOURCES = lib/test_stream.c
87 lib_test_table_SOURCES = lib/test_table.c
88 lib_test_timer_correctness_SOURCES = lib/test_timer_correctness.c \
89 helpers/c/prng.c
90 lib_test_timer_performance_SOURCES = lib/test_timer_performance.c \
91 helpers/c/prng.c
92 lib_test_ttable_SOURCES = lib/test_ttable.c
93 lib_cli_test_cli_SOURCES = lib/cli/test_cli.c lib/cli/common_cli.c
94 lib_cli_test_commands_SOURCES = lib/cli/test_commands_defun.c \
95 lib/cli/test_commands.c \
96 helpers/c/prng.c
97 bgpd_test_aspath_SOURCES = bgpd/test_aspath.c
98 bgpd_test_capability_SOURCES = bgpd/test_capability.c
99 bgpd_test_ecommunity_SOURCES = bgpd/test_ecommunity.c
100 bgpd_test_mp_attr_SOURCES = bgpd/test_mp_attr.c
101 bgpd_test_mpath_SOURCES = bgpd/test_mpath.c
102
103 ALL_TESTS_LDADD = ../lib/libfrr.la @LIBCAP@
104 BGP_TEST_LDADD = ../bgpd/libbgp.a $(BGP_VNC_RFP_LIB) $(ALL_TESTS_LDADD) -lm
105
106 lib_test_buffer_LDADD = $(ALL_TESTS_LDADD)
107 lib_test_checksum_LDADD = $(ALL_TESTS_LDADD)
108 lib_test_heavy_thread_LDADD = $(ALL_TESTS_LDADD) -lm
109 lib_test_heavy_wq_LDADD = $(ALL_TESTS_LDADD) -lm
110 lib_test_heavy_LDADD = $(ALL_TESTS_LDADD) -lm
111 lib_test_memory_LDADD = $(ALL_TESTS_LDADD)
112 lib_test_nexthop_iter_LDADD = $(ALL_TESTS_LDADD)
113 lib_test_privs_LDADD = $(ALL_TESTS_LDADD)
114 lib_test_srcdest_table_LDADD = $(ALL_TESTS_LDADD)
115 lib_test_segv_LDADD = $(ALL_TESTS_LDADD)
116 lib_test_sig_LDADD = $(ALL_TESTS_LDADD)
117 lib_test_stream_LDADD = $(ALL_TESTS_LDADD)
118 lib_test_table_LDADD = $(ALL_TESTS_LDADD) -lm
119 lib_test_timer_correctness_LDADD = $(ALL_TESTS_LDADD)
120 lib_test_timer_performance_LDADD = $(ALL_TESTS_LDADD)
121 lib_test_ttable_LDADD = $(ALL_TESTS_LDADD)
122 lib_cli_test_cli_LDADD = $(ALL_TESTS_LDADD)
123 lib_cli_test_commands_LDADD = $(ALL_TESTS_LDADD)
124 bgpd_test_aspath_LDADD = $(BGP_TEST_LDADD)
125 bgpd_test_capability_LDADD = $(BGP_TEST_LDADD)
126 bgpd_test_ecommunity_LDADD = $(BGP_TEST_LDADD)
127 bgpd_test_mp_attr_LDADD = $(BGP_TEST_LDADD)
128 bgpd_test_mpath_LDADD = $(BGP_TEST_LDADD)
129
130 EXTRA_DIST = \
131 runtests.py \
132 bgpd/test_aspath.py \
133 bgpd/test_capability.py \
134 bgpd/test_ecommunity.py \
135 bgpd/test_mp_attr.py \
136 bgpd/test_mpath.py \
137 helpers/python/frrsix.py \
138 helpers/python/frrtest.py \
139 lib/cli/test_commands.in \
140 lib/cli/test_commands.py \
141 lib/cli/test_commands.refout \
142 lib/cli/test_cli.in \
143 lib/cli/test_cli.py \
144 lib/cli/test_cli.refout \
145 lib/test_nexthop_iter.py \
146 lib/test_srcdest_table.py \
147 lib/test_stream.py \
148 lib/test_stream.refout \
149 lib/test_table.py \
150 lib/test_timer_correctness.py \
151 lib/test_ttable.py \
152 lib/test_ttable.refout \
153 # end
154
155 .PHONY: tests.xml
156 tests.xml: $(check_PROGRAMS)
157 $(PYTHON) $(srcdir)/runtests.py --junitxml=$@ -v $(srcdir)
158 check: tests.xml