]>
Commit | Line | Data |
---|---|---|
a1286a32 DL |
1 | # |
2 | # tests | |
3 | # | |
4 | ||
a1286a32 DL |
5 | # |
6 | # *sigh* - there is no way to get CPPFLAGS or CFLAGS for a group of files :( | |
7 | # | |
8 | ||
9 | TESTS_CPPFLAGS = $(AM_CPPFLAGS) \ | |
10 | -I$(top_srcdir)/tests/helpers/c \ | |
11 | -I$(top_builddir)/tests/helpers/c \ | |
12 | # end | |
fdbd8086 | 13 | TESTS_CFLAGS = \ |
0c4285d7 | 14 | $(AC_CFLAGS) \ |
fdbd8086 DL |
15 | $(LIBYANG_CFLAGS) \ |
16 | $(SAN_FLAGS) \ | |
17 | # end | |
a1286a32 DL |
18 | # note no -Werror |
19 | ||
deca28a3 CH |
20 | TESTS_CXXFLAGS = \ |
21 | $(AC_CXXFLAGS) \ | |
22 | $(LIBYANG_CFLAGS) \ | |
23 | $(SAN_FLAGS) \ | |
24 | # end | |
25 | # note no -Werror | |
26 | ||
fdbd8086 | 27 | ALL_TESTS_LDADD = lib/libfrr.la $(LIBCAP) |
254144e7 DL |
28 | |
29 | EXTRA_DIST += \ | |
30 | tests/runtests.py \ | |
31 | tests/helpers/python/frrsix.py \ | |
32 | tests/helpers/python/frrtest.py \ | |
33 | # end | |
34 | ||
35 | check_PROGRAMS = | |
36 | PYTEST_IGNORE = | |
37 | ||
38 | .PHONY: tests/tests.xml | |
39 | tests/tests.xml: $(check_PROGRAMS) | |
40 | ( cd tests; $(PYTHON) ../$(srcdir)/tests/runtests.py --junitxml=tests.xml -v ../$(srcdir)/tests $(PYTEST_IGNORE); ) | |
41 | check: tests/tests.xml | |
42 | ||
43 | clean-local: clean-tests | |
44 | .PHONY: clean-tests | |
45 | clean-tests: | |
46 | -rm -f tests/tests.xml | |
47 | ||
48 | ||
49 | # CHEAT SHEET: | |
50 | # | |
51 | ### conditional (if needed) - ONLY for "check_PROGRAMS +=" line! | |
52 | # if DAEMON | |
53 | # check_PROGRAMS += tests/daemon/test_foo | |
54 | # endif | |
55 | ### CFLAGS/CPPFLAGS/LDADD as usual, extend on top of TESTS_XYZFLAGS | |
56 | # tests_daemon_test_foo_CFLAGS = $(TESTS_CFLAGS) | |
57 | # tests_daemon_test_foo_CPPFLAGS = $(TESTS_CPPFLAGS) | |
58 | # tests_daemon_test_foo_LDADD = $(ALL_TESTS_LDADD) | |
59 | # tests_daemon_test_foo_SOURCES = tests/daemon/test_foo.c | |
60 | ### don't forget "nodist_" for autogenerated source files, & add to CLEANFILES | |
61 | # nodist_tests_daemon_test_foo_SOURCES = tests/daemon/test_foo_autogen.c | |
62 | # CLEANFILES += tests/daemon/test_foo_autogen.c | |
63 | ### clippy_scan works normally | |
64 | # clippy_scan += tests/daemon/test_foo.c | |
65 | ### header files for tests go into "noinst_HEADERS" | |
66 | # noinst_HEADERS += tests/daemon/foo.h | |
67 | ### all python scripts & auxiliary files are added into EXTRA_DIST | |
68 | # EXTRA_DIST += tests/daemon/test_foo.py | |
69 | # | |
70 | ||
e536bb10 DL |
71 | include tests/bgpd/subdir.am |
72 | include tests/isisd/subdir.am | |
73 | include tests/ospfd/subdir.am | |
74 | include tests/ospf6d/subdir.am | |
75 | include tests/zebra/subdir.am | |
76 | include tests/lib/subdir.am |