Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/snappi_tests/cisco/helper.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Helper functions to be used only for cisco platforms.
from tests.common.cisco_data import copy_set_voq_watchdog_script_cisco_8000
from tests.common.utilities import wait_until
from tests.common.cisco_data import copy_set_voq_watchdog_script_cisco_8000, check_dshell_ready
import pytest


Expand Down Expand Up @@ -27,6 +28,8 @@ def modify_voq_watchdog_cisco_8000(duthost, enable):
# copy_set_voq_watchdog_script_cisco_8000(duthost, "", enable=enable)
'''

if not wait_until(300, 20, 0, check_dshell_ready, duthost):
raise RuntimeError("Debug shell is not ready on {}".format(duthost.hostname))
for asic in asics:
copy_set_voq_watchdog_script_cisco_8000(duthost, asic, enable=enable)
duthost.shell(f"sudo show platform npu script -n asic{asic} -s set_voq_watchdog.py")
7 changes: 6 additions & 1 deletion tests/snappi_tests/pfcwd/test_pfcwd_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from tests.common.config_reload import config_reload
from tests.common.snappi_tests.snappi_test_params import SnappiTestParams
from tests.snappi_tests.variables import MULTIDUT_PORT_INFO, MULTIDUT_TESTBED
from tests.snappi_tests.cisco.helper import disable_voq_watchdog # noqa: F401
from tests.snappi_tests.cisco.helper import modify_voq_watchdog_cisco_8000 # noqa: F401

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -1001,6 +1001,8 @@ def test_pfcwd_disable_pause_cngtn(snappi_api, # noqa: F811

for dut in duthosts:
clear_fabric_counters(dut)
if dut.facts.get('asic_type') == "cisco-8000":
modify_voq_watchdog_cisco_8000(dut, False)

try:
run_pfc_test(api=snappi_api,
Expand All @@ -1022,5 +1024,8 @@ def test_pfcwd_disable_pause_cngtn(snappi_api, # noqa: F811

finally:
cleanup_config(duthosts, snappi_ports)
for dut in duthosts:
if dut.facts.get('asic_type') == "cisco-8000":
modify_voq_watchdog_cisco_8000(dut, True)
for duthost in dut_list:
config_reload(sonic_host=duthost, config_source='config_db', safe_reload=True)
Loading