Commit bacb9e822e for frr
commit bacb9e822e7e8e7d3865827799c8bf636e407e6e
Author: Donald Sharp <sharpd@nvidia.com>
Date: Thu Oct 1 15:03:09 2026 -0400
tests: Fix test_ebgp_ecmp_topo2.py to skip when tests fails
This topotest would continue to run with a failed test. Thus
causing it to take 20-25 minutes to run when something goes
wrong at the beginning.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
diff --git a/tests/topotests/bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py b/tests/topotests/bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py
index 8362776b7b..ab34e77f59 100644
--- a/tests/topotests/bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py
+++ b/tests/topotests/bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py
@@ -302,6 +302,10 @@ def test_ecmp_after_clear_bgp(request, ecmp_num, test_type):
write_test_header(tc_name)
tgen = get_topogen()
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
reset_config_on_routers(tgen)
# Verifying RIB routes
@@ -359,6 +363,10 @@ def test_ecmp_remove_redistribute_static(request):
write_test_header(tc_name)
tgen = get_topogen()
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
reset_config_on_routers(tgen)
static_or_nw(tgen, topo, tc_name, "redist_static", "r2")
for addr_type in ADDR_TYPES:
@@ -471,6 +479,10 @@ def test_ecmp_shut_bgp_neighbor(request, test_type):
write_test_header(tc_name)
tgen = get_topogen()
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
logger.info(INTF_LIST_R2)
# Verifying RIB routes
dut = "r3"
@@ -556,6 +568,10 @@ def test_ecmp_remove_static_route(request):
write_test_header(tc_name)
tgen = get_topogen()
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
# Verifying RIB routes
dut = "r3"
protocol = "bgp"
@@ -654,6 +670,10 @@ def test_ecmp_remove_nw_advertise(request):
write_test_header(tc_name)
tgen = get_topogen()
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
# Verifying RIB routes
dut = "r3"
protocol = "bgp"