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