13 Commits

Author SHA1 Message Date
Aleksa Svitlica
b0a569d303 feat(cloud): Add reporting
Add optional reporting of cloud tests. Cloud reporting includes the
package name, version, series and whether the test result was
pass/fail/error.

Cloud reporting requested by partners to be able to determine the amount
of packages tested.
2023-03-24 08:56:22 -04:00
Aleksa Svitlica
22f865d7ae feat(cloud): Add verdict info for passed tests
Additional verdict info is being provided by the CloudPolicy to improve
clarity on the state of cloud tests. When tests pass this will be marked
in the verdict. Also when a package is skipped because it is not in the
cloud package set this will be made clear in the verdict.
2023-03-23 16:06:44 -04:00
Łukasz 'sil2100' Zemczak
19515cea13 Some additional debugging, additional compatibility changes. 2023-02-16 17:30:44 +01:00
Aleksa Svitlica
9246a3d583 fix(cloud): Replace PurePath with os.path.join
In Python 3.5 open does not work correctly with PurePath. Switching to
os.path.join to resolve this.
2023-02-15 12:41:14 -05:00
Aleksa Svitlica
bea7377396 feat(cloud): Handle cloud testing errors
Cloud test framework can run into errors (like SSH connection drops)
which cause it to error out and not report test results. To handle these
kinds of errors the policy now checks the return code and stores
std_err.

Also updates the test already run check to not count states of zero
failures and non-zero errors; since this means the test framework
encountered an error external to the tests.
2023-02-14 22:44:24 -05:00
Łukasz 'sil2100' Zemczak
85c6716af6 Set the verdict correctly too. 2023-02-14 14:49:46 +01:00
Łukasz 'sil2100' Zemczak
340b41afe1 Save state file in-between runs to mark which packages have already been tested on the given clouds. 2023-02-14 14:22:43 +01:00
Łukasz 'sil2100' Zemczak
b2b1da42fa The autopkgtest policy basically turns adt_ppas into a list, so let's handle the case where the autopkgtest policy runs first. 2023-02-13 14:40:38 +01:00
Aleksa Svitlica
f21d94d3b2 CloudPolicy: Support public PPAs with fingerprints
Updates the _parse_ppas function to also allow public PPAs with
fingerprints to be provided (team/name:fingerprint).
2023-02-10 13:21:01 -05:00
Aleksa Svitlica
2bd1584c84 CloudPolicy: Refactor to use adt_ppas
Cloud policy now uses the ADT_PPAS field as the source but will only
take private PPAS due to requiring a fingerprint. If ADT_PPAS is empty
then the 'proposed' archive is used.

Adds logic to try and retrieve the install source of a package from the
logs. This is useful if multiple PPAs are defined since the policy won't
explicitly know when contains the package under test.
2023-02-01 21:23:59 -05:00
Aleksa Svitlica
1c6f56ab79 Cloud Policy: Remove xunitparser dependency
To avoid an external dependency the required xunit parsing has been
implemented directly in the policy.
2023-01-23 20:17:01 -05:00
Aleksa Svitlica
c6e4e18a23 CloudPolicy: Move hardcoded values to config
Changes made
- Multiple hardcoded fields moved to config
- Series is now retrieved from options
- Pocket is now called source and retrieved from config
- Adds source type config which can be either archive or ppa
- Returns REJECTED_PERMANENTLY policy verdict when test failures or
  errors occur. Adds verdict info the the excuse.
2023-01-23 17:02:12 -05:00
Aleksa Svitlica
436626145b Add Cloud Policy
The cloud policy is currently used to test whether the proposed
migration will break networking for an image in the Azure cloud. Cloud
testing will likely increase in scope in the future.
2023-01-08 10:48:53 -05:00