The original commit had an unreliable policy info (the peer PPA group), as
correct updating of friends' excuses depends on the processing order.
- Also add the currently investigated package to the policy info.
- Add a HTML excuse too, so that excuses.html actually shows the reason for
blocking.
- Don't invalidate other excuses multiple times.
- Change the policy_info to always carry the friend information with it, as
that's useful to know for accepted packages too. Adjust test_approve_ppa()
accordingly.
- Verify "reason" field in test_sourceppa_policy()
- Add another integration test to ensure that this also applies to unbuilt
packages, not just to rejection from other Policies.
- Avoid FileNotFoundError, this does not yet exist in Python 3.2.
Add new autopkgtest policy: it determines the autopkgtests for a
source package (its own, direct reverse binary dependencies, and
Testsuite-Triggers), requests tests via AMQP, fetches results from swift, and
keeps track of pending tests between run. This also caches the downloaded
results from swift, as re-dowloading them all is very expensive.
This introduces two new hints:
* force-badtest pkg/ver[/arch]: 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.
We don't use os.makedirs(dir, exist_ok=True) as that is too strict: it fails if
the directory already exists with different permissions (e. g. with 775). Thus
introduce a helper function ensuredir().
It is unwieldy to have one half of output data generation in the policy but not
the other half of updating the excuse. Now that apply_policy() gets the excuse
object as argument we can move everything there.
This allows tests to check whether there are any missing builds or old
binaries, so that expensive actions such as "trigger an autopkgtest" are not
done too early/in vain.
Refactor the handling of the policy info code, so every policy does
not have to implement the same boilerplate code.
Signed-off-by: Niels Thykier <niels@thykier.net>