Commit 044f5bca68 for frr
commit 044f5bca68c14b543f2be4ad16c8716ad1e9b64d
Author: Donald Sharp <sharpd@nvidia.com>
Date: Sat Oct 3 11:40:00 2026 -0400
tests: Mark tests to run as appropriate if the platform supports them
Make the topotests more aware of what can/can't be run on the
particular platform.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
diff --git a/tests/topotests/bfd_static_vrf/test_bfd_static_vrf.py b/tests/topotests/bfd_static_vrf/test_bfd_static_vrf.py
index eb5ef3b7ae..df6c71b6db 100755
--- a/tests/topotests/bfd_static_vrf/test_bfd_static_vrf.py
+++ b/tests/topotests/bfd_static_vrf/test_bfd_static_vrf.py
@@ -51,6 +51,8 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py b/tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py
index 85cc4a24ee..e120d483f0 100644
--- a/tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py
+++ b/tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py
@@ -55,6 +55,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bfd_vrflite_topo1/test_bfd_vrflite_topo1.py b/tests/topotests/bfd_vrflite_topo1/test_bfd_vrflite_topo1.py
index fee5f2d536..2904dc4f19 100644
--- a/tests/topotests/bfd_vrflite_topo1/test_bfd_vrflite_topo1.py
+++ b/tests/topotests/bfd_vrflite_topo1/test_bfd_vrflite_topo1.py
@@ -53,6 +53,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_accept_own/test_bgp_accept_own.py b/tests/topotests/bgp_accept_own/test_bgp_accept_own.py
index ff409adf1f..5eb1eb0d4d 100644
--- a/tests/topotests/bgp_accept_own/test_bgp_accept_own.py
+++ b/tests/topotests/bgp_accept_own/test_bgp_accept_own.py
@@ -50,6 +50,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_advertisement_delay/test_bgp_advertisement_delay.py b/tests/topotests/bgp_advertisement_delay/test_bgp_advertisement_delay.py
index efe3c6b29b..0de003fdac 100644
--- a/tests/topotests/bgp_advertisement_delay/test_bgp_advertisement_delay.py
+++ b/tests/topotests/bgp_advertisement_delay/test_bgp_advertisement_delay.py
@@ -54,6 +54,9 @@ pytestmark = [pytest.mark.bgpd]
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
topodef = {"s1": ("r1", "r2"), "s2": ("r2", "r3")}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_auth/test_bgp_auth1.py b/tests/topotests/bgp_auth/test_bgp_auth1.py
index bbbc7e3d6d..b2a7c09c5a 100644
--- a/tests/topotests/bgp_auth/test_bgp_auth1.py
+++ b/tests/topotests/bgp_auth/test_bgp_auth1.py
@@ -75,6 +75,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
# This function initiates the topology build with Topogen...
tgen = Topogen(build_topo, mod.__name__)
# ... and here it calls Mininet initialization functions.
diff --git a/tests/topotests/bgp_auth/test_bgp_auth2.py b/tests/topotests/bgp_auth/test_bgp_auth2.py
index bf0bba9039..b57e1370d8 100644
--- a/tests/topotests/bgp_auth/test_bgp_auth2.py
+++ b/tests/topotests/bgp_auth/test_bgp_auth2.py
@@ -75,6 +75,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
# This function initiates the topology build with Topogen...
tgen = Topogen(build_topo, mod.__name__)
# ... and here it calls Mininet initialization functions.
diff --git a/tests/topotests/bgp_auth/test_bgp_auth3.py b/tests/topotests/bgp_auth/test_bgp_auth3.py
index 87b9ab4095..67a9ea0c53 100644
--- a/tests/topotests/bgp_auth/test_bgp_auth3.py
+++ b/tests/topotests/bgp_auth/test_bgp_auth3.py
@@ -74,6 +74,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
# This function initiates the topology build with Topogen...
tgen = Topogen(build_topo, mod.__name__)
# ... and here it calls Mininet initialization functions.
diff --git a/tests/topotests/bgp_auth/test_bgp_auth4.py b/tests/topotests/bgp_auth/test_bgp_auth4.py
index 8ee0bd0f2f..41b3de0a3e 100644
--- a/tests/topotests/bgp_auth/test_bgp_auth4.py
+++ b/tests/topotests/bgp_auth/test_bgp_auth4.py
@@ -74,6 +74,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
# This function initiates the topology build with Topogen...
tgen = Topogen(build_topo, mod.__name__)
# ... and here it calls Mininet initialization functions.
diff --git a/tests/topotests/bgp_auth/test_bgp_auth5.py b/tests/topotests/bgp_auth/test_bgp_auth5.py
index e0ee85f95b..189f1c4df3 100644
--- a/tests/topotests/bgp_auth/test_bgp_auth5.py
+++ b/tests/topotests/bgp_auth/test_bgp_auth5.py
@@ -55,6 +55,9 @@ def build_topo(tgen):
def setup_module(mod):
"""Sets up the pytest environment"""
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
# This function initiates the topology build with Topogen...
tgen = Topogen(build_topo, mod.__name__)
# ... and here it calls Mininet initialization functions.
diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp_1.py b/tests/topotests/bgp_bmp/test_bgp_bmp_1.py
index e371a7c4e9..aed41d2ceb 100644
--- a/tests/topotests/bgp_bmp/test_bgp_bmp_1.py
+++ b/tests/topotests/bgp_bmp/test_bgp_bmp_1.py
@@ -74,6 +74,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp_2.py b/tests/topotests/bgp_bmp/test_bgp_bmp_2.py
index c55ed94c72..ebf173761d 100644
--- a/tests/topotests/bgp_bmp/test_bgp_bmp_2.py
+++ b/tests/topotests/bgp_bmp/test_bgp_bmp_2.py
@@ -78,6 +78,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp_3.py b/tests/topotests/bgp_bmp/test_bgp_bmp_3.py
index 077b9c7c19..c78b197114 100644
--- a/tests/topotests/bgp_bmp/test_bgp_bmp_3.py
+++ b/tests/topotests/bgp_bmp/test_bgp_bmp_3.py
@@ -121,6 +121,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py b/tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py
index 48dddb4648..6ec1d13e02 100644
--- a/tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py
+++ b/tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py
@@ -29,6 +29,7 @@ sys.path.append(os.path.join(CWD, "../"))
# pylint: disable=C0413
from lib.topogen import Topogen, TopoRouter, get_topogen
from lib.common_config import step
+from lib.topotest import platform_has_evpn
def build_topo(tgen):
@@ -43,6 +44,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_default_originate/test_default_orginate_vrf.py b/tests/topotests/bgp_default_originate/test_default_orginate_vrf.py
index 905c3e2b66..4c71fea009 100644
--- a/tests/topotests/bgp_default_originate/test_default_orginate_vrf.py
+++ b/tests/topotests/bgp_default_originate/test_default_orginate_vrf.py
@@ -42,6 +42,7 @@ from lib.common_config import (
create_static_routes,
check_router_status,
)
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
@@ -84,6 +85,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
# Required linux kernel version for this suite to run.
result = required_linux_kernel_version("4.15")
diff --git a/tests/topotests/bgp_distance_change/test_bgp_admin_dist_vrf.py b/tests/topotests/bgp_distance_change/test_bgp_admin_dist_vrf.py
index d915e2ffb2..4683ffcdc1 100755
--- a/tests/topotests/bgp_distance_change/test_bgp_admin_dist_vrf.py
+++ b/tests/topotests/bgp_distance_change/test_bgp_admin_dist_vrf.py
@@ -84,6 +84,7 @@ from lib.bgp import (
from lib.topogen import Topogen, get_topogen
from lib.topojson import build_config_from_json
from lib.topolog import logger
+from lib.topotest import platform_has_vrf
# Global variables
topo = None
@@ -117,6 +118,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
global topo
diff --git a/tests/topotests/bgp_evpn_advertise_all_vni_vrf/test_bgp_evpn_advertise_all_vni_vrf.py b/tests/topotests/bgp_evpn_advertise_all_vni_vrf/test_bgp_evpn_advertise_all_vni_vrf.py
index 54eb00bd54..5baafd1e3d 100644
--- a/tests/topotests/bgp_evpn_advertise_all_vni_vrf/test_bgp_evpn_advertise_all_vni_vrf.py
+++ b/tests/topotests/bgp_evpn_advertise_all_vni_vrf/test_bgp_evpn_advertise_all_vni_vrf.py
@@ -213,6 +213,12 @@ def _wait_for_underlay_address(pe, config):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
result = required_linux_kernel_version("5.15")
if result is not True:
pytest.skip("Linux kernel >= 5.15 is required")
diff --git a/tests/topotests/bgp_evpn_ead_evi_routes/test_bgp_evpn_ead_evi_routes.py b/tests/topotests/bgp_evpn_ead_evi_routes/test_bgp_evpn_ead_evi_routes.py
index 191d49c115..710c0f6b98 100644
--- a/tests/topotests/bgp_evpn_ead_evi_routes/test_bgp_evpn_ead_evi_routes.py
+++ b/tests/topotests/bgp_evpn_ead_evi_routes/test_bgp_evpn_ead_evi_routes.py
@@ -54,6 +54,9 @@ def build_topo(tgen):
def setup_module(module):
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, module.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_flooding_per_vni/test_bgp_evpn_flooding_per_vni.py b/tests/topotests/bgp_evpn_flooding_per_vni/test_bgp_evpn_flooding_per_vni.py
index 8dfd7833c1..a2907415f1 100644
--- a/tests/topotests/bgp_evpn_flooding_per_vni/test_bgp_evpn_flooding_per_vni.py
+++ b/tests/topotests/bgp_evpn_flooding_per_vni/test_bgp_evpn_flooding_per_vni.py
@@ -23,6 +23,9 @@ pytestmark = [pytest.mark.bgpd, pytest.mark.evpn]
def setup_module(mod):
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
topodef = {"s1": ("r1", "r2")}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_gr/test_bgp_evpn_gr.py b/tests/topotests/bgp_evpn_gr/test_bgp_evpn_gr.py
index e23c43d5b5..854cf48bc7 100644
--- a/tests/topotests/bgp_evpn_gr/test_bgp_evpn_gr.py
+++ b/tests/topotests/bgp_evpn_gr/test_bgp_evpn_gr.py
@@ -52,6 +52,12 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_l3vni_modify/test_bgp_evpn_l3vni_modify.py b/tests/topotests/bgp_evpn_l3vni_modify/test_bgp_evpn_l3vni_modify.py
index 5f181c7845..3c14603f4a 100644
--- a/tests/topotests/bgp_evpn_l3vni_modify/test_bgp_evpn_l3vni_modify.py
+++ b/tests/topotests/bgp_evpn_l3vni_modify/test_bgp_evpn_l3vni_modify.py
@@ -43,6 +43,12 @@ pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd]
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
topodef = {
"s1": ("PE1", "P1"),
"s2": ("P1", "PE2"),
diff --git a/tests/topotests/bgp_evpn_maximum_prefix/test_bgp_evpn_maximum_prefix.py b/tests/topotests/bgp_evpn_maximum_prefix/test_bgp_evpn_maximum_prefix.py
index 4c2ff2214d..11785e9deb 100644
--- a/tests/topotests/bgp_evpn_maximum_prefix/test_bgp_evpn_maximum_prefix.py
+++ b/tests/topotests/bgp_evpn_maximum_prefix/test_bgp_evpn_maximum_prefix.py
@@ -23,6 +23,9 @@ pytestmark = [pytest.mark.bgpd, pytest.mark.evpn]
def setup_module(mod):
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
topodef = {"s1": ("c1", "r1"), "s2": ("r1", "r2"), "s3": ("r2", "c2")}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_mh/test_evpn_mh.py b/tests/topotests/bgp_evpn_mh/test_evpn_mh.py
index 58f97e5fc4..1eaa5f71ae 100644
--- a/tests/topotests/bgp_evpn_mh/test_evpn_mh.py
+++ b/tests/topotests/bgp_evpn_mh/test_evpn_mh.py
@@ -392,6 +392,9 @@ def config_hosts(tgen, hosts):
def setup_module(module):
"Setup topology"
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, module.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_mh_v4_v6_num/test_evpn_mh_v4_v6_num.py b/tests/topotests/bgp_evpn_mh_v4_v6_num/test_evpn_mh_v4_v6_num.py
index 9d94574b5f..e6f8f42a51 100644
--- a/tests/topotests/bgp_evpn_mh_v4_v6_num/test_evpn_mh_v4_v6_num.py
+++ b/tests/topotests/bgp_evpn_mh_v4_v6_num/test_evpn_mh_v4_v6_num.py
@@ -63,6 +63,14 @@ from lib.topolog import logger
#####################################################
+def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
+
def build_topo(tgen):
"""
EVPN Multihoming Topology -
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py b/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py
index 5889dd685b..7ebdbd890e 100755
--- a/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py
+++ b/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py
@@ -96,6 +96,11 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_evpn_pmsi_attr_intern/test_bgp_evpn_pmsi_attr_intern.py b/tests/topotests/bgp_evpn_pmsi_attr_intern/test_bgp_evpn_pmsi_attr_intern.py
index ba5bdf3685..3f4ca26542 100644
--- a/tests/topotests/bgp_evpn_pmsi_attr_intern/test_bgp_evpn_pmsi_attr_intern.py
+++ b/tests/topotests/bgp_evpn_pmsi_attr_intern/test_bgp_evpn_pmsi_attr_intern.py
@@ -106,6 +106,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_rmac_conflict/test_bgp_evpn_rmac_conflict.py b/tests/topotests/bgp_evpn_rmac_conflict/test_bgp_evpn_rmac_conflict.py
index 2ab8ad1667..e18d77ed9f 100644
--- a/tests/topotests/bgp_evpn_rmac_conflict/test_bgp_evpn_rmac_conflict.py
+++ b/tests/topotests/bgp_evpn_rmac_conflict/test_bgp_evpn_rmac_conflict.py
@@ -76,6 +76,11 @@ def _create_rmac(router, vrf):
def setup_module(mod):
"""Sets up the pytest environment"""
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_route_map_match/test_bgp_evpn_route_map_match.py b/tests/topotests/bgp_evpn_route_map_match/test_bgp_evpn_route_map_match.py
index 2bd33a0b25..e53265b6b1 100644
--- a/tests/topotests/bgp_evpn_route_map_match/test_bgp_evpn_route_map_match.py
+++ b/tests/topotests/bgp_evpn_route_map_match/test_bgp_evpn_route_map_match.py
@@ -28,6 +28,9 @@ from lib.common_config import shutdown_bringup_interface_in_kernel
def setup_module(mod):
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
topodef = {"s1": ("c1", "r1"), "s2": ("r1", "r2"), "s3": ("r2", "c2")}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_route_map_set/test_bgp_evpn_route_map_set.py b/tests/topotests/bgp_evpn_route_map_set/test_bgp_evpn_route_map_set.py
index 3f3d64b136..e4b16d18bc 100644
--- a/tests/topotests/bgp_evpn_route_map_set/test_bgp_evpn_route_map_set.py
+++ b/tests/topotests/bgp_evpn_route_map_set/test_bgp_evpn_route_map_set.py
@@ -25,6 +25,9 @@ from lib.topolog import logger
def setup_module(mod):
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
topodef = {"s1": ("c1", "r1"), "s2": ("r1", "r2")}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_route_target_config/test_bgp_evpn_route_target_config.py b/tests/topotests/bgp_evpn_route_target_config/test_bgp_evpn_route_target_config.py
index 69fbd1ac87..88dfc97748 100644
--- a/tests/topotests/bgp_evpn_route_target_config/test_bgp_evpn_route_target_config.py
+++ b/tests/topotests/bgp_evpn_route_target_config/test_bgp_evpn_route_target_config.py
@@ -82,6 +82,12 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_rt2_v6_vrf_import/test_bgp_evpn_rt2_v6_vrf_import.py b/tests/topotests/bgp_evpn_rt2_v6_vrf_import/test_bgp_evpn_rt2_v6_vrf_import.py
index 2bd4a0d940..7eb8141df6 100644
--- a/tests/topotests/bgp_evpn_rt2_v6_vrf_import/test_bgp_evpn_rt2_v6_vrf_import.py
+++ b/tests/topotests/bgp_evpn_rt2_v6_vrf_import/test_bgp_evpn_rt2_v6_vrf_import.py
@@ -87,6 +87,12 @@ def _setup_pe(router, idx):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py b/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py
index 09fe9084f7..9730513cda 100644
--- a/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py
+++ b/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py
@@ -69,6 +69,11 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_rt5/test_bgp_evpn_v6_vtep.py b/tests/topotests/bgp_evpn_rt5/test_bgp_evpn_v6_vtep.py
index 7b8dd3322b..b71fc39221 100644
--- a/tests/topotests/bgp_evpn_rt5/test_bgp_evpn_v6_vtep.py
+++ b/tests/topotests/bgp_evpn_rt5/test_bgp_evpn_v6_vtep.py
@@ -78,6 +78,11 @@ def _apply_link_cmd(tgen, router, cmd, *args):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_rt5_addpath/test_bgp_evpn_rt5_addpath.py b/tests/topotests/bgp_evpn_rt5_addpath/test_bgp_evpn_rt5_addpath.py
index 3bba5b0fed..c01758654f 100644
--- a/tests/topotests/bgp_evpn_rt5_addpath/test_bgp_evpn_rt5_addpath.py
+++ b/tests/topotests/bgp_evpn_rt5_addpath/test_bgp_evpn_rt5_addpath.py
@@ -60,6 +60,12 @@ from lib.topotest import json_cmp_result
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
topodef = {"s1": ("c1", "r1"), "s2": ("c2", "r1"), "s3": ("r1", "r2", "r3", "rr")}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_rt5_implied/test_bgp_evpn_implied.py b/tests/topotests/bgp_evpn_rt5_implied/test_bgp_evpn_implied.py
index a811aea39c..4945cd2431 100644
--- a/tests/topotests/bgp_evpn_rt5_implied/test_bgp_evpn_implied.py
+++ b/tests/topotests/bgp_evpn_rt5_implied/test_bgp_evpn_implied.py
@@ -68,6 +68,11 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_rt_wildcard_matching/test_bgp_evpn_rt_wildcard_matching.py b/tests/topotests/bgp_evpn_rt_wildcard_matching/test_bgp_evpn_rt_wildcard_matching.py
index 6b673d9367..f780010392 100644
--- a/tests/topotests/bgp_evpn_rt_wildcard_matching/test_bgp_evpn_rt_wildcard_matching.py
+++ b/tests/topotests/bgp_evpn_rt_wildcard_matching/test_bgp_evpn_rt_wildcard_matching.py
@@ -75,6 +75,12 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_svi_anycast_gw/test_anycast_gw_neigh_linkage.py b/tests/topotests/bgp_evpn_svi_anycast_gw/test_anycast_gw_neigh_linkage.py
index c3b2e44cb4..18d1942aa9 100644
--- a/tests/topotests/bgp_evpn_svi_anycast_gw/test_anycast_gw_neigh_linkage.py
+++ b/tests/topotests/bgp_evpn_svi_anycast_gw/test_anycast_gw_neigh_linkage.py
@@ -149,6 +149,9 @@ def config_leaf_dataplane(leaf, name, svi_mac, with_gw_addrs):
def setup_module(mod):
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_three_tier_clos_topo1/test_bgp_evpn_v4_v6_vtep.py b/tests/topotests/bgp_evpn_three_tier_clos_topo1/test_bgp_evpn_v4_v6_vtep.py
index 8beb56de00..29398bd846 100644
--- a/tests/topotests/bgp_evpn_three_tier_clos_topo1/test_bgp_evpn_v4_v6_vtep.py
+++ b/tests/topotests/bgp_evpn_three_tier_clos_topo1/test_bgp_evpn_v4_v6_vtep.py
@@ -126,6 +126,14 @@ VTEP_IPS = {
}
+def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
+
@pytest.fixture(scope="module", params=["ipv4", "ipv6"])
def tgen_and_ip_version(request):
"""
diff --git a/tests/topotests/bgp_evpn_type5_vrf_leak_stale/test_bgp_evpn_type5_vrf_leak_stale.py b/tests/topotests/bgp_evpn_type5_vrf_leak_stale/test_bgp_evpn_type5_vrf_leak_stale.py
index 9024009115..6a54febcc9 100644
--- a/tests/topotests/bgp_evpn_type5_vrf_leak_stale/test_bgp_evpn_type5_vrf_leak_stale.py
+++ b/tests/topotests/bgp_evpn_type5_vrf_leak_stale/test_bgp_evpn_type5_vrf_leak_stale.py
@@ -180,6 +180,11 @@ def _add_vrf_vni(router, rname, vrf, table, vni, local_vtep):
def setup_module(mod):
"Create router VRFs and L3VNIs, load configs, and start the topology."
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
krel = platform.release()
if topotest.version_cmp(krel, "4.18") < 0:
diff --git a/tests/topotests/bgp_evpn_v6_pmsi_tunnel/test_bgp_evpn_v6_pmsi_tunnel.py b/tests/topotests/bgp_evpn_v6_pmsi_tunnel/test_bgp_evpn_v6_pmsi_tunnel.py
index c7ba26ca6a..050311011e 100644
--- a/tests/topotests/bgp_evpn_v6_pmsi_tunnel/test_bgp_evpn_v6_pmsi_tunnel.py
+++ b/tests/topotests/bgp_evpn_v6_pmsi_tunnel/test_bgp_evpn_v6_pmsi_tunnel.py
@@ -44,6 +44,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_vxlan_local_vtep_none/test_bgp_evpn_vxlan_local_vtep_none.py b/tests/topotests/bgp_evpn_vxlan_local_vtep_none/test_bgp_evpn_vxlan_local_vtep_none.py
index 81c3986b8b..844048e1b5 100644
--- a/tests/topotests/bgp_evpn_vxlan_local_vtep_none/test_bgp_evpn_vxlan_local_vtep_none.py
+++ b/tests/topotests/bgp_evpn_vxlan_local_vtep_none/test_bgp_evpn_vxlan_local_vtep_none.py
@@ -25,6 +25,9 @@ ROUTER_ID = "10.0.0.1"
def setup_module(mod):
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
topodef = {"s1": ("r1", "r2")}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_vxlan_macvrf_soo_topo1/test_bgp_evpn_vxlan_macvrf_soo.py b/tests/topotests/bgp_evpn_vxlan_macvrf_soo_topo1/test_bgp_evpn_vxlan_macvrf_soo.py
index 5c5dae49e4..a1ea1eaeb5 100755
--- a/tests/topotests/bgp_evpn_vxlan_macvrf_soo_topo1/test_bgp_evpn_vxlan_macvrf_soo.py
+++ b/tests/topotests/bgp_evpn_vxlan_macvrf_soo_topo1/test_bgp_evpn_vxlan_macvrf_soo.py
@@ -83,6 +83,12 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_vxlan_macvrf_soo_topo1/test_bgp_evpn_vxlan_macvrf_soo_v6_vtep.py b/tests/topotests/bgp_evpn_vxlan_macvrf_soo_topo1/test_bgp_evpn_vxlan_macvrf_soo_v6_vtep.py
index 330770f627..833af6e6b6 100755
--- a/tests/topotests/bgp_evpn_vxlan_macvrf_soo_topo1/test_bgp_evpn_vxlan_macvrf_soo_v6_vtep.py
+++ b/tests/topotests/bgp_evpn_vxlan_macvrf_soo_topo1/test_bgp_evpn_vxlan_macvrf_soo_v6_vtep.py
@@ -83,6 +83,12 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py b/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py
index 78746af84b..fba1ac376d 100755
--- a/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py
+++ b/tests/topotests/bgp_evpn_vxlan_svd_topo1/test_bgp_evpn_vxlan_svd.py
@@ -181,6 +181,11 @@ def setup_p_router(tgen, p_name):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
result = required_linux_kernel_version("5.7")
if result is not True:
diff --git a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py
index 5d867a927b..e6cac248b4 100755
--- a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py
+++ b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py
@@ -81,6 +81,12 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
# This function initiates the topology build with Topogen...
tgen = Topogen(build_topo, mod.__name__)
# ... and here it calls Mininet initialization functions.
diff --git a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan_v6_vtep.py b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan_v6_vtep.py
index 7d218d13d7..866f8f2b88 100755
--- a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan_v6_vtep.py
+++ b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan_v6_vtep.py
@@ -85,6 +85,12 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
# This function initiates the topology build with Topogen...
tgen = Topogen(build_topo, mod.__name__)
# ... and here it calls Mininet initialization functions.
diff --git a/tests/topotests/bgp_gr_functionality_topo3/test_bgp_gr_functionality_topo3.py b/tests/topotests/bgp_gr_functionality_topo3/test_bgp_gr_functionality_topo3.py
index e24f31d862..6d614c6693 100644
--- a/tests/topotests/bgp_gr_functionality_topo3/test_bgp_gr_functionality_topo3.py
+++ b/tests/topotests/bgp_gr_functionality_topo3/test_bgp_gr_functionality_topo3.py
@@ -56,6 +56,7 @@ from lib.common_config import (
create_static_routes,
required_linux_kernel_version,
)
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.bgpd]
@@ -215,6 +216,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
# Required linux kernel version for this suite to run.
result = required_linux_kernel_version("4.16")
diff --git a/tests/topotests/bgp_gshut/test_bgp_gshut.py b/tests/topotests/bgp_gshut/test_bgp_gshut.py
index ccf4e9be25..01d545a41b 100644
--- a/tests/topotests/bgp_gshut/test_bgp_gshut.py
+++ b/tests/topotests/bgp_gshut/test_bgp_gshut.py
@@ -92,6 +92,9 @@ def _run_cmd_and_check(router, cmd, results_file, retries=100, intvl=0.5):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_hidden_evpn_revival/test_bgp_hidden_evpn_revival.py b/tests/topotests/bgp_hidden_evpn_revival/test_bgp_hidden_evpn_revival.py
index 9350e93e11..f14c1e394a 100644
--- a/tests/topotests/bgp_hidden_evpn_revival/test_bgp_hidden_evpn_revival.py
+++ b/tests/topotests/bgp_hidden_evpn_revival/test_bgp_hidden_evpn_revival.py
@@ -60,6 +60,12 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py b/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py
index ddb5fe5d82..0cb1d21c42 100755
--- a/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py
+++ b/tests/topotests/bgp_instance_del_test/test_bgp_instance_del_test.py
@@ -14,12 +14,19 @@ import pytest
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
+import lib.ltemplate as ltemplate
from lib.ltemplate import *
-
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.bgpd, pytest.mark.ldpd, pytest.mark.ospfd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+ ltemplate.setup_module(module)
+
+
def test_check_linux_vrf():
CliOnFail = None
# For debugging, uncomment the next line
diff --git a/tests/topotests/bgp_l3vpn_hidden/test_bgp_l3vpn_hidden.py b/tests/topotests/bgp_l3vpn_hidden/test_bgp_l3vpn_hidden.py
index 96ee678283..de7b0b5178 100644
--- a/tests/topotests/bgp_l3vpn_hidden/test_bgp_l3vpn_hidden.py
+++ b/tests/topotests/bgp_l3vpn_hidden/test_bgp_l3vpn_hidden.py
@@ -73,6 +73,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_l3vpn_label_export/test_bgp_l3vpn_label_export.py b/tests/topotests/bgp_l3vpn_label_export/test_bgp_l3vpn_label_export.py
index 8bbecbf34a..6c9293f7e8 100644
--- a/tests/topotests/bgp_l3vpn_label_export/test_bgp_l3vpn_label_export.py
+++ b/tests/topotests/bgp_l3vpn_label_export/test_bgp_l3vpn_label_export.py
@@ -45,6 +45,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py
index 5347604250..9c04b94745 100755
--- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py
+++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py
@@ -14,11 +14,19 @@ import pytest
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
+import lib.ltemplate as ltemplate
from lib.ltemplate import *
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+ ltemplate.setup_module(module)
+
+
def test_check_linux_vrf():
CliOnFail = None
# For debugging, uncomment the next line
diff --git a/tests/topotests/bgp_listen_l3vrf/test_bgp_listen_l3vrf.py b/tests/topotests/bgp_listen_l3vrf/test_bgp_listen_l3vrf.py
index b3ac2d115e..0ade242acd 100644
--- a/tests/topotests/bgp_listen_l3vrf/test_bgp_listen_l3vrf.py
+++ b/tests/topotests/bgp_listen_l3vrf/test_bgp_listen_l3vrf.py
@@ -89,6 +89,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_local_asn/test_bgp_local_asn_vrf_topo1.py b/tests/topotests/bgp_local_asn/test_bgp_local_asn_vrf_topo1.py
index 0c7e7cf5c1..fbf13cc330 100644
--- a/tests/topotests/bgp_local_asn/test_bgp_local_asn_vrf_topo1.py
+++ b/tests/topotests/bgp_local_asn/test_bgp_local_asn_vrf_topo1.py
@@ -49,6 +49,7 @@ from lib.bgp import (
create_router_bgp,
)
from lib.topojson import build_config_from_json
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
@@ -65,6 +66,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_local_asn/test_bgp_local_asn_vrf_topo2.py b/tests/topotests/bgp_local_asn/test_bgp_local_asn_vrf_topo2.py
index 5a0f34132a..1483ace569 100644
--- a/tests/topotests/bgp_local_asn/test_bgp_local_asn_vrf_topo2.py
+++ b/tests/topotests/bgp_local_asn/test_bgp_local_asn_vrf_topo2.py
@@ -48,6 +48,7 @@ from lib.bgp import (
create_router_bgp,
)
from lib.topojson import build_config_from_json
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
@@ -64,6 +65,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py
index 0d92a3c9f8..cae0f55c64 100644
--- a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py
+++ b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py
@@ -99,7 +99,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import iproute2_is_vrf_capable
+from lib.topotest import iproute2_is_vrf_capable, platform_has_vrf
from lib.common_config import (
step,
verify_rib,
@@ -168,6 +168,9 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
# Required linux kernel version for this suite to run.
result = required_linux_kernel_version("4.15")
if result is not True:
diff --git a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py
index 012b643dde..159d926a25 100644
--- a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py
+++ b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py
@@ -56,7 +56,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import iproute2_is_vrf_capable
+from lib.topotest import iproute2_is_vrf_capable, platform_has_vrf
from lib.common_config import (
step,
verify_rib,
@@ -121,6 +121,9 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
# Required linux kernel version for this suite to run.
result = required_linux_kernel_version("4.14")
if result is not True:
diff --git a/tests/topotests/bgp_path_selection/test_bgp_path_selection.py b/tests/topotests/bgp_path_selection/test_bgp_path_selection.py
index aad76525ae..43d97a5dba 100644
--- a/tests/topotests/bgp_path_selection/test_bgp_path_selection.py
+++ b/tests/topotests/bgp_path_selection/test_bgp_path_selection.py
@@ -41,6 +41,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_rd_as_zero/test_bgp_rd_as_zero.py b/tests/topotests/bgp_rd_as_zero/test_bgp_rd_as_zero.py
index 58a7cda915..6d8773d359 100644
--- a/tests/topotests/bgp_rd_as_zero/test_bgp_rd_as_zero.py
+++ b/tests/topotests/bgp_rd_as_zero/test_bgp_rd_as_zero.py
@@ -55,6 +55,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_route_map_vpn_import/test_bgp_route_map_vpn_import.py b/tests/topotests/bgp_route_map_vpn_import/test_bgp_route_map_vpn_import.py
index 409542fa5e..981145541c 100644
--- a/tests/topotests/bgp_route_map_vpn_import/test_bgp_route_map_vpn_import.py
+++ b/tests/topotests/bgp_route_map_vpn_import/test_bgp_route_map_vpn_import.py
@@ -46,6 +46,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py b/tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py
index e31d11b4da..50e0ea7447 100644
--- a/tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py
+++ b/tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py
@@ -40,6 +40,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_show_l2vpn_evpn_rt/test_bgp_show_l2vpn_evpn_rt.py b/tests/topotests/bgp_show_l2vpn_evpn_rt/test_bgp_show_l2vpn_evpn_rt.py
index ba9ce3e8f0..126468397a 100644
--- a/tests/topotests/bgp_show_l2vpn_evpn_rt/test_bgp_show_l2vpn_evpn_rt.py
+++ b/tests/topotests/bgp_show_l2vpn_evpn_rt/test_bgp_show_l2vpn_evpn_rt.py
@@ -73,6 +73,12 @@ def setup_module(mod):
"""
Setup environment
"""
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py b/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py
index 346c1851d9..f882c9af0a 100755
--- a/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py
+++ b/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py
@@ -103,6 +103,8 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
# skip tests is SNMP not installed
snmpd = os.system("which snmpd")
diff --git a/tests/topotests/bgp_soo/test_bgp_soo.py b/tests/topotests/bgp_soo/test_bgp_soo.py
index 594d7d0c95..7537868a36 100644
--- a/tests/topotests/bgp_soo/test_bgp_soo.py
+++ b/tests/topotests/bgp_soo/test_bgp_soo.py
@@ -63,6 +63,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_srv6_evpn_rt5/test_bgp_srv6_evpn_rt5.py b/tests/topotests/bgp_srv6_evpn_rt5/test_bgp_srv6_evpn_rt5.py
index 07d320295b..caf899c27a 100644
--- a/tests/topotests/bgp_srv6_evpn_rt5/test_bgp_srv6_evpn_rt5.py
+++ b/tests/topotests/bgp_srv6_evpn_rt5/test_bgp_srv6_evpn_rt5.py
@@ -61,6 +61,12 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
result = required_linux_kernel_version("6.1")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_srv6_sid_explicit/test_bgp_srv6_sid_explicit.py b/tests/topotests/bgp_srv6_sid_explicit/test_bgp_srv6_sid_explicit.py
index 5b20e5df04..46650e6302 100644
--- a/tests/topotests/bgp_srv6_sid_explicit/test_bgp_srv6_sid_explicit.py
+++ b/tests/topotests/bgp_srv6_sid_explicit/test_bgp_srv6_sid_explicit.py
@@ -63,6 +63,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
result = required_linux_kernel_version("5.15")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_srv6_sid_reachability/test_bgp_srv6_sid_reachability.py b/tests/topotests/bgp_srv6_sid_reachability/test_bgp_srv6_sid_reachability.py
index b2ca08e15c..6fd231b5df 100755
--- a/tests/topotests/bgp_srv6_sid_reachability/test_bgp_srv6_sid_reachability.py
+++ b/tests/topotests/bgp_srv6_sid_reachability/test_bgp_srv6_sid_reachability.py
@@ -50,6 +50,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
result = required_linux_kernel_version("5.15")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_srv6_unicast/test_bgp_srv6_unicast.py b/tests/topotests/bgp_srv6_unicast/test_bgp_srv6_unicast.py
index 467c0853bf..0e11610557 100644
--- a/tests/topotests/bgp_srv6_unicast/test_bgp_srv6_unicast.py
+++ b/tests/topotests/bgp_srv6_unicast/test_bgp_srv6_unicast.py
@@ -57,6 +57,9 @@ def setup_module(mod):
# available only after the VRF module is loaded; if the module is not loaded,
# the strict_mode command may fail and the test can fail later.
# Ensure the VRF module is present and loaded before setting strict_mode.
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
if not topotest.module_present("vrf"):
pytest.skip("VRF kernel module is not available")
diff --git a/tests/topotests/bgp_srv6l3vpn_multi_nlri/test_bgp_srv6l3vpn_multi_nlri.py b/tests/topotests/bgp_srv6l3vpn_multi_nlri/test_bgp_srv6l3vpn_multi_nlri.py
index 05ee3646f7..f039b6b95b 100644
--- a/tests/topotests/bgp_srv6l3vpn_multi_nlri/test_bgp_srv6l3vpn_multi_nlri.py
+++ b/tests/topotests/bgp_srv6l3vpn_multi_nlri/test_bgp_srv6l3vpn_multi_nlri.py
@@ -35,6 +35,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
result = required_linux_kernel_version("5.14")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_srv6l3vpn_over_ipv6/test_bgp_srv6l3vpn_over_ipv6.py b/tests/topotests/bgp_srv6l3vpn_over_ipv6/test_bgp_srv6l3vpn_over_ipv6.py
index 9d586b868d..42b85a1610 100755
--- a/tests/topotests/bgp_srv6l3vpn_over_ipv6/test_bgp_srv6l3vpn_over_ipv6.py
+++ b/tests/topotests/bgp_srv6l3vpn_over_ipv6/test_bgp_srv6l3vpn_over_ipv6.py
@@ -51,6 +51,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
result = required_linux_kernel_version("5.15")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_srv6l3vpn_route_leak/test_bgp_srv6l3vpn_route_leak.py b/tests/topotests/bgp_srv6l3vpn_route_leak/test_bgp_srv6l3vpn_route_leak.py
index 7d3c4e597d..2011c3fc78 100755
--- a/tests/topotests/bgp_srv6l3vpn_route_leak/test_bgp_srv6l3vpn_route_leak.py
+++ b/tests/topotests/bgp_srv6l3vpn_route_leak/test_bgp_srv6l3vpn_route_leak.py
@@ -31,6 +31,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_srv6l3vpn_sid/test_bgp_srv6l3vpn_sid.py b/tests/topotests/bgp_srv6l3vpn_sid/test_bgp_srv6l3vpn_sid.py
index 68cb32d3f8..dd2bae75b3 100755
--- a/tests/topotests/bgp_srv6l3vpn_sid/test_bgp_srv6l3vpn_sid.py
+++ b/tests/topotests/bgp_srv6l3vpn_sid/test_bgp_srv6l3vpn_sid.py
@@ -106,6 +106,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
result = required_linux_kernel_version("5.11")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py
index fe0f53dff6..3cdb1b073c 100755
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py
@@ -87,6 +87,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
result = required_linux_kernel_version("4.15")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/test_bgp_srv6l3vpn_to_bgp_vrf2.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/test_bgp_srv6l3vpn_to_bgp_vrf2.py
index bb67723451..86b387b1f7 100755
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/test_bgp_srv6l3vpn_to_bgp_vrf2.py
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf2/test_bgp_srv6l3vpn_to_bgp_vrf2.py
@@ -51,6 +51,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
result = required_linux_kernel_version("5.15")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py
index 8a142f96b1..04bb4edb23 100644
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf3/test_bgp_srv6l3vpn_to_bgp_vrf3.py
@@ -50,6 +50,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
result = required_linux_kernel_version("5.14")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf4/test_bgp_srv6l3vpn_to_bgp_vrf4.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf4/test_bgp_srv6l3vpn_to_bgp_vrf4.py
index 3e78a100c3..2aeb6703ec 100644
--- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf4/test_bgp_srv6l3vpn_to_bgp_vrf4.py
+++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf4/test_bgp_srv6l3vpn_to_bgp_vrf4.py
@@ -40,6 +40,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
result = required_linux_kernel_version("5.14")
if result is not True:
pytest.skip("Kernel requirements are not met")
diff --git a/tests/topotests/bgp_table_direct_topo1/test_bgp_table_direct_topo1.py b/tests/topotests/bgp_table_direct_topo1/test_bgp_table_direct_topo1.py
index 897408533a..63ccaf1729 100644
--- a/tests/topotests/bgp_table_direct_topo1/test_bgp_table_direct_topo1.py
+++ b/tests/topotests/bgp_table_direct_topo1/test_bgp_table_direct_topo1.py
@@ -66,6 +66,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_tcp_mss/test_bgp_vrf_tcp_mss.py b/tests/topotests/bgp_tcp_mss/test_bgp_vrf_tcp_mss.py
index 4a03cb0a6d..22d5a0f095 100644
--- a/tests/topotests/bgp_tcp_mss/test_bgp_vrf_tcp_mss.py
+++ b/tests/topotests/bgp_tcp_mss/test_bgp_vrf_tcp_mss.py
@@ -48,6 +48,7 @@ from lib.common_config import (
step,
write_test_footer,
)
+from lib.topotest import platform_has_vrf
# Global variables
NETWORK1_1 = {"ipv4": "1.1.1.1/32", "ipv6": "1::1/128"}
@@ -73,6 +74,9 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
global topo, TCPDUMP_FILE
# Required linux kernel version for this suite to run.
diff --git a/tests/topotests/bgp_unique_rid/test_bgp_unique_rid_vrf.py b/tests/topotests/bgp_unique_rid/test_bgp_unique_rid_vrf.py
index 2a9e42dffb..f6c2382c69 100644
--- a/tests/topotests/bgp_unique_rid/test_bgp_unique_rid_vrf.py
+++ b/tests/topotests/bgp_unique_rid/test_bgp_unique_rid_vrf.py
@@ -75,6 +75,7 @@ from lib.bgp import (
create_router_bgp,
clear_bgp_and_verify,
)
+from lib.topotest import platform_has_vrf
# Global variables
topo = None
@@ -108,6 +109,9 @@ def setup_module(mod):
Set up the pytest environment
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
global topo
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_update_delay/test_bgp_update_delay.py b/tests/topotests/bgp_update_delay/test_bgp_update_delay.py
index 59f4bcd385..8834b47e4c 100644
--- a/tests/topotests/bgp_update_delay/test_bgp_update_delay.py
+++ b/tests/topotests/bgp_update_delay/test_bgp_update_delay.py
@@ -85,6 +85,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpn_5549_route_map/test_bgp_vpn_5549_route_map.py b/tests/topotests/bgp_vpn_5549_route_map/test_bgp_vpn_5549_route_map.py
index 65a76e20d8..f942f13424 100644
--- a/tests/topotests/bgp_vpn_5549_route_map/test_bgp_vpn_5549_route_map.py
+++ b/tests/topotests/bgp_vpn_5549_route_map/test_bgp_vpn_5549_route_map.py
@@ -47,6 +47,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpn_import_nexthop_default_vrf/test_bgp_vpn_import_nexthop_default_vrf.py b/tests/topotests/bgp_vpn_import_nexthop_default_vrf/test_bgp_vpn_import_nexthop_default_vrf.py
index 4db4a700fc..e0fdb05b47 100644
--- a/tests/topotests/bgp_vpn_import_nexthop_default_vrf/test_bgp_vpn_import_nexthop_default_vrf.py
+++ b/tests/topotests/bgp_vpn_import_nexthop_default_vrf/test_bgp_vpn_import_nexthop_default_vrf.py
@@ -39,6 +39,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv4_asbr/test_bgp_vpnv4_asbr.py b/tests/topotests/bgp_vpnv4_asbr/test_bgp_vpnv4_asbr.py
index 83dc4cef24..e231321ed7 100644
--- a/tests/topotests/bgp_vpnv4_asbr/test_bgp_vpnv4_asbr.py
+++ b/tests/topotests/bgp_vpnv4_asbr/test_bgp_vpnv4_asbr.py
@@ -144,6 +144,9 @@ def _populate_iface():
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv4_ebgp/test_bgp_vpnv4_ebgp.py b/tests/topotests/bgp_vpnv4_ebgp/test_bgp_vpnv4_ebgp.py
index c212404b7b..691a0b9e7c 100644
--- a/tests/topotests/bgp_vpnv4_ebgp/test_bgp_vpnv4_ebgp.py
+++ b/tests/topotests/bgp_vpnv4_ebgp/test_bgp_vpnv4_ebgp.py
@@ -89,6 +89,9 @@ def _populate_iface():
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv4_ebgp_vpn_auto/test_bgp_vpnv4_vpn_auto.py b/tests/topotests/bgp_vpnv4_ebgp_vpn_auto/test_bgp_vpnv4_vpn_auto.py
index 5141710860..2313846c28 100644
--- a/tests/topotests/bgp_vpnv4_ebgp_vpn_auto/test_bgp_vpnv4_vpn_auto.py
+++ b/tests/topotests/bgp_vpnv4_ebgp_vpn_auto/test_bgp_vpnv4_vpn_auto.py
@@ -93,6 +93,9 @@ def _populate_iface():
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv4_gr_stale/test_bgp_vpnv4_gr_stale.py b/tests/topotests/bgp_vpnv4_gr_stale/test_bgp_vpnv4_gr_stale.py
index fe78645d2f..85b834c344 100644
--- a/tests/topotests/bgp_vpnv4_gr_stale/test_bgp_vpnv4_gr_stale.py
+++ b/tests/topotests/bgp_vpnv4_gr_stale/test_bgp_vpnv4_gr_stale.py
@@ -52,6 +52,9 @@ def start_peer1(tgen, cfg_dir):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
if not tgen.hasmpls:
pytest.skip("MPLS is not available")
diff --git a/tests/topotests/bgp_vpnv4_gre/test_bgp_vpnv4_gre.py b/tests/topotests/bgp_vpnv4_gre/test_bgp_vpnv4_gre.py
index a8a9b0e6e4..6064b4a6af 100644
--- a/tests/topotests/bgp_vpnv4_gre/test_bgp_vpnv4_gre.py
+++ b/tests/topotests/bgp_vpnv4_gre/test_bgp_vpnv4_gre.py
@@ -97,6 +97,9 @@ def _populate_iface(mod):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv4_import_allowas_in/test_bgp_vpnv4_import_allowas_in.py b/tests/topotests/bgp_vpnv4_import_allowas_in/test_bgp_vpnv4_import_allowas_in.py
index fcf72a76dd..d0bbfce7c0 100644
--- a/tests/topotests/bgp_vpnv4_import_allowas_in/test_bgp_vpnv4_import_allowas_in.py
+++ b/tests/topotests/bgp_vpnv4_import_allowas_in/test_bgp_vpnv4_import_allowas_in.py
@@ -39,6 +39,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv4_import_allowas_in_between_vrf/test_bgp_vpnv4_import_allowas_in_between_vrf.py b/tests/topotests/bgp_vpnv4_import_allowas_in_between_vrf/test_bgp_vpnv4_import_allowas_in_between_vrf.py
index 2023aab258..2d820888fe 100644
--- a/tests/topotests/bgp_vpnv4_import_allowas_in_between_vrf/test_bgp_vpnv4_import_allowas_in_between_vrf.py
+++ b/tests/topotests/bgp_vpnv4_import_allowas_in_between_vrf/test_bgp_vpnv4_import_allowas_in_between_vrf.py
@@ -39,6 +39,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv4_noretain/test_bgp_vpnv4_noretain.py b/tests/topotests/bgp_vpnv4_noretain/test_bgp_vpnv4_noretain.py
index 7c4df9669c..714dea3d5f 100644
--- a/tests/topotests/bgp_vpnv4_noretain/test_bgp_vpnv4_noretain.py
+++ b/tests/topotests/bgp_vpnv4_noretain/test_bgp_vpnv4_noretain.py
@@ -110,6 +110,8 @@ def _populate_iface():
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv4_per_nexthop_label/test_bgp_vpnv4_per_nexthop_label.py b/tests/topotests/bgp_vpnv4_per_nexthop_label/test_bgp_vpnv4_per_nexthop_label.py
index 66119589a3..506bb45b11 100644
--- a/tests/topotests/bgp_vpnv4_per_nexthop_label/test_bgp_vpnv4_per_nexthop_label.py
+++ b/tests/topotests/bgp_vpnv4_per_nexthop_label/test_bgp_vpnv4_per_nexthop_label.py
@@ -137,6 +137,9 @@ def _populate_iface():
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv4_route_leak_basic/test_bgp_vpnv4_route_leak_basic.py b/tests/topotests/bgp_vpnv4_route_leak_basic/test_bgp_vpnv4_route_leak_basic.py
index 690eef65a2..3f3a733ce4 100644
--- a/tests/topotests/bgp_vpnv4_route_leak_basic/test_bgp_vpnv4_route_leak_basic.py
+++ b/tests/topotests/bgp_vpnv4_route_leak_basic/test_bgp_vpnv4_route_leak_basic.py
@@ -40,6 +40,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vpnv6_per_nexthop_label/test_bgp_vpnv6_per_nexthop_label.py b/tests/topotests/bgp_vpnv6_per_nexthop_label/test_bgp_vpnv6_per_nexthop_label.py
index 1c4daf2fa0..f63ba3060a 100644
--- a/tests/topotests/bgp_vpnv6_per_nexthop_label/test_bgp_vpnv6_per_nexthop_label.py
+++ b/tests/topotests/bgp_vpnv6_per_nexthop_label/test_bgp_vpnv6_per_nexthop_label.py
@@ -136,6 +136,9 @@ def _populate_iface():
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vrf_different_asn/test_bgp_vrf_different_asn.py b/tests/topotests/bgp_vrf_different_asn/test_bgp_vrf_different_asn.py
index 3ddf574a33..e9796a4316 100644
--- a/tests/topotests/bgp_vrf_different_asn/test_bgp_vrf_different_asn.py
+++ b/tests/topotests/bgp_vrf_different_asn/test_bgp_vrf_different_asn.py
@@ -32,6 +32,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vrf_dynamic_md5_listen_late/test_bgp_vrf_dynamic_md5_listen_late.py b/tests/topotests/bgp_vrf_dynamic_md5_listen_late/test_bgp_vrf_dynamic_md5_listen_late.py
index 2b334e32cc..8b5226c336 100644
--- a/tests/topotests/bgp_vrf_dynamic_md5_listen_late/test_bgp_vrf_dynamic_md5_listen_late.py
+++ b/tests/topotests/bgp_vrf_dynamic_md5_listen_late/test_bgp_vrf_dynamic_md5_listen_late.py
@@ -171,6 +171,9 @@ def _failure_md5_diagnostic_bundle(dut, peer, vrf_name):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py b/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py
index c34c3ebe16..29769772ec 100644
--- a/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py
+++ b/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py
@@ -34,7 +34,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf
from lib.common_config import (
start_topology,
@@ -103,6 +103,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py b/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py
index 8d73e5f8ac..012aaebfbf 100644
--- a/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py
+++ b/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py
@@ -32,7 +32,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf
from lib.common_config import (
start_topology,
@@ -75,6 +75,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
global topo
testsuite_run_time = time.asctime(time.localtime(time.time()))
diff --git a/tests/topotests/bgp_vrf_dynamic_route_leak_topo3/test_bgp_vrf_dynamic_route_leak_topo3.py b/tests/topotests/bgp_vrf_dynamic_route_leak_topo3/test_bgp_vrf_dynamic_route_leak_topo3.py
index 25a73b58c7..66c6d40cb3 100644
--- a/tests/topotests/bgp_vrf_dynamic_route_leak_topo3/test_bgp_vrf_dynamic_route_leak_topo3.py
+++ b/tests/topotests/bgp_vrf_dynamic_route_leak_topo3/test_bgp_vrf_dynamic_route_leak_topo3.py
@@ -34,7 +34,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf
from lib.common_config import (
start_topology,
@@ -96,6 +96,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-1.py b/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-1.py
index 53f0239c4d..8b10a62f89 100644
--- a/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-1.py
+++ b/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-1.py
@@ -35,7 +35,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf
from lib.common_config import (
start_topology,
@@ -93,6 +93,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-2.py b/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-2.py
index 7b0eac3f74..97ef835a04 100644
--- a/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-2.py
+++ b/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-2.py
@@ -35,7 +35,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf
from lib.common_config import (
start_topology,
@@ -93,6 +93,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-3.py b/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-3.py
index ec7b25c7cc..e8d3bc4146 100644
--- a/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-3.py
+++ b/tests/topotests/bgp_vrf_dynamic_route_leak_topo4/test_bgp_vrf_dynamic_route_leak_topo4-3.py
@@ -35,7 +35,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf
from lib.common_config import (
start_topology,
@@ -93,6 +93,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_vrf_import_route_map/test_bgp_vrf_import_route_map.py b/tests/topotests/bgp_vrf_import_route_map/test_bgp_vrf_import_route_map.py
index 4b90b8d780..17869f55d4 100644
--- a/tests/topotests/bgp_vrf_import_route_map/test_bgp_vrf_import_route_map.py
+++ b/tests/topotests/bgp_vrf_import_route_map/test_bgp_vrf_import_route_map.py
@@ -58,6 +58,9 @@ def build_topo(tgen):
def setup_module(mod):
"""Set up the pytest environment."""
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vrf_leaking_5549_routes/test_bgp_vrf_leaking.py b/tests/topotests/bgp_vrf_leaking_5549_routes/test_bgp_vrf_leaking.py
index 67aa27870d..a264cc724a 100755
--- a/tests/topotests/bgp_vrf_leaking_5549_routes/test_bgp_vrf_leaking.py
+++ b/tests/topotests/bgp_vrf_leaking_5549_routes/test_bgp_vrf_leaking.py
@@ -31,6 +31,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vrf_leaking_rt_change_route_maps/test_bgp_vrf_leaking_rt_change_route_maps.py b/tests/topotests/bgp_vrf_leaking_rt_change_route_maps/test_bgp_vrf_leaking_rt_change_route_maps.py
index e010963d73..293a0eb09e 100644
--- a/tests/topotests/bgp_vrf_leaking_rt_change_route_maps/test_bgp_vrf_leaking_rt_change_route_maps.py
+++ b/tests/topotests/bgp_vrf_leaking_rt_change_route_maps/test_bgp_vrf_leaking_rt_change_route_maps.py
@@ -34,6 +34,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vrf_lite_best_path_test/test_bgp_vrf_lite_best_path_topo1.py b/tests/topotests/bgp_vrf_lite_best_path_test/test_bgp_vrf_lite_best_path_topo1.py
index 3790446dc9..c7e7c864b3 100644
--- a/tests/topotests/bgp_vrf_lite_best_path_test/test_bgp_vrf_lite_best_path_topo1.py
+++ b/tests/topotests/bgp_vrf_lite_best_path_test/test_bgp_vrf_lite_best_path_topo1.py
@@ -30,7 +30,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf
from lib.common_config import (
start_topology,
@@ -99,6 +99,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_vrf_lite_best_path_test/test_bgp_vrf_lite_best_path_topo2.py b/tests/topotests/bgp_vrf_lite_best_path_test/test_bgp_vrf_lite_best_path_topo2.py
index 262cacd147..6f5c823075 100644
--- a/tests/topotests/bgp_vrf_lite_best_path_test/test_bgp_vrf_lite_best_path_topo2.py
+++ b/tests/topotests/bgp_vrf_lite_best_path_test/test_bgp_vrf_lite_best_path_topo2.py
@@ -30,7 +30,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf
from lib.common_config import (
start_topology,
@@ -92,6 +92,8 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py
index e1895a9ab0..01754b2c54 100644
--- a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py
+++ b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py
@@ -53,6 +53,8 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
# Required linux kernel version for this suite to run.
result = required_linux_kernel_version("5.0")
diff --git a/tests/topotests/bgp_vrf_md5_peering/test_bgp_vrf_md5_peering.py b/tests/topotests/bgp_vrf_md5_peering/test_bgp_vrf_md5_peering.py
index 8c83cb85a0..18cbccd59d 100644
--- a/tests/topotests/bgp_vrf_md5_peering/test_bgp_vrf_md5_peering.py
+++ b/tests/topotests/bgp_vrf_md5_peering/test_bgp_vrf_md5_peering.py
@@ -37,6 +37,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py b/tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py
index 4aa4404134..32968c72e5 100644
--- a/tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py
+++ b/tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py
@@ -66,6 +66,9 @@ def build_topo(tgen):
def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, module.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py b/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py
index 5cd33f0ea6..f09cefe579 100644
--- a/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py
+++ b/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py
@@ -43,6 +43,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_vrf_rt_rid_change/test_bgp_vrf_rt_rid_change.py b/tests/topotests/bgp_vrf_rt_rid_change/test_bgp_vrf_rt_rid_change.py
index 921d9738dd..9792c9b423 100644
--- a/tests/topotests/bgp_vrf_rt_rid_change/test_bgp_vrf_rt_rid_change.py
+++ b/tests/topotests/bgp_vrf_rt_rid_change/test_bgp_vrf_rt_rid_change.py
@@ -27,6 +27,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/bgp_wcmp_zebra_link_bandwidth/test_bgp_wcmp_zebra_link_bandwidth.py b/tests/topotests/bgp_wcmp_zebra_link_bandwidth/test_bgp_wcmp_zebra_link_bandwidth.py
index d151d5f6e0..6a45854d26 100644
--- a/tests/topotests/bgp_wcmp_zebra_link_bandwidth/test_bgp_wcmp_zebra_link_bandwidth.py
+++ b/tests/topotests/bgp_wcmp_zebra_link_bandwidth/test_bgp_wcmp_zebra_link_bandwidth.py
@@ -24,6 +24,9 @@ pytestmark = [pytest.mark.bgpd]
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
topodef = {"s1": ("r1", "r2"), "s2": ("r1", "r3")}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py b/tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py
index 5136473810..644fc57635 100644
--- a/tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py
+++ b/tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py
@@ -80,6 +80,9 @@ def build_topo(tgen):
def setup_module(module):
"Setup topology"
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
tgen = Topogen(build_topo, module.__name__)
tgen.start_topology()
diff --git a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py
index 8676c0942b..590f0f8264 100644
--- a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py
+++ b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py
@@ -33,7 +33,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf, platform_has_evpn
from lib.topogen import Topogen, get_topogen
from lib.common_config import (
@@ -113,6 +113,11 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
testsuite_run_time = time.asctime(time.localtime(time.time()))
logger.info("Testsuite start time: {}".format(testsuite_run_time))
diff --git a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py
index 3bb5613429..769ce65980 100644
--- a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py
+++ b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py
@@ -37,7 +37,7 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
-from lib.topotest import version_cmp
+from lib.topotest import version_cmp, platform_has_vrf, platform_has_evpn
from lib.topogen import Topogen, get_topogen
from lib.common_config import (
@@ -118,6 +118,11 @@ def setup_module(mod):
* `mod`: module name
"""
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
global topo
testsuite_run_time = time.asctime(time.localtime(time.time()))
diff --git a/tests/topotests/frr_reload_vrf/test_frr_reload_evpn_rt_import_scale.py b/tests/topotests/frr_reload_vrf/test_frr_reload_evpn_rt_import_scale.py
index 1f14065bde..a1a79c2370 100644
--- a/tests/topotests/frr_reload_vrf/test_frr_reload_evpn_rt_import_scale.py
+++ b/tests/topotests/frr_reload_vrf/test_frr_reload_evpn_rt_import_scale.py
@@ -94,6 +94,14 @@ PREFIXES = [
]
+def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
+
def test_scale_rt_helpers():
"""Daemon-less checks for the shared RT-list helpers this suite uses."""
rts = evpn_scale_rt_list()
diff --git a/tests/topotests/frr_reload_vrf/test_frr_reload_evpn_rt_scale.py b/tests/topotests/frr_reload_vrf/test_frr_reload_evpn_rt_scale.py
index 5670247e47..13573dd30c 100644
--- a/tests/topotests/frr_reload_vrf/test_frr_reload_evpn_rt_scale.py
+++ b/tests/topotests/frr_reload_vrf/test_frr_reload_evpn_rt_scale.py
@@ -75,6 +75,14 @@ IMPORT_RT_COUNT = len(IMPORT_RTS)
RELOAD_TIMEOUT = float(os.environ.get("FRR_RELOAD_RT_TIMEOUT", "120"))
+def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
+
def _static_routes():
first = int(ipaddress.IPv4Address("198.18.0.0"))
return [
diff --git a/tests/topotests/frr_reload_vrf/test_frr_reload_vrf_dataplane.py b/tests/topotests/frr_reload_vrf/test_frr_reload_vrf_dataplane.py
index 520c2e1247..6432f33ed5 100644
--- a/tests/topotests/frr_reload_vrf/test_frr_reload_vrf_dataplane.py
+++ b/tests/topotests/frr_reload_vrf/test_frr_reload_vrf_dataplane.py
@@ -74,6 +74,14 @@ DP_KNOBS = [
]
+def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not topotest.platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
+
def build_topo(tgen):
tgen.add_router(D.SPINE)
for pe in D.PES:
diff --git a/tests/topotests/frr_reload_vrf/test_frr_reload_vrf_scale.py b/tests/topotests/frr_reload_vrf/test_frr_reload_vrf_scale.py
index b90d1d8bde..05926d7c4b 100644
--- a/tests/topotests/frr_reload_vrf/test_frr_reload_vrf_scale.py
+++ b/tests/topotests/frr_reload_vrf/test_frr_reload_vrf_scale.py
@@ -49,6 +49,7 @@ from lib.topolog import logger
import vrf_knobs as K
import frr_reload_lib as R
+from lib.topotest import platform_has_vrf, platform_has_evpn
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
@@ -78,6 +79,14 @@ ALL = K.ZEBRA_KNOBS + K.STATIC_KNOBS
NEEDED_DAEMONS = ["zebra", "staticd", "bgpd"]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+ if not platform_has_evpn():
+ pytest.skip("platform does not support EVPN")
+
+
def _conf_path(tgen, rname="r1"):
d = os.path.join(tgen.logdir, rname)
os.makedirs(d, exist_ok=True)
diff --git a/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py b/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py
index 51334d1eb7..00f510b9b6 100644
--- a/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py
+++ b/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py
@@ -83,6 +83,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/mgmt_config/test_regress2.py b/tests/topotests/mgmt_config/test_regress2.py
index 6422a05d2d..276d5dc03a 100644
--- a/tests/topotests/mgmt_config/test_regress2.py
+++ b/tests/topotests/mgmt_config/test_regress2.py
@@ -17,10 +17,16 @@ import pytest
from lib.common_config import step
from lib.topogen import Topogen
from munet.watchlog import WatchLog
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.staticd, pytest.mark.mgmtd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/mgmt_fe_client/test_client.py b/tests/topotests/mgmt_fe_client/test_client.py
index 091d832bb8..406638ffe2 100644
--- a/tests/topotests/mgmt_fe_client/test_client.py
+++ b/tests/topotests/mgmt_fe_client/test_client.py
@@ -13,10 +13,16 @@ Test static route functionality
import pytest
from lib.topogen import Topogen
from oper import check_kernel_32
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.staticd, pytest.mark.mgmtd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/mgmt_notif/test_ds_notify.py b/tests/topotests/mgmt_notif/test_ds_notify.py
index 24aa114aec..7597c0d4ff 100644
--- a/tests/topotests/mgmt_notif/test_ds_notify.py
+++ b/tests/topotests/mgmt_notif/test_ds_notify.py
@@ -30,6 +30,11 @@ FE_CLIENT = CWD + "/../lib/fe_client.py"
BE_CLIENT = "/usr/lib/frr/mgmtd_testc"
+def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
def have_beclient(r1):
if hasattr(have_beclient, "has"):
return have_beclient.has
diff --git a/tests/topotests/mgmt_oper/test_oper.py b/tests/topotests/mgmt_oper/test_oper.py
index da61166d9a..99782d09da 100644
--- a/tests/topotests/mgmt_oper/test_oper.py
+++ b/tests/topotests/mgmt_oper/test_oper.py
@@ -16,10 +16,16 @@ import math
import pytest
from lib.topogen import Topogen
from oper import check_kernel_32, check_kernel_net, do_oper_test
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.staticd, pytest.mark.mgmtd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/mgmt_oper/test_querying.py b/tests/topotests/mgmt_oper/test_querying.py
index 7a73f541e7..9e44b97fa6 100644
--- a/tests/topotests/mgmt_oper/test_querying.py
+++ b/tests/topotests/mgmt_oper/test_querying.py
@@ -19,10 +19,16 @@ import pytest
from lib.common_config import step
from lib.topogen import Topogen
from oper import check_kernel_32
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.staticd, pytest.mark.mgmtd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/mgmt_oper/test_root.py b/tests/topotests/mgmt_oper/test_root.py
index 30a80553a2..cc4265d4ce 100644
--- a/tests/topotests/mgmt_oper/test_root.py
+++ b/tests/topotests/mgmt_oper/test_root.py
@@ -14,10 +14,16 @@ Test root level queries
import pytest
from lib.topogen import Topogen
from oper import check_kernel_32, do_oper_test
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.staticd, pytest.mark.mgmtd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/mgmt_oper/test_scale.py b/tests/topotests/mgmt_oper/test_scale.py
index afde30937f..134f80ac81 100644
--- a/tests/topotests/mgmt_oper/test_scale.py
+++ b/tests/topotests/mgmt_oper/test_scale.py
@@ -18,10 +18,16 @@ import pytest
from lib.common_config import step
from lib.topogen import Topogen, TopoRouter
from oper import check_kernel_32
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.mgmtd, pytest.mark.sharpd, pytest.mark.staticd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/mgmt_oper/test_simple.py b/tests/topotests/mgmt_oper/test_simple.py
index 2a1b24656d..813ecb48de 100644
--- a/tests/topotests/mgmt_oper/test_simple.py
+++ b/tests/topotests/mgmt_oper/test_simple.py
@@ -15,10 +15,16 @@ Test static route functionality
import pytest
from lib.topogen import Topogen
from oper import check_kernel_32, do_oper_test
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.staticd, pytest.mark.mgmtd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py b/tests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py
index 8b1a8c9024..bd51d3fbca 100755
--- a/tests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py
+++ b/tests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py
@@ -131,6 +131,8 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
# Required linux kernel version for this suite to run.
result = required_linux_kernel_version("5.0")
diff --git a/tests/topotests/ospf_metric_propagation/test_ospf_metric_propagation.py b/tests/topotests/ospf_metric_propagation/test_ospf_metric_propagation.py
index dc16a69e75..331146a5e2 100644
--- a/tests/topotests/ospf_metric_propagation/test_ospf_metric_propagation.py
+++ b/tests/topotests/ospf_metric_propagation/test_ospf_metric_propagation.py
@@ -128,6 +128,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
logger.info("OSPF Metric Propagation:\n {}".format(TOPOLOGY))
tgen = Topogen(build_topo, mod.__name__)
diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/test_ospf_multi_vrf_bgp_route_leak.py b/tests/topotests/ospf_multi_vrf_bgp_route_leak/test_ospf_multi_vrf_bgp_route_leak.py
index e435a0b28b..30e8ae1fb8 100644
--- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/test_ospf_multi_vrf_bgp_route_leak.py
+++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/test_ospf_multi_vrf_bgp_route_leak.py
@@ -102,6 +102,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
logger.info("OSPF Multi VRF Topology with BGP route leaking:\n {}".format(TOPOLOGY))
tgen = Topogen(build_topo, mod.__name__)
diff --git a/tests/topotests/ospf_netns_vrf/test_ospf_netns_vrf.py b/tests/topotests/ospf_netns_vrf/test_ospf_netns_vrf.py
index 128bf7f396..a607a48b0e 100644
--- a/tests/topotests/ospf_netns_vrf/test_ospf_netns_vrf.py
+++ b/tests/topotests/ospf_netns_vrf/test_ospf_netns_vrf.py
@@ -61,6 +61,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/pbr_topo1/test_pbr_topo1.py b/tests/topotests/pbr_topo1/test_pbr_topo1.py
index 157931aff8..3db9f8a87d 100644
--- a/tests/topotests/pbr_topo1/test_pbr_topo1.py
+++ b/tests/topotests/pbr_topo1/test_pbr_topo1.py
@@ -72,6 +72,9 @@ def build_topo(tgen):
def setup_module(module):
"Setup topology"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, module.__name__)
tgen.start_topology()
diff --git a/tests/topotests/pim_igmp_vrf/test_pim_vrf.py b/tests/topotests/pim_igmp_vrf/test_pim_vrf.py
index c500e9347f..ae5322fecc 100755
--- a/tests/topotests/pim_igmp_vrf/test_pim_vrf.py
+++ b/tests/topotests/pim_igmp_vrf/test_pim_vrf.py
@@ -184,6 +184,9 @@ def build_topo(tgen):
def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
logger.info("PIM IGMP VRF Topology: \n {}".format(TOPOLOGY))
tgen = Topogen(build_topo, module.__name__)
diff --git a/tests/topotests/srv6_sid_manager/test_srv6_sid_manager.py b/tests/topotests/srv6_sid_manager/test_srv6_sid_manager.py
index 78f6b61b4e..2a0cfc2180 100644
--- a/tests/topotests/srv6_sid_manager/test_srv6_sid_manager.py
+++ b/tests/topotests/srv6_sid_manager/test_srv6_sid_manager.py
@@ -259,6 +259,8 @@ def build_topo(tgen):
def setup_module(mod):
"""Sets up the pytest environment"""
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
# Verify if kernel requirements are satisfied
result = required_linux_kernel_version("4.10")
diff --git a/tests/topotests/static_cross_vrf_nexthop/test_static_cross_vrf_nexthop.py b/tests/topotests/static_cross_vrf_nexthop/test_static_cross_vrf_nexthop.py
index bfa6da61f7..3b8ede550d 100644
--- a/tests/topotests/static_cross_vrf_nexthop/test_static_cross_vrf_nexthop.py
+++ b/tests/topotests/static_cross_vrf_nexthop/test_static_cross_vrf_nexthop.py
@@ -51,6 +51,9 @@ def build_topo(tgen):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/static_nht_self_match/test_static_nht_self_match.py b/tests/topotests/static_nht_self_match/test_static_nht_self_match.py
index e0b434675b..637b78cb75 100644
--- a/tests/topotests/static_nht_self_match/test_static_nht_self_match.py
+++ b/tests/topotests/static_nht_self_match/test_static_nht_self_match.py
@@ -50,6 +50,9 @@ def build_topo(tgen):
def setup_module(mod):
"Create the dummies and VRFs, then start FRR from the integrated config."
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/static_simple/test_static_simple.py b/tests/topotests/static_simple/test_static_simple.py
index 22cf0677b1..d9b2b557a1 100644
--- a/tests/topotests/static_simple/test_static_simple.py
+++ b/tests/topotests/static_simple/test_static_simple.py
@@ -19,10 +19,16 @@ import pytest
from lib.topogen import TopoRouter, Topogen
from lib.topolog import logger
from lib.common_config import retry, step
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.mgmtd, pytest.mark.staticd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/static_vrf/test_static_vrf.py b/tests/topotests/static_vrf/test_static_vrf.py
index 1aac010954..53d56868fe 100644
--- a/tests/topotests/static_vrf/test_static_vrf.py
+++ b/tests/topotests/static_vrf/test_static_vrf.py
@@ -15,10 +15,16 @@ import ipaddress
import pytest
from lib.topogen import Topogen
from lib.common_config import retry
+from lib.topotest import platform_has_vrf
pytestmark = [pytest.mark.staticd, pytest.mark.mgmtd]
+def setup_module(module):
+ if not platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/static_weight/test_static_weight.py b/tests/topotests/static_weight/test_static_weight.py
index 63b1164ab1..9ad097a5ea 100644
--- a/tests/topotests/static_weight/test_static_weight.py
+++ b/tests/topotests/static_weight/test_static_weight.py
@@ -22,6 +22,9 @@ pytestmark = [pytest.mark.staticd]
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
topodef = {"s1": ("r1"), "s2": ("r1"), "s3": ("r1")}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/zebra_inactive_vrf_and_ip_import_table/test_zebra_inactive_vrf_and_ip_import_tables.py b/tests/topotests/zebra_inactive_vrf_and_ip_import_table/test_zebra_inactive_vrf_and_ip_import_tables.py
index ac41d317a6..c59d00ed53 100644
--- a/tests/topotests/zebra_inactive_vrf_and_ip_import_table/test_zebra_inactive_vrf_and_ip_import_tables.py
+++ b/tests/topotests/zebra_inactive_vrf_and_ip_import_table/test_zebra_inactive_vrf_and_ip_import_tables.py
@@ -36,6 +36,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/zebra_operational_data/test_zebra_operational.py b/tests/topotests/zebra_operational_data/test_zebra_operational.py
index eea9ffc359..d419a94905 100644
--- a/tests/topotests/zebra_operational_data/test_zebra_operational.py
+++ b/tests/topotests/zebra_operational_data/test_zebra_operational.py
@@ -19,6 +19,11 @@ from lib import topotest
pytestmark = [pytest.mark.mgmtd]
+def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
+
@pytest.fixture(scope="module")
def tgen(request):
"Setup/Teardown the environment and provide tgen argument to tests"
diff --git a/tests/topotests/zebra_reconnect_route_replay/test_zebra_reconnect_route_replay_vrf.py b/tests/topotests/zebra_reconnect_route_replay/test_zebra_reconnect_route_replay_vrf.py
index 909d452244..5fa3e40cc1 100644
--- a/tests/topotests/zebra_reconnect_route_replay/test_zebra_reconnect_route_replay_vrf.py
+++ b/tests/topotests/zebra_reconnect_route_replay/test_zebra_reconnect_route_replay_vrf.py
@@ -84,6 +84,9 @@ _udp_l3mdev_original = None
def setup_module(module):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
global _udp_l3mdev_original
tgen = Topogen(build_topo, module.__name__)
diff --git a/tests/topotests/zebra_recursive_cross_vrf_nexthop/test_zebra_recursive_cross_vrf_nexthop.py b/tests/topotests/zebra_recursive_cross_vrf_nexthop/test_zebra_recursive_cross_vrf_nexthop.py
index ef9cf0281c..0b1be0bf33 100644
--- a/tests/topotests/zebra_recursive_cross_vrf_nexthop/test_zebra_recursive_cross_vrf_nexthop.py
+++ b/tests/topotests/zebra_recursive_cross_vrf_nexthop/test_zebra_recursive_cross_vrf_nexthop.py
@@ -98,6 +98,9 @@ def build_topo(tgen):
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/zebra_rib/test_zebra_rib.py b/tests/topotests/zebra_rib/test_zebra_rib.py
index 27955ee465..524f2e8272 100644
--- a/tests/topotests/zebra_rib/test_zebra_rib.py
+++ b/tests/topotests/zebra_rib/test_zebra_rib.py
@@ -52,6 +52,9 @@ def config_macvlan(tgen, r_str, device, macvlan):
def setup_module(mod):
"Sets up the pytest environment"
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
# 8 links to 8 switches on r1
topodef = {"s{}".format(x): ("r1",) for x in range(1, 9)}
tgen = Topogen(topodef, mod.__name__)
diff --git a/tests/topotests/zebra_vrf_metaq_leak/test_zebra_vrf_metaq_leak.py b/tests/topotests/zebra_vrf_metaq_leak/test_zebra_vrf_metaq_leak.py
index e7230e242e..abd126216f 100644
--- a/tests/topotests/zebra_vrf_metaq_leak/test_zebra_vrf_metaq_leak.py
+++ b/tests/topotests/zebra_vrf_metaq_leak/test_zebra_vrf_metaq_leak.py
@@ -65,6 +65,9 @@ NHOP = "169.254.0.1"
def setup_module(mod):
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
topodef = {"s1": ("r1",)}
tgen = Topogen(topodef, mod.__name__)
tgen.start_topology()
diff --git a/tests/topotests/zebra_vrf_netns/test_zebra_vrf_netns.py b/tests/topotests/zebra_vrf_netns/test_zebra_vrf_netns.py
index 36b813a144..e5d50bcb8c 100644
--- a/tests/topotests/zebra_vrf_netns/test_zebra_vrf_netns.py
+++ b/tests/topotests/zebra_vrf_netns/test_zebra_vrf_netns.py
@@ -57,6 +57,9 @@ def build_topo(tgen):
def setup_module(mod):
"Create netns VRFs, move interfaces, then start FRR with integrated config."
+ if not topotest.platform_has_vrf():
+ pytest.skip("platform does not support VRF")
+
tgen = Topogen(build_topo, mod.__name__)
tgen.start_topology()