Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: assorted build system improvements, 2021-11 edition #10032

Merged
merged 11 commits into from
Nov 13, 2021
Prev Previous commit
Next Next commit
build: break up tests/subdir.am
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
  • Loading branch information
eqvinox committed Nov 11, 2021
commit e536bb107d675ad8a0f4943db3be2f6316e09b9f
82 changes: 82 additions & 0 deletions tests/bgpd/subdir.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
if !BGPD
PYTEST_IGNORE += --ignore=bgpd/
endif
BGP_TEST_LDADD = bgpd/libbgp.a $(RFPLDADD) $(ALL_TESTS_LDADD) $(LIBYANG_LIBS) $(UST_LIBS) -lm


if BGPD
check_PROGRAMS += tests/bgpd/test_aspath
endif
tests_bgpd_test_aspath_CFLAGS = $(TESTS_CFLAGS)
tests_bgpd_test_aspath_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_bgpd_test_aspath_LDADD = $(BGP_TEST_LDADD)
tests_bgpd_test_aspath_SOURCES = tests/bgpd/test_aspath.c
EXTRA_DIST += tests/bgpd/test_aspath.py


if BGPD
check_PROGRAMS += tests/bgpd/test_bgp_table
endif
tests_bgpd_test_bgp_table_CFLAGS = $(TESTS_CFLAGS)
tests_bgpd_test_bgp_table_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_bgpd_test_bgp_table_LDADD = $(BGP_TEST_LDADD)
tests_bgpd_test_bgp_table_SOURCES = tests/bgpd/test_bgp_table.c


if BGPD
check_PROGRAMS += tests/bgpd/test_capability
endif
tests_bgpd_test_capability_CFLAGS = $(TESTS_CFLAGS)
tests_bgpd_test_capability_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_bgpd_test_capability_LDADD = $(BGP_TEST_LDADD)
tests_bgpd_test_capability_SOURCES = tests/bgpd/test_capability.c
EXTRA_DIST += tests/bgpd/test_capability.py


if BGPD
check_PROGRAMS += tests/bgpd/test_ecommunity
endif
tests_bgpd_test_ecommunity_CFLAGS = $(TESTS_CFLAGS)
tests_bgpd_test_ecommunity_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_bgpd_test_ecommunity_LDADD = $(BGP_TEST_LDADD)
tests_bgpd_test_ecommunity_SOURCES = tests/bgpd/test_ecommunity.c
EXTRA_DIST += tests/bgpd/test_ecommunity.py


if BGPD
check_PROGRAMS += tests/bgpd/test_mp_attr
endif
tests_bgpd_test_mp_attr_CFLAGS = $(TESTS_CFLAGS)
tests_bgpd_test_mp_attr_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_bgpd_test_mp_attr_LDADD = $(BGP_TEST_LDADD)
tests_bgpd_test_mp_attr_SOURCES = tests/bgpd/test_mp_attr.c
EXTRA_DIST += tests/bgpd/test_mp_attr.py


if BGPD
check_PROGRAMS += tests/bgpd/test_mpath
endif
tests_bgpd_test_mpath_CFLAGS = $(TESTS_CFLAGS)
tests_bgpd_test_mpath_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_bgpd_test_mpath_LDADD = $(BGP_TEST_LDADD)
tests_bgpd_test_mpath_SOURCES = tests/bgpd/test_mpath.c
EXTRA_DIST += tests/bgpd/test_mpath.py


if BGPD
check_PROGRAMS += tests/bgpd/test_packet
endif
tests_bgpd_test_packet_CFLAGS = $(TESTS_CFLAGS)
tests_bgpd_test_packet_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_bgpd_test_packet_LDADD = $(BGP_TEST_LDADD)
tests_bgpd_test_packet_SOURCES = tests/bgpd/test_packet.c


