-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail snap refresh/revert jobs if the
snap_update_test.py
script fai…
…ls (bugfix) (#1616) * Fail snap refresh/revert jobs if the snap_update_test.py script fails Adding `set -eo pipefail` in the snapd refresh/revert jobs that initiate a reboot ensures that: - any failure in the `snap_update_test.py` is not masked by the pipe command (this is achieved by `set -o pipefail`) - any failure at any step of the `command:` field just fails the whole job (this is ensured by `set -e`). This is important to avoid the `reboot` command from being issued if something goes wrong in the script. Fix #1615 * Increase default timeout of the `snap_update_test.py` script Some devices in our test lab are really slow to download and apply snap updates. Increase timeout from 5 minutes to 10 minutes to hopefully help with this. * Revert the use of `set -e` * Indicate a failed job if an exception is caught when running snapd command When running a snapd revert or refresh command, a SnapdRequestError exception might be raised (for example when the refresh command failed to run within the given time). If this is the case, the script fails, and if it is executed as part of a Checkbox run, a `__result` file is generated and stored in the shared session directory to record the fact that this job failed. When the session is resumed, Checkbox will automatically resume the session and mark this test as failed. * Update unit tests for snap_update_test * Also fail job in case of an AsynException This exception can also be raised when calling snap commands using checkbox_support.snap_utils.snapd.Snapd. * Update providers/base/bin/snap_update_test.py Co-authored-by: Massimiliano <[email protected]> * black is not happy * Fix flake8 --------- Co-authored-by: Massimiliano <[email protected]>
- Loading branch information
Showing
3 changed files
with
72 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters