Skip to content

Commit

Permalink
Cisco: Skip Watermark test for multi-DUT cases. (#9810)
Browse files Browse the repository at this point in the history
  • Loading branch information
rraghav-cisco authored Sep 22, 2023
1 parent 4aac180 commit 4835e49
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions tests/qos/qos_sai_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1950,3 +1950,19 @@ def select_port_ids_for_mellnaox_device(self, duthost, mgFacts, testPortIds):
max_port_num = len(port_list)
logger.info(f"Test ports ids is{test_port_ids}")
return test_port_ids

@pytest.fixture(scope="function", autouse=False)
def _skip_watermark_multi_DUT(
self,
get_src_dst_asic_and_duts,
dutQosConfig):
if not is_cisco_device(get_src_dst_asic_and_duts['src_dut']):
yield
return
if (get_src_dst_asic_and_duts['src_dut'] !=
get_src_dst_asic_and_duts['dst_dut']):
pytest.skip(
"All WM Tests are skipped for multiDUT for cisco platforms.")

yield
return
8 changes: 4 additions & 4 deletions tests/qos/test_qos_sai.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def testQosSaiHeadroomPoolWatermark(
@pytest.mark.parametrize("bufPool", ["wm_buf_pool_lossless", "wm_buf_pool_lossy"])
def testQosSaiBufferPoolWatermark(
self, request, get_src_dst_asic_and_duts, bufPool, ptfhost, dutTestParams, dutConfig, dutQosConfig,
ingressLosslessProfile, egressLossyProfile, resetWatermark,
ingressLosslessProfile, egressLossyProfile, resetWatermark, _skip_watermark_multi_DUT
):
"""
Test QoS SAI Queue buffer pool watermark for lossless/lossy traffic
Expand Down Expand Up @@ -1376,7 +1376,7 @@ def testQosSaiDwrr(
@pytest.mark.parametrize("pgProfile", ["wm_pg_shared_lossless", "wm_pg_shared_lossy"])
def testQosSaiPgSharedWatermark(
self, pgProfile, ptfhost, get_src_dst_asic_and_duts, dutTestParams, dutConfig, dutQosConfig,
resetWatermark
resetWatermark, _skip_watermark_multi_DUT
):
"""
Test QoS SAI PG shared watermark test for lossless/lossy traffic
Expand Down Expand Up @@ -1576,7 +1576,7 @@ def testQosSaiPGDrop(
@pytest.mark.parametrize("queueProfile", ["wm_q_shared_lossless", "wm_q_shared_lossy"])
def testQosSaiQSharedWatermark(
self, get_src_dst_asic_and_duts, queueProfile, ptfhost, dutTestParams, dutConfig, dutQosConfig,
resetWatermark
resetWatermark, _skip_watermark_multi_DUT
):
"""
Test QoS SAI Queue shared watermark test for lossless/lossy traffic
Expand Down Expand Up @@ -1900,7 +1900,7 @@ def testQosSaiDwrrWeightChange(
@pytest.mark.parametrize("queueProfile", ["wm_q_wm_all_ports"])
def testQosSaiQWatermarkAllPorts(
self, queueProfile, ptfhost, dutTestParams, dutConfig, dutQosConfig,
resetWatermark
resetWatermark, _skip_watermark_multi_DUT
):
"""
Test QoS SAI Queue watermark test for lossless/lossy traffic on all ports
Expand Down

0 comments on commit 4835e49

Please sign in to comment.