~paelzer/ubuntu-helpers:improve-check-running

Last commit made on 2022-07-14
Get this branch:
git clone -b improve-check-running https://git.launchpad.net/~paelzer/ubuntu-helpers
Only Christian Ehrhardt  can upload to this branch. If you are Christian Ehrhardt  please log in for upload directions.

Branch merges

Branch information

Name:
improve-check-running
Repository:
lp:~paelzer/ubuntu-helpers

Recent commits

6d13df8... by Christian Ehrhardt 

lp-test-ppa: tolerate no results

If no tests are running or have been completed in the past we
yield an error. That seems wrong, catch this case and just report
without an error state that we have not found running/past tests.

Signed-off-by: Christian Ehrhardt <email address hidden>

08d4655... by Bryce Harrington

lp-test-ppa: Improve overall status reporting

This fixes a bug where the overall_status was being reset for each
subtest, so really was only accurate about the final subtest's status.

A secondary bug tracking overall_status could crop up if using --subtest
to limit the display of results; this would cause overall_status to miss
failures of non-displayed subtests.

We now track the overall status in Result.status by iterating over all
subtests, separately from the subtest display.

Further, this splits (overall) status and status_icon for Result
objects, like done for Subtests. Status of Subtest and Result objects
are distinguished design-wise by using solid buttons for the former, and
colorful symbols for the latter. Both use the same symbol to indicate
error conditions, to avoid ambiguity that something's broken.

b54c104... by Bryce Harrington

lp-test-ppa: Refactor a Results.subtests() property

Introduce a Subtest class for encapsulating per-subtest status
information. Primarily, this is used to parse the status from the
subtest's result line, and to give a colorful status icon.

Previously, the unicode icon was used as the status value itself, but
this uses a textual string ('PASS', 'FAIL', et al) that will be easier
to use in code.

f1952de... by Bryce Harrington

lp-test-ppa: Refactor a Result.triggers() property

Code for parsing triggers from the test results log is refactored out to
become a new property for the Results class. The parse results are
cached so that this can be called multiple times without
reparsing/reformatting the data.

8202349... by Bryce Harrington

lp-test-ppa: Refactor a Result.log() property

Move the code to download the log file into its own property member
inside the Result class. This caches the downloaded results, so that
multiple calls don't re-download the data.

Also adds a Result.status property, which for now just stores download
errors, but will also be used for storing the overall pass/fail state
for the test.

19a4035... by Bryce Harrington

lp-test-ppa: Refactor a Result.timestamp() property

Member function to format the result's time as a str timestamp.

7b938ce... by Bryce Harrington

lp-test-ppa: Rename getLink() to ansi_hyperlink()

For clarity to emphasize this is formatting an ANSI hyperlink.

It appears the end param to this routine is not actually used in the
formatting, so drop its use.

6e22ed0... by Bryce Harrington

lp-test-ppa: Store Result objects in result_data array

result_data remains keyed by a source, arch tuple, but now contains
actual Result objects rather than a tuple of elements.

c15773e... by Christian Ehrhardt 

pkg_per_release.sh: trivial helper to get PKG counts per release/component

Signed-off-by: Christian Ehrhardt <email address hidden>

5acc16c... by Christian Ehrhardt 

chatanalysis.sh: better tolerate missing dates in logs

Signed-off-by: Christian Ehrhardt <email address hidden>