if BGPD
check_PROGRAMS += tests/bgpd/test_peer_attr
endif
tests_bgpd_test_peer_attr_CFLAGS = $(TESTS_CFLAGS)
tests_bgpd_test_peer_attr_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_bgpd_test_peer_attr_LDADD = $(BGP_TEST_LDADD)
tests_bgpd_test_peer_attr_SOURCES = tests/bgpd/test_peer_attr.c
EXTRA_DIST += tests/bgpd/test_peer_attr.py
66 changes: 66 additions & 0 deletions tests/isisd/subdir.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
if !ISISD
PYTEST_IGNORE += --ignore=isisd/
endif
ISISD_TEST_LDADD = isisd/libisis.a $(ALL_TESTS_LDADD)
noinst_HEADERS += \
tests/isisd/test_common.h \
# end


if ISISD
check_PROGRAMS += tests/isisd/test_fuzz_isis_tlv
endif
tests_isisd_test_fuzz_isis_tlv_CFLAGS = $(TESTS_CFLAGS) -I$(top_builddir)/tests/isisd
tests_isisd_test_fuzz_isis_tlv_CPPFLAGS = $(TESTS_CPPFLAGS) -I$(top_builddir)/tests/isisd
tests_isisd_test_fuzz_isis_tlv_LDADD = $(ISISD_TEST_LDADD)
tests_isisd_test_fuzz_isis_tlv_SOURCES = tests/isisd/test_fuzz_isis_tlv.c tests/isisd/test_common.c
nodist_tests_isisd_test_fuzz_isis_tlv_SOURCES = tests/isisd/test_fuzz_isis_tlv_tests.h
EXTRA_DIST += \
tests/isisd/test_fuzz_isis_tlv.py \
tests/isisd/test_fuzz_isis_tlv_tests.h.gz \
# end

tests/isisd/test_fuzz_isis_tlv_tests.h: $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz
@mkdir -p tests/isisd
$(AM_V_GEN)gzip -d < $(top_srcdir)/tests/isisd/test_fuzz_isis_tlv_tests.h.gz > "$@"
CLEANFILES += tests/isisd/test_fuzz_isis_tlv_tests.h

tests/isisd/tests_isisd_test_fuzz_isis_tlv-test_fuzz_isis_tlv.$(OBJEXT): \
tests/isisd/test_fuzz_isis_tlv_tests.h
tests/isisd/test_fuzz_isis_tlv-test_fuzz_isis_tlv.$(OBJEXT): \
tests/isisd/test_fuzz_isis_tlv_tests.h


if ISISD
check_PROGRAMS += tests/isisd/test_isis_lspdb
endif
tests_isisd_test_isis_lspdb_CFLAGS = $(TESTS_CFLAGS)
tests_isisd_test_isis_lspdb_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_isisd_test_isis_lspdb_LDADD = $(ISISD_TEST_LDADD)
tests_isisd_test_isis_lspdb_SOURCES = tests/isisd/test_isis_lspdb.c tests/isisd/test_common.c
EXTRA_DIST += tests/isisd/test_isis_lspdb.py


if ISISD
check_PROGRAMS += tests/isisd/test_isis_spf
endif
tests_isisd_test_isis_spf_CFLAGS = $(TESTS_CFLAGS)
tests_isisd_test_isis_spf_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_isisd_test_isis_spf_LDADD = $(ISISD_TEST_LDADD)
tests_isisd_test_isis_spf_SOURCES = tests/isisd/test_isis_spf.c tests/isisd/test_common.c tests/isisd/test_topologies.c
nodist_tests_isisd_test_isis_spf_SOURCES = yang/frr-isisd.yang.c
EXTRA_DIST += \
tests/isisd/test_isis_spf.py \
tests/isisd/test_isis_spf.in \
tests/isisd/test_isis_spf.refout \
# end


if ISISD
check_PROGRAMS += tests/isisd/test_isis_vertex_queue
endif
tests_isisd_test_isis_vertex_queue_CFLAGS = $(TESTS_CFLAGS)
tests_isisd_test_isis_vertex_queue_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_isisd_test_isis_vertex_queue_LDADD = $(ISISD_TEST_LDADD)
tests_isisd_test_isis_vertex_queue_SOURCES = tests/isisd/test_isis_vertex_queue.c tests/isisd/test_common.c
EXTRA_DIST += tests/isisd/test_isis_vertex_queue.py
Loading