130 Commits

Author SHA1 Message Date
Niels Thykier
b5319e33fa tests: Explicitly define encoding for excuses
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-28 18:53:49 +00:00
Niels Thykier
ee27d7a67c Add BuildDependsPolicy to check Build-Depends(-Arch) availability
Add a new "BuildDependsPolicy" that will check the satisfiability of
the build-dependencies listed in the Build-Depends and
Build-Depends-Arch fields.  This enables gating of packages based on
missing / broken build-dependencies.

There are some limitations:

 * Build-Depends-Indep is ignored for now.  Missing or broken packages
   listed in Build-Depends-Indep will be continue to be silently
   ignored.

 * Being a policy check, it does not enforce "self-containedness" as
   a package can still migrate before a build-dependency.  However,
   this can only happen if the build-dependency is ready to migrate
   itself.  If the build-dependency is not ready (e.g. new RC bugs),
   then packages build-depending on it cannot migrate either (unless
   the version in testing satisfies there requirements).

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-11-11 15:49:48 +00:00
Paul Gevers
597eac6130
Adapt test_autopkgtest.py so nosetests3 picks it up correctly 2017-10-25 20:14:05 +02:00
Paul Gevers
a16e4e5a55
Enable autopkgtesting on built arches when not all have been built yet
- autopkgtest now honors break_arches option
- incomplete testing is now treated with penalty behavior
2017-10-24 20:46:21 +02:00
Paul Gevers
d975b2fc39
Make the huge queue in autopkgtest optional 2017-10-19 21:50:56 +02:00
Paul Gevers
f2f20eb460
Limit accumulated bounties to configurable minum age 2017-10-19 21:50:55 +02:00
Paul Gevers
77ea1cc8d5
Enable no-penalties urgencies; to exempt urgency >= high from penalties 2017-10-19 21:50:43 +02:00
Paul Gevers
287a9d328c
os.path.join(options.unstable, 'autopkgtest') isn't writable in the Debian setup and we have options.state_dir already 2017-10-18 19:54:57 +02:00
Paul Gevers
eb60fc557e
Implement bounty/penalty system for autopkgtest 2017-10-15 21:42:51 +02:00
Paul Gevers
acec564443
Make autopkgtest web site URL an option 2017-10-14 20:15:47 +02:00
Paul Gevers
e5756dec9e
Fix existing tests for autopkgtest extention of SourcePackage class 2017-09-26 19:45:23 +02:00
Paul Gevers
648feb71d3
Implement swift free usage of autopkgtest 2017-09-25 21:25:10 +02:00
Paul Gevers
278b3dcdd0
autopkgtest: switch from testing=series to testing=testing 2017-09-08 11:08:22 +02:00
Paul Gevers
5ae8ccbcc6
Get the autopkgtest test suite to run with Debian's britney
* test_autopkgtest: use --no-compute-migrations instead of removing UPGRADE_OUTPUT
* comment out some tests that I can't get to work in Debian, while all but three work if
  run inside Ubuntu's britney
2017-09-08 11:07:04 +02:00
Paul Gevers
2bce9e334e
Initial commit for autokpgtest
* copy of Ubuntu's version at 593acb2753ce167ed4d2dec0091702315e89e705
* merge tests/__init__.py with Ubuntu's (that only contained autopkgtest)
2017-09-08 10:25:16 +02:00
Niels Thykier
6e022eed54 test: Add test for a bug I was about to introduce
When I rewrote the compute_scc function into an iterative variant, I
almost included a bug that could make it come up with components that
were not strongly-connected.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-29 08:05:52 +00:00
Niels Thykier
bd375fdd85 solver: Make _compute_scc iterative
Rewrite _compute_scc to be iterative to avoid call recursion limit for
graphs with long dependency chains.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-29 07:40:15 +00:00
Niels Thykier
64653087d0 solver: Fix bug where some items were not emitted
Sometimes the solver would correctly compute which items are grouped
together, but then fail to emit some groups.  This is trivially
fixable by forcing an update of "before" + "after" relations.
Admittedly, this looks unnecessary, so it may just be hiding the bug.

Nonetheless, the change makes the new test_solver_simple_scc test
produce the expected result.

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-07-28 21:36:01 +00:00
Niels Thykier
b34ac3bdd9 Add a verdict field to all policies with the actual verdict
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
552e82c3dc tests/test_policy.py: refactor test cases
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-13 19:37:53 +00:00
Niels Thykier
42be17ad26 inst-tester: Correctly handle unresolved essential choices
Britney has a special case for essential packages to ensure that any
package that with essential packages are not installable.  This check
did not account for a case, where a package is not co-installable with
two or more pseudo-essential package part of the same OR dependency.
A contrived example based on real world data:

  Package: foo
  # Conflict with all providers of "awk"
  Conflicts: mawk | gawk | original-awk

This alone is actually not sufficient to trigger the bug, as
_get_min_pseudo_ess_set is in theory some times smart enough to pick
an "obvious" solution between the pseudo-essential option.
  When it does, one of the above ends up in the (de-facto) essential set
and then the installability tester correctly rejects "foo".

Though, even with the fix above, the handling for this is probably not
correct if the essential set is not (fully co-)installable.  However,
that basically only happens if we are bootstrapping an architecture
(or testing is royally broken, in which case this is the least of our
worries).

Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-11 11:08:52 +00:00
Niels Thykier
337d548edb tests: add some unit tests of installability tester
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-11 11:07:07 +00:00
Niels Thykier
3c33818499 tests: add test case for parsing aliased hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-29 12:56:50 +00:00
Niels Thykier
ee12b76885 tests: Add test for some invalid hints
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-29 12:56:50 +00:00
Niels Thykier
1fcccea83f tests: Extract some common test utils to tests/__init__.py
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-01-29 12:14:49 +00:00
Niels Thykier
bcdb2b39cd Add PiupartsPolicy to avoid piuparts regressions
Closes: Debian/britney2#16
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-26 17:11:40 +00:00
Niels Thykier
d3e343a3bd AgePolicy: Fix bug in creating the age file
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
fc2269ba02 rc-bugs policy: Ignored bugs are not unique to testing
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:06 +00:00
Niels Thykier
d7f6a00a51 Add another policy test for ignore-rc-bugs
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:05 +00:00
Niels Thykier
96b7e606cf Add simple RC bugs unit test
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-11-22 20:21:01 +00:00