12 Commits

Author SHA1 Message Date
Niels Thykier
3de7816fd2
tests: Fix test broken by refactoring
Signed-off-by: Niels Thykier <niels@thykier.net>
2019-01-19 22:22:42 +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
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
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
713b98ad6b
inst_tester: add is_pkg_in_testing 2018-09-05 21:27:41 +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
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