Skip to content
Merged
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
16 changes: 12 additions & 4 deletions tests/platform/test_reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,26 @@
reboot_ctrl_dict = {
REBOOT_TYPE_POWEROFF: {
"timeout": 300,
"cause": "Power Loss"
"cause": "Power Loss",
"test_reboot_cause_only": True
},
REBOOT_TYPE_COLD: {
"command": "reboot",
"timeout": 300,
"cause": "reboot"
"cause": "reboot",
"test_reboot_cause_only": False
},
REBOOT_TYPE_FAST: {
"command": "fast-reboot",
"timeout": 180,
"cause": "fast-reboot"
"cause": "fast-reboot",
"test_reboot_cause_only": False
},
REBOOT_TYPE_WARM: {
"command": "warm-reboot",
"timeout": 180,
"cause": "warm-reboot"
"cause": "warm-reboot",
"test_reboot_cause_only": False
}
}

Expand Down Expand Up @@ -123,6 +127,10 @@ def reboot_and_check(localhost, dut, interfaces, reboot_type=REBOOT_TYPE_COLD, r
logging.info("Check reboot cause")
check_reboot_cause(dut, reboot_cause)

if reboot_ctrl_dict[reboot_type]["test_reboot_cause_only"]:
logging.info("Further checking skipped for {} test which intends to verify reboot-cause only".format(reboot_type))
return

logging.info("Wait some time for all the transceivers to be detected")
assert wait_until(300, 20, check_interface_information, dut, interfaces), \
"Not all transceivers are detected or interfaces are up in 300 seconds"
Expand Down