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