Add new module autopkgtest.py with the logic for determining the tests for a
source package, requesting tests via AMQP, fetching results from swift, and
keeping track of pending tests between run. This also caches the downloaded
results from swift, as re-dowloading them all is very expensive.
Integrate this into britney.py:
* In should_upgrade_src(), check whether a package is built everywhere and
installable (run_autopkgtest), and good enough to run autopkgtests for it
and its reverse dependencies.
* In write_excuses(), generate test requests for all excuses and create blocks
for those that cause test regresssions.
This introduces two new hints:
* force-badtest pkg/ver: Failing results for that package will be ignored.
This is useful to deal with broken tests that get imported from Debian or
are from under-maintained packages, or broke due to some infrastructure
changes. These are long-lived usually.
* force-skiptest pkg/ver: Test results *triggered by* that package (i. e.
reverse dependencies) will be ignored. This is mostly useful for landing
packages that trigger a huge amount of tests (glibc, perl) where some tests
are just too flaky to get them all passing, and one just wants to land it
after the remaining failures have been checked. This should be used rarely
and the hints should be removed immediately again.
Add integration tests that call britney in various scenarios on constructed
fake archives, with mocked AMQP and Swift results.
This includes refining "HINTS_ALL" to cover all hints added at
runtime.
Currently, it is not very useful. However, a later commit will allow
policies to use this feature.
Signed-off-by: Niels Thykier <niels@thykier.net>
"easy foo/1 bar/2" and "easy bar/2 foo/1" are simply different ways of
writing the same hint, so the corresponding Hint objects should compare
as equal.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
So far we only check that hints which should have version information
do (and those which should not do not).
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This will work for "single package" hints, but should be extended to
consider "easy foo/1 bar/1" and "easy bar/1 foo/1" to be equivalent.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
Each property returns the value of the corresponding property for the first
entry in the package list; this is a handy short-cut for hints where there
will only ever be one package in the list (e.g. "age-days", "unblock").
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
string.split()'s second argument specifies the maximum number of times
the string should be split, not the maximum number of elements in the
result.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
These classes encapsulate information about individual hints, with
HintCollection providing a convenient wrapper around a set of hints.
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>