3 Commits

Author SHA1 Message Date
Martin Pitt
eac1bf30a9 Re-fix merging of source packages
We need complete copies of the SourcePackage objects, as we might later find
some binaries which are only in unstable.

Traceback (most recent call last):
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3290, in <module>
    Britney().main()
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3261, in main
    self.write_excuses()
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 1963, in write_excuses
    if should_upgrade_srcarch(pkg, arch, 'unstable'):
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 1534, in should_upgrade_srcarch
    False)
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 2294, in _compute_groups
    if binaries_t[parch][0][binary].source != source_name:
KeyError: 'kicad'
2016-10-12 16:33:47 +02:00
Martin Pitt
943621deb2 Add autopkgtest integration
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.
2016-10-11 11:00:53 +02:00
Dimitri John Ledkov
420e83b2ca Teach excuse_unsat_deps() about components ogre model 2016-10-11 10:56:51 +02:00