update_firmware¶
Source code: update_firmware.py
Runs chromeos-firmwareupdate to force update Main(AP)/EC/PD firmwares.
Description¶
This test runs firmware updater from local storage or downloaded from remote factory server to update Main(AP)/EC/PD firmware contents.
Test Procedure¶
This is an automatic test that doesn’t need any user interaction.
If argument
download_from_server
is set to True, this test will try to download firmware updater from factory server and ignore argumentfirmware_updater
. If firmware update is not available, this test will just pass and exit. If argumentdownload_from_server
is set to False and the path indicated by argumentfirmware_updater
doesn’t exist, this test will abort.This test will fail if there is another firmware updater running in the same time. Else, start running firmware updater.
If firmware updater finished successfully, this test will pass. Otherwise, fail.
Dependency¶
If argument
download_from_server
is set to True, firmware updater needs to be available on factory server. Ifdownload_from_server
is set to False, firmware updater must be prepared in the path that argumentfirmware_updater
indicated.
Examples¶
To update all firmwares using local firmware updater, which is located in ‘/usr/local/factory/board/chromeos-firmwareupdate’:
{
"pytest_name": "update_firmware"
}
To update only RW Main(AP) firmware using remote firmware updater:
{
"pytest_name": "update_firmware",
"args": {
"download_from_server": true,
"rw_only": true,
"host_only": true
}
}
Not to update firmware if the version is the same with current one in the DUT:
{
"pytest_name": "update_firmware",
"args": {
"force_update": false
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
firmware_updater |
str |
(optional; default: |
rw_only |
bool |
(optional; default: |
host_only |
bool |
(optional; default: |
download_from_server |
bool |
(optional; default: |
from_release |
bool |
(optional; default: |
force_update |
bool |
(optional; default: |
unlock_csme |
bool |
(optional; default: |