From 1d153c8f3dea67df1490c5549ba7428bd3cfe9b4 Mon Sep 17 00:00:00 2001 From: Zhaohui Sun <94606222+ZhaohuiS@users.noreply.github.com> Date: Thu, 2 Jan 2025 09:36:42 +0800 Subject: [PATCH] Skip tests/vxlan/test_vnet_bgp_route_precedence.py for non cisco and mnlx platforms (#16266) What is the motivation for this PR? Skip tests/vxlan/test_vnet_bgp_route_precedence.py for non cisco and mnlx platforms How did you do it? Add skip condition in conditional mark file How did you verify/test it? Run tests/vxlan/test_vnet_bgp_route_precedence.py on broadcom platform --- .../plugins/conditional_mark/tests_mark_conditions.yaml | 6 ++++++ tests/vxlan/test_vnet_bgp_route_precedence.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml b/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml index 535d112f42e..492dd777577 100644 --- a/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml +++ b/tests/common/plugins/conditional_mark/tests_mark_conditions.yaml @@ -2409,6 +2409,12 @@ vrf/test_vrf_attr.py::TestVrfAttrSrcMac::test_vrf1_neigh_with_default_router_mac ####################################### ##### vxlan ##### ####################################### +vxlan/test_vnet_bgp_route_precedence.py: + skip: + reason: "test_vnet_bgp_route_precedence can only run on cisco and mnlx platforms." + conditions: + - "asic_type not in ['cisco-8000', 'mellanox']" + vxlan/test_vnet_route_leak.py: skip: reason: "Test skipped due to issue #8374" diff --git a/tests/vxlan/test_vnet_bgp_route_precedence.py b/tests/vxlan/test_vnet_bgp_route_precedence.py index 5ff29a869e9..f2b219926ee 100644 --- a/tests/vxlan/test_vnet_bgp_route_precedence.py +++ b/tests/vxlan/test_vnet_bgp_route_precedence.py @@ -185,7 +185,7 @@ def fixture_setUp(duthosts, data['loopback_v6'] = data['minigraph_facts']['minigraph_lo_interfaces'][0]['addr'] asic_type = duthosts[rand_one_dut_hostname].facts["asic_type"] if asic_type not in ["cisco-8000", "mellanox"]: - raise RuntimeError("Pls update this script for your platform.") + pytest.skip(f"{asic_type} is not a supported platform for this test. Only support MNLX and CISCO platforms.") # Should I keep the temporary files copied to DUT? ecmp_utils.Constants['KEEP_TEMP_FILES'] = \