543 Commits

Author SHA1 Message Date
Martin Pitt
cacd7d7667 Autopkgtest: Show force-badtest results more prominently
Add new state "IGNORE-FAIL" for regressions which have a 'force' or
'force-badtest' hint. In the HTML, show them as yellow "Ignored failure"
(without a retry link) instead of "Regression", and drop the separate
"Should wait for ..." reason, as that is hard to read for packages with a long
list of tests.

This also makes retry-autopkgtest-regressions more useful as this will now only
run the "real" regressions.
2016-02-25 09:45:33 +01:00
Iain Lane
ca4ed75019 Merge change from Niels Thykier to fix --hint-tester 2016-02-23 09:29:09 +00:00
Martin Pitt
c9f7ef6fce Adjust URL for retrying failed tests
retry.cgi is now request.cgi.
2016-02-16 10:18:43 +01:00
Martin Pitt
b20421efc3 Add retry links to PPA excuses
autopkgtest-retrier supports "ppa=" GET arguments now.
2016-02-04 21:54:53 +01:00
Martin Pitt
158d79999f Fix KeyError crash with NBS binaries in testing
Traceback (most recent call last):
   File "/var/lib/britney/britney.py", line 3390, in <module>
     Britney().main()
   File "/var/lib/britney/britney.py", line 295, in __init__
     self.merge_binaries('testing', 'unstable', arch)
   File "/var/lib/britney/britney.py", line 785, in merge_binaries
     target_version = target_sources[value[SOURCE]][VERSION]
 KeyError: 'insighttoolkit4'
2016-01-27 09:57:55 +01:00
Martin Pitt
6269ca4813 Drop boottest support
This was a giant copy&paste, was disabled four months ago, and the
infrastructure for this ceased to exist.

If this comes back, the AutoPackageTest class should be generalized to also
issue phone boot tests (exposed as new architectures, which should then be
called "platforms"), to avoid all this duplicated code.
2016-01-27 09:34:22 +01:00
Martin Pitt
ec420195bc Add retry links to autopkgtest regressions
Generate https://autopkgtest.ubuntu.com/retry.cgi links for re-running tests
that regressed.

Change Excuse.html() back to usual % string formatting to be consistent with
the rest of the code.
2016-01-25 11:21:16 +01:00
Robert Bruce Park
e2425bb6fb Make Heidi optional. 2016-01-19 17:33:01 -08:00
Robert Bruce Park
fbb4293091 Stop setting artifacts link if log is running.shtml. 2016-01-19 12:05:32 -08:00
Robert Bruce Park
7478b80b85 Iterate. 2016-01-19 11:34:12 -08:00
Robert Bruce Park
b2ed1ce367 Fix URL. 2016-01-19 11:25:04 -08:00
Robert Bruce Park
e412932daf Set artifacts link if ADT_PPAS is defined. 2016-01-19 11:08:11 -08:00
Martin Pitt
2b61398004 Skip second-stage upgrade testing if UPGRADE_OUTPUT option is absent or empty
This is useful to speed up britney in dry run mode, if we are only interested
in builds and package tests.
2015-12-18 16:37:23 +01:00
Martin Pitt
a4f3abacad Add direct log link to excuses
If we have a result, directly link to the log file on swift in excuses.html.
The architecture name still leads to the package history as before.
If result is still pending, link to the "running tests" page instead.
2015-12-14 16:57:19 +01:00
Martin Pitt
19883522b3 Fix crash from previous hint reorganization
Traceback (most recent call last):
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3380, in <module>
    Britney().main()
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3329, in main
    self.write_excuses()
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 1992, in write_excuses
    upgrade_me.remove(e.name)
ValueError: list.remove(x): x not in list
2015-12-04 18:17:27 +01:00
Martin Pitt
855387b013 Provide default if ADT_PPAS option is absent 2015-12-04 17:51:06 +01:00
Martin Pitt
fc4ea9d159 Process force-skiptest hint before requesting tests
If a package has a force-skiptest hint, don't request autopkgtests for it.
2015-12-04 17:45:06 +01:00
Martin Pitt
ea1c335992 Autopkgtest: Simplify test request and result retrieval workflow
Splitting up the processes of request(), submit(), and collect() makes our data
structures, house keeping, and code unnecessarily complicated. Drop the latter
two and now do all of it in just request(). This avoids having to have a
separate requested_test map, having to fetch test results twice, and gets rid
of some state keeping.
2015-12-01 23:57:52 +01:00
Martin Pitt
400f4087bb Add ADT_PPAS option for adding PPAs to autopkgtest requests
For using britney on PPAs we need to add the "ppas" test parameter to AMQP
autopkgtest requests. Add ADT_PPAS britney.conf option which gets passed
through to test requests.
2015-11-30 10:17:04 +01:00
Martin Pitt
a6c02fa2e7 Restrict ADT_ARCHES to architectures we actually run for
This makes it simpler to run britney against a PPA with
--architectures='i386 amd64'.
2015-11-17 09:20:47 +01:00
Martin Pitt
6e8ddbb7c4 Split self.options.adt_arches once during initialization
For consistency with all other self.options.*_arches.
2015-11-17 09:15:31 +01:00
Martin Pitt
1ab16725df Make linux* wait on corresponding -meta package
We want to treat linux-$flavor and linux-meta-$flavor as one set in britney
which goes in together or not at all. We never want to promote linux-$flavor
without the accompanying linux-meta-$flavor.

