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
7 changes: 0 additions & 7 deletions tests/common/reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
REBOOT_TYPE_WATCHDOG = "watchdog"
REBOOT_TYPE_UNKNOWN = "Unknown"
REBOOT_TYPE_THERMAL_OVERLOAD = "Thermal Overload"
REBOOT_TYPE_CPU = "cpu"
REBOOT_TYPE_BIOS = "bios"
REBOOT_TYPE_ASIC = "asic"

Expand Down Expand Up @@ -92,12 +91,6 @@
"cause": "warm-reboot",
"test_reboot_cause_only": False
},
REBOOT_TYPE_CPU: {
"timeout": 300,
"wait": 120,
"cause": "CPU",
"test_reboot_cause_only": True
},
REBOOT_TYPE_BIOS: {
"timeout": 300,
"wait": 120,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,6 @@ def read_fan_ambient_thermal(self):
@mocker('RebootCauseMocker')
class RebootCauseMocker(object):
RESET_RELOAD_BIOS = '/var/run/hw-management/system/reset_reload_bios'
RESET_FROM_COMEX = '/var/run/hw-management/system/reset_from_comex'
RESET_FROM_ASIC = '/var/run/hw-management/system/reset_from_asic'

def __init__(self, dut):
Expand All @@ -1377,8 +1376,5 @@ def deinit(self):
def mock_reset_reload_bios(self):
self.mock_helper.mock_value(self.RESET_RELOAD_BIOS, 1)

def mock_reset_from_comex(self):
self.mock_helper.mock_value(self.RESET_FROM_COMEX, 1)

def mock_reset_from_asic(self):
self.mock_helper.mock_value(self.RESET_FROM_ASIC, 1)
8 changes: 3 additions & 5 deletions tests/platform_tests/mellanox/test_reboot_cause.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import allure
import logging
import pytest
from tests.common.reboot import REBOOT_TYPE_CPU, REBOOT_TYPE_BIOS, REBOOT_TYPE_ASIC, check_reboot_cause
from tests.common.reboot import REBOOT_TYPE_BIOS, REBOOT_TYPE_ASIC, check_reboot_cause
from tests.platform_tests.thermal_control_test_helper import mocker_factory # noqa: F401

pytestmark = [
Expand All @@ -12,7 +12,7 @@
logger = logging.getLogger(__name__)

mocker = None
REBOOT_CAUSE_TYPES = [REBOOT_TYPE_CPU, REBOOT_TYPE_BIOS, REBOOT_TYPE_ASIC]
REBOOT_CAUSE_TYPES = [REBOOT_TYPE_BIOS, REBOOT_TYPE_ASIC]


@pytest.mark.parametrize("reboot_cause", REBOOT_CAUSE_TYPES)
Expand All @@ -28,9 +28,7 @@ def test_reboot_cause(rand_selected_dut, mocker_factory, reboot_cause): # noqa:
mocker = mocker_factory(duthost, 'RebootCauseMocker')

with allure.step('Mock reset from {}'.format(reboot_cause)):
if reboot_cause == REBOOT_TYPE_CPU:
mocker.mock_reset_from_comex()
elif reboot_cause == REBOOT_TYPE_BIOS:
if reboot_cause == REBOOT_TYPE_BIOS:
mocker.mock_reset_reload_bios()
elif reboot_cause == REBOOT_TYPE_ASIC:
mocker.mock_reset_from_asic()
Expand Down