shutdown¶
Source code: shutdown.py
Shutdown/Reboot the device.
Description¶
This test halts or reboots the device. This test provides three types of shutdown: reboot, full reboot, and direct EC reboot. A reboot is leveraging the external binary ‘shutdown’ for rebooting, a full reboot halts the device, then trigger a ec reboot, and a direct EC reboot triggers a hard reset directly.
A direct EC reboot is suggested if in developmental phase, a firmware update is triggered when system is powered on, which might cause a normal reboot fail.
Test Procedure¶
If argument check_gpt is set to True (default), it checks if partitions are good for the next boot. Then, it reboots / halts the device according to the argument operation.
Dependency¶
If DUT is a remote device, and argument check_gpt is set to True( default), it depends on the external binary ‘cgpt’ or ‘partx’ to read GPT info.
Depends on the external binary ‘shutdown’ to perform the operation.
Depends on the external binary ‘ectool’ to perform a full reboot and a direct EC reboot.
Examples¶
To reboot the device after a 5-second delay, add this in test list:
{
"pytest_name": "shutdown",
"args": {
"operation": "reboot"
}
}
This also checks the GPT info to ensure partitions look good for the next boot.
To shutdown the device with a maximum 60-second waiting:
{
"pytest_name": "shutdown",
"args": {
"operation": "halt"
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
operation |
[‘direct_ec_reboot’, ‘full_reboot’, ‘halt’, ‘reboot’] |
The command to run to perform the shutdown (‘reboot’, ‘full_reboot’, ‘halt’, or ‘direct_ec_reboot’). |
delay_secs |
int |
(optional; default: |
max_reboot_time_secs |
int |
(optional; default: |
wait_shutdown_secs |
int |
(optional; default: |
check_tag_file |
bool |
(optional; default: |
check_audio_devices |
int, None |
(optional; default: |
check_gpt |
bool |
(optional; default: |
warmup_post_shutdown |
int |
(optional; default: |