130 Commits

Author SHA1 Message Date
Paul Gevers
31db506e39
tests/test_policy.py: No change breaking long lines 2019-01-19 20:14:38 +01:00
Niels Thykier
caf83b9357
Fix the remaining two style issues in britney2/__init__.py
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 17:02:10 +00:00
Niels Thykier
e0b46e5196
Make the source pkg consistency checks a TargetSuite method
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 16:47:40 +00:00
Ivo De Decker
4fcb90b775
Read Built-Using info for binary packages
Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-19 12:45:06 +00:00
Ivo De Decker
35ae8848b4
Fix apply_src_policies when policy is applied on multiple archs
Move the logic of apply_src_policy and apply_srcarch_policy into PolicyEngine.

This fixes an issue with the excuses.yaml output introduced in commit
15e5228669: only the last verdict was added to the excuse info for that
policy.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-19 12:45:05 +00:00
Niels Thykier
22610d86a0
Skip codestyle in stable
Testing this is sid is sufficient and avoids annoying cases where
pycodestyle might work differently in stable vs. sid.

Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 12:37:07 +00:00
Niels Thykier
bb85373210
Ignore pep-8 errors in britney2-tests
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 12:18:45 +00:00
Niels Thykier
dc820756cf
Accept all known issues (by file)
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 12:03:37 +00:00
Niels Thykier
c9d523da93
Remove trailing whitespace
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 12:03:34 +00:00
Niels Thykier
822a8c712c
Migrate to pycodestyle and setup a basic config file
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 12:03:33 +00:00
edawine
ed2aef3db1
Added pycodestyle checks
Changed .travis.yml to download pep8 module
Added pycodestyle conformance checks to be run by nosetests
2019-01-19 12:03:32 +00:00
Niels Thykier
f928c7ed3d Make SourcePackage.binaries a set
The recent code changes made use remove from the "binaries" field in
SourcePackages.  Lists are not particularly optimized for this kind
of removal and we have a few source packages with a lot of binary
packages (e.g. libreoffice, gcc-X-cross{,-ports}) that might trip
poor performance.

Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-14 13:19:05 +00:00
Ivo De Decker
d0b5cc2ce1 Rename apply_policy to apply_src_policy
apply_src_policy expects an excuse with a new source and binaries. It doesn't
apply to srcarch excuses, which only have new binaries for an existing source.

Signed-off-by: Ivo De Decker <ivodd@debian.org>
2019-01-01 18:28:27 +00:00
Niels Thykier
6174d2c3f9
Create a MigrationItemFactory and migrate most code to use it
This is a step towards making migration unit-testable.  This step
reduces the need for global state (in the MigrationItem class as class
fields) and with another step we can remove the global state entirely
and enable unit tests to create migration items without having to
worry about other unit tests.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-31 12:00:50 +00:00
Niels Thykier
7124313aa6
Make InstallabilityTester suite agnostic
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-16 11:00:02 +00:00
Niels Thykier
ced7b7b413
Refactor britney.py to use InstallabilityTester less
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-12-16 11:00:01 +00:00
Paul Gevers
b4370ada0b tests: add autopkgtest policy unittest 2018-11-25 11:41:23 +00:00
Niels Thykier
07a407e810
Partly separate the solver from the inst_tester
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:14 +00:00
Niels Thykier
35b06ee007
tests: Separate inst_tester from universe
This commit updates the test suite to use the BinaryPackageUniverse
instead of the InstallabilityTester where that makes sense.  The rest
of Britney has yet to be updated except where absolutely necessary (as
that will come in a later commit).

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-11-11 09:38:11 +00:00
Paul Gevers
32ea0ccb70
tests: naming of variables in test_policy:apply_policy is highly confusing 2018-11-01 15:22:02 +01:00
Niels Thykier
edfe40d69c
Fix and re-add a test
Thanks: Paul Gevers <elbrus@debian.org>
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-10-03 05:35:48 +00:00
Niels Thykier
712b618ee8
tests: Comment out test requiring "do_test" function
It does not exist in the Debian version (yet?).

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-10-01 19:48:07 +00:00
Iain Lane
c09a229dc9
autopkgtest: Run gcc-n's testuite, if it has one 2018-10-01 19:22:29 +00:00
Paul Gevers
18633e275c
autopkgtest: figure out which packages from unstable are needed
Currently autopkgtest tries to install our trigger from unstable and the rest
from testing. If that fails, than autopkgtest has a fall-back to allow all
packages from unstable to be installed. This has two severe issues:

1) the version of the test and the package it came from may be out-of-sync

2) too much from unstable may be installed, even stuff that should not/is not
allowed to migrate as it breaks stuff.

Make sure that test depends also get added to triggers if they are broken.
E.g. imagine the following scenario: trigger X changes (breaks) the output
generated by Y. Package Z has Y in the test dependencies and compares the
output in the autopkgtest. We want to have the opportunity that a new version
is automatically fixing the situation.

