523 Commits

Author SHA1 Message Date
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
Adam D. Barratt
18885d3f3b britney.py: typo fixes
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2015-04-27 19:14:08 +00:00
Adam D. Barratt
d8fa67cee8 britney.py: drop inaccurate comment
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
2015-04-27 18:50:48 +00:00
Anthony Towns
efe5c82f22 britney: Take more care with hijacked binaries
This updates the doop_source and _compute_groups functions so
that binary packages that are built from a different source
aren't included as part of an update to the original source.
In the event that it's a binary-only update, also don't remove
the hijacked packages from testing.

This change also removes an obsolete comment regardarding pre-conditions
for the _compute_groups function.
2015-04-26 18:20:11 +02:00
Niels Thykier
98070388e7 britney.py: Enable the new consistency checks by default
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
ed91345c06 britney.py: Skip ESSENTIAL consistency check
The live-data tests rely on an inconsistency, since they were before
Britney started to record the Essential field.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Anthony Towns
06df61849e britney: Check for mismatched packages between suites.
britney assumes that a package build is uniquely described by its
name, version and architecture. Particularly when constructing
Packages files by hand for testing purposes this assumption can be
violated, leading to confusing behaviour. This change makes britney
look for such mismatches, and report if any are found.
2015-04-26 18:20:11 +02:00
Niels Thykier
082139f4e3 Collect more statistics from the installability tester
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
222f7114fc Compute simple stats installability tester graph
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
bd5b3ac4ec Remove unused assignments/parameters
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:11 +02:00
Niels Thykier
a5aad84699 britney.py: Remove trailing semi-colons
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Niels Thykier
3230d1dc75 britney.py: Fix use before assignment
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Niels Thykier
a13386ae34 britney.py: Avoid some redundancy in auto_hinter()
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Niels Thykier
11e84d01a3 britney: Optimise the original auto-hinter a bit
Notably:
 * Avoid repeated calls frozenset(X), where we can trivially do
   without.
 * Skip the inner loop, when "i" is in "to_skip".
 * Use a set rather than a list for "to_skip" as we do more
   membership tests.

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Niels Thykier
3710980b10 get_dependency_solvers: Avoid unnecessary boolean ret value
The get_dependency_solvers method returns a (boolean, list)-tuple, but
the boolean can always be implied from the list (in boolean context).

Signed-off-by: Niels Thykier <niels@thykier.net>
2015-04-26 18:20:10 +02:00
Julien Cristau
d127ac65ae Fix silly NameError
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
62c1c9ec3c Add explicit encoding to all files
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
f64f7072c0 Sources and Packages are utf-8
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
7b0138ecb7 Don't crash if the urgencies file contains non-ascii
The live-2011-12-13 test set has random garbage in the middle.

Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
c42fbcc5d3 Remove dependency on six
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00
Julien Cristau
8044667ed6 Use python3
Signed-off-by: Julien Cristau <jcristau@debian.org>
2015-04-26 18:20:10 +02:00