This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Base on CR033 - Firmware updates for regression testing, introduce a new optional phase firmware_update after provision phase to handle request for firmware update on the device. As in the spec, this new phase is implemented in
DefaultDevice
, so it won't need any change on existingDeviceConnector
codes.To trigger firmware_update phase, the following section needs to be provided in job.yaml. If the
firmware_update_data
section is missing from the job, this phase will not run.Variables in
firmware_update_data
:version
: The desired firmware level on the device. Currently it only supportslatest
(upgrading all components in the device with the latest firmware release). More options are planned to be implemented in the future once we gathering data for working firmware baseline on devices.ignore_failure
: When set tofalse
, Testflinger Agent will suspend the job if firmware_update phase return a status other than 0, which implies there's a failure during firmware_update phase. If set totrue
, the job will continue regardless the status of firmware_update phase.Code changes
Add firmware_update phase in job.py and agent.py.
Update schema.py to handle the phase with
firmware_update_command
.Important
For each Testflinger agent instance,
firmware_update_command
needs to be specified in testflinger-agent.conf, givingfirmware_update
as its phase name.In order to make it work as a whole, there're also PRs raised in testflinger and snappy-device-agents.
Resolved issues
N/A
Documentation
README.rst is updated for the new phase.
Tests
It's tested by building a dev testflinger server with docker along with modified testflinger-agent and snappy-device-agents.
firmware_update_data
section and assign to Testflinger Agents