Two use cases are currently unsupported: needs-build (autopkgtest restriction)
and test dependencies generated by autodep8.
2018-09-05 21:37:23 +02:00
Paul Gevers
713b98ad6b
inst_tester: add is_pkg_in_testing 2018-09-05 21:27:41 +02:00
Niels Thykier
0446ead9e8 inst-builder: Replace RelationBuilder with a set_relations method
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-12 13:06:48 +00:00
Niels Thykier
ab6b2ef953 inst-builder: Refactor to bulk adding dependency clauses
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-12 12:47:11 +00:00
Niels Thykier
bc1d3afa38 inst-builder: Make add_breaks a bulk call
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-12 12:33:09 +00:00
Niels Thykier
1623828a48 SourcePackage: Add field for Build-Depends-Indep
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-08 16:18:02 +00:00
Mathieu Trudel-Lapierre
8d2cabd914 Add 'unsatisifiable dependencies' to YAML excuses
Cherry-Pick: 80bf9060de6b7a7fe21f10da90f0dcc15b96ac1c
Cherry-Pick: f32907aceab7bdf37856ceef3122149c046f0ee1
Cherry-Pick: 9ef496177f86b18d9f910da1360dd773b82f1fb7
Cherry-Pick: b16530a37df93851fda35db016775056a6b0c218
Signed-off-by: Niels Thykier <niels@thykier.net>

Flatten the defaultdict(set) for unsat_deps into a standard dict for output
2018-08-07 18:55:57 +00:00
Niels Thykier
36608194f8 test_policy: Add additional tests of AgePolicy
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-04 20:09:03 +00:00
Niels Thykier
b0f0dde8f5 test_policy: Properly add the fake source package to the Suite.sources field
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-08-04 20:09:03 +00:00
Niels Thykier
9a7394c89d britney: Rewrite should_* to be (almost) suite agnostic
The "almost" comes from the fact that there is a reference to
"pu"/"stable" which does not have an obvious fix at the moment.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
d1350606bb Use a proper Suite object for MigrationItem.suite
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
8768e2a02a Define a SuiteClass to classify suites
Into 3 categories:

 * target suite ("testing")
 * primary source suite ("unstable")
 * additional source suites ("pu" and "tpu")

This will be useful for implementing logic working with suites without
basing it on the name of the suite.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
b63ade583c Rename and turn SuiteInfo into a proper class
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
e63aa05708 Add Suites to keep track of all suites
At the moment, it is just a glorified dict.  However, we will
eventually use it to get rid of the hardcoded references to "testing"
etc. all over the code.

Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-29 09:23:12 +00:00
Niels Thykier
37f02d611c Revert "Rename autopkgtest related hints"
This reverts commit a07fa9f9070fc9c328021db5cc3e4c4f3063798e.

The new names are just as unhelpful and confusing as the old ones.
Undo for now.
2018-07-25 18:17:36 +00:00
Niels Thykier
a07fa9f907 Rename autopkgtest related hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-07-25 16:51:03 +00:00
Paul Gevers
624b185ba6
autopkgtest: enable NEUTRAL state for the case where all tests were skipped (or none available)
Closes: #901847
2018-07-21 13:21:39 +02:00
Paul Gevers
7e8ec20bc1
Put autopkgtest state files in their own namespace 2018-04-16 20:52:24 +02:00
Paul Gevers
9a28ec184b
Revert "autopkgtest: Drop retry_url from the excuses as this works different in Debian"
This reverts commit 054830d03f0a04c0306e5e71752646c2f2de2626.
2018-04-11 11:17:00 +02:00
Paul Gevers
cb716e3186
Don't excuse.force() on skiptest hint 2018-04-11 11:16:59 +02:00
Paul Gevers
6252826fad
autopkgtest: add adt_baseline = reference option
- revert most of commit adbe6d5 as checking the version in testing doesn't work
  when other packages migrate and cause regressions

- Alternative way of determining if a package is regressing, by comparison to a
  reference set. The reference set is to be created by a holy trigger that
  doesn't take packages from the base suite, but instead tests in the testing
  suite. This reference needs a retry when a package causing regression
  migrates nevertheless, e.g. due to hints or to bounty/penalty policy.
2018-04-11 11:16:59 +02:00
Niels Thykier
f752ea4ac7 Merge branch 'master' into autopkgtest 2018-03-31 05:35:06 +00:00
Niels Thykier
ac69b3b5c7 Migrate hint parser to fully use logging
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-30 17:11:10 +00:00
Niels Thykier
0c1147e4e1 test: Fix typo
Signed-off-by: Niels Thykier <niels@thykier.net>
2018-03-24 06:38:21 +00:00
Paul Gevers
054830d03f
autopkgtest: Drop retry_url from the excuses as this works different in Debian 2018-03-15 11:38:47 +01:00
Paul Gevers
d6f713b8a1
tests: Update for recent changes 2018-03-05 21:09:59 +01:00
Paul Gevers
fd03083ea5
Merge branch 'master' into autopkgtest 2017-11-28 20:19:48 +01:00