Introduce a synthetic linux* → linux-meta* dependency to enforce this grouping.
2015-10-08 08:26:59 +02:00
Martin Pitt
9b70fe361d Autopkgtest: Collect results for requested tests before submitting
When we need to blow away and rebuild results.cache we want to avoid
re-triggering all tests. Thus collect already existing results for requested
tests before submitting new requests.

This is rather hackish now, as fetch_one_result() now has to deal with both 
self.requested_tests and self.pending_tests. The code should be refactored to
eliminate one of these maps.
2015-09-18 06:47:28 +02:00
Martin Pitt
358920c395 Add missing force-{bad,skip}test data to excuses (for the YAML) 2015-08-25 13:34:41 +02:00
Martin Pitt
71b07bc66a Add structured test results to Excuse objects
Add Excuse.addtest() for adding a test type/package/arch/result, so that the
excuses YAML will get structured test results instead of pre-formatted HTML.
Move the HTML rendering into Excuse.html() instead.

This supports a "test type" whose only value is "autopkgtest" right now, but
we will have "bootest", perhaps "piuparts" and other tests in the future.

Drop the "(<ver> is unbuilt/uninstallable)" note from excuses.html as this is
really a per-architecture property, not a per-tested-source one. This needs to
be re-thought and generalized.
2015-08-25 12:21:51 +02:00
Martin Pitt
c5f6ad6452 python-apt/precise workaround: Don't prematurely close TagFile fd
Don't close underlying fd right after opening an apt_pkg.TagFile, as that will
prematurely end the iteration. This seems to work with more recent python3-apt,
but not with Ubuntu 12.04 LTS.
2015-08-24 20:46:52 +02:00
Martin Pitt
32f33baf09 Merge with trunk, port to Python 3 2015-08-24 20:46:42 +02:00
Martin Pitt
a4488a1502 Add missing AUTOPKGTEST field for fake source 2015-08-18 23:36:24 +02:00
Martin Pitt
c9173b3ca3 Promote packages with unbuilt reverse dependencies if testing version succeeds
Commit 463 ("Don't promote packages with unbuilt reverse dependencies") turned
out to be too strict: This holds up too many innocent packages in -proposed.

If unstable has an unbuilt/uninstallable reverse dependency D of a package P,
trigger a test anyway (which will then most likely run against the testing
version of D). If that succeeds, the unstable P did not break D and can be
accepted. If it fails, D needs to be fixed.

Ideally we would set up some clever apt pinning to force installation of
testing-D, to avoid running into the uninstallability of unstable-D, but this
is tricky and error prone.

Drop the temporary "UNINST" state from commit 466 again. Instead, excuses.html
will now show a test against the testing version of D together with a note that
the unstable version is unbuilt/uninstallable.

This should ideally clear up all cases where a requested result is neither
present or pending. Log an error if that still happens (will be checked in the
next couple of runs), and ensure in the tests that we don't trigger any
outstanding "FIXME" log messages.
2015-08-13 08:31:55 +02:00
Cyril Brulebois
85070f38d8 excuses: New try for block-udeb → d-i RM.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-08-11 22:26:57 +00:00
Cyril Brulebois
753087510b Revert "excuses: Point to the d-i release manager when block-udeb is involved."
This reverts commit 6adee798cd0bec3b64c8a6315667d68ab3c16bd9.

Patching the wrong location considered unhelpful.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-08-11 22:25:23 +00:00
Cyril Brulebois
025d0dd3cf excuses: Point to the d-i release manager when block-udeb is involved.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-08-11 21:38:36 +00:00
Martin Pitt
31e647f113 Switch autopkgtest evaluation to cloud results
Change AutoPackageTest.results() to evaluate the Swift results instead of the
adt-britney ones.

TODO:
 - Add more tests (like for adt-britney)
 - Drop triggering of adt-britney tests
 - Drop adt-britney tests (which fail now)
 - Adjust TestBoottestEnd2End.test_with_adt
