From bb1ed57b246a1cf9db9f51920f993cc6a824d86b Mon Sep 17 00:00:00 2001 From: Raghavendran Ramanathan Date: Thu, 7 Sep 2023 17:28:11 -0700 Subject: [PATCH] Porting skip-watermark-tests to 202205. --- tests/qos/qos_sai_base.py | 16 ++++++++++++++++ tests/qos/test_qos_sai.py | 9 +++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/tests/qos/qos_sai_base.py b/tests/qos/qos_sai_base.py index 837cd024ad..cca13e5886 100644 --- a/tests/qos/qos_sai_base.py +++ b/tests/qos/qos_sai_base.py @@ -2014,3 +2014,19 @@ def skip_check_for_hbm_either_asic(self, get_src_dst_asic_and_duts): "This test needs to be revisited for HBM enabled systems.") yield return + + @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 diff --git a/tests/qos/test_qos_sai.py b/tests/qos/test_qos_sai.py index b71f2446d4..a030333f33 100644 --- a/tests/qos/test_qos_sai.py +++ b/tests/qos/test_qos_sai.py @@ -902,7 +902,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 @@ -1371,7 +1371,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 @@ -1568,7 +1568,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 @@ -1825,7 +1825,8 @@ def testQosSaiDwrrWeightChange( @pytest.mark.parametrize("queueProfile", ["wm_q_wm_all_ports"]) def testQosSaiQWatermarkAllPorts( self, queueProfile, ptfhost, dutTestParams, dutConfig, dutQosConfig, - resetWatermark, get_src_dst_asic_and_duts, dut_qos_maps + resetWatermark, get_src_dst_asic_and_duts, dut_qos_maps, + _skip_watermark_multi_DUT ): """ Test QoS SAI Queue watermark test for lossless/lossy traffic on all ports