2015-07-31 09:41:51 +02:00
Martin Pitt
52ae2eca09 Show regression vs. always-failed in cloud results 2015-07-30 14:08:46 +02:00
Martin Pitt
2bf6eb5652 Switch autopkgtest evaluation to cloud results
Change AutoPackageTest.results() to evaluate the Swift results instead of the
adt-britney ones.

TODO:
 - Add more tests (like for adt-britney)
 - Drop triggering of adt-britney tests
 - Drop adt-britney tests (which fail now)
2015-07-28 11:04:34 +02:00
Martin Pitt
3e7c808e1c Consider manually re-ran failed tests
When collecting results, not only check pending tests, but also new results for
failed tests. This picks up new test results from manual retries which might
now have succeeded.
2015-07-15 08:22:37 +02:00
Martin Pitt
ce775eeb5d Add test results from swift
Until now, autopkgtest results were triggered via an external "adt-britney"
command from lp:auto-package-testing. This required a lot of state files and
duplicated effort, uses hardcoded absolute paths to these external tools, and
is quite hard to understand and maintain. We also want to move away from
Jenkins and rsyncing state files.

Directly retrieve autopkgtest results from a publicly readable and browsable
Swift container, with a debci-compatible layout
(https://wiki.debian.org/debci/DistributedSpec). This now tracks both requests
and results on a per-architecture granularity, so that we can track
per-architecture regressions/always-failed.

Introduce a new ADT_SWIFT_URL config option that sets the swift base URL. If
this key is not set, the behaviour does not change compared to previous
versions, and no results will be retrieved from the cloud.

This still keeps the old adt-britney requests/results as the authoritative
data and for now merely shows the swift results in addition. With that we can
compare the results and run the cloud testing in parallel to find/fix problems
until we switch over. Due to that, the code to britney.py is temporary, does
*not* use AutoPackageTest.results(), and instead just reads the internal
results map.
2015-07-10 06:21:46 +02:00
Martin Pitt
add46d2904 Store autopkgtest flag in sources
Extend read_sources to store a new AUTOPKGTEST boolean flag, which is true if
the Testsuite: field exists and starts with "autopkgtest" (this covers autodep8
cases like autopkgtest-pkg-perl).

Extend TestData.add() to take a new testsuite argument which specifies the
source's Testsuite: field.
2015-07-01 15:49:06 +02:00
Niels Thykier
8f27919cf8 Create a clone_nuninst function for iter_packages{,_hint}
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
4d218df7d0 iter_pkg: Refactor nuninst cloning
Move nuninst cloning out of the check loop and always populate the new
nuninst entirely.

This will allow some simplifications in other places.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
ffcfa8e27e britney.py: Avoid some O(n) look-ups in the auto-hinter
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
cc58511c09 Avoid O(n^2) duplication handling when building hints
Use a set to filter out seen items to avoid doing O(n^2)
de-duplication.  For very large hints, this can take considerable
time.

Using "seen_items" to build the actual hints on the (unverified)
assumption that Python can do something "smart" to turn a set into a
frozenset faster than it can with a list.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
754688851a britney: Optimise original auto-hinter duplication handling
Britney is now smart enough to produce the same result from hints
regardless of the order of the items in the hint.  With this in mind,
we can have the original auto-hinter produce hints as sets and filter
out duplicates as we produce them.

Note that the hints are sorted to produce deterministic output (to
make it easier to compare the hints between runs and changes).

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
e45b219276 britney.py: Pre-split self.options.*_arches
We always use them as lists, so we might as well just split them once
and be done with it.
2015-06-02 21:33:52 +02:00
Niels Thykier
e4c7c4f2a2 britney.py: Minor optimisation to sort_actions
Avoid some cases of O(n^2) behaviour in sort_actions and reduce the
size of n for the remaining O(n^2)-ish behaviour by filtering out
removals early on.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:52 +02:00
Niels Thykier
d7baa1d7f0 britney.py: Remove redundant arg to format
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:51 +02:00
Niels Thykier
bdcf4e826b Be verbose when rejecting a hint due to invalid candidates
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:33:51 +02:00
Niels Thykier
35e5742d85 Remove "leading" from hints - it provides no new information 2015-06-02 21:33:51 +02:00
Niels Thykier
375b468512 Remove unused local variable
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-06-02 21:29:47 +02:00
Adam D. Barratt
1d98bf293d britney.py: reverse sense of tests for architecture-indep packages
It's more natural to say "check this package if the current arch is in
this list" than "do not check this package if the current arch is not
in this list"

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2015-04-27 19:43:54 +00:00