diff options
| author | Julian Andres Klode <julian.klode@canonical.com> | 2025-02-18 13:06:32 +0100 |
|---|---|---|
| committer | Julian Andres Klode <julian.klode@canonical.com> | 2025-03-09 13:33:53 +0100 |
| commit | 935a9ab334e55a29363f45e7de6338c47337e806 (patch) | |
| tree | 5d09a954938d3ed0be5e50dc96460d9b64030232 /test/integration/test-solver3-evaluation | |
| parent | 1ab3740704f8cf478d01ef95f4ef8152b79d7b87 (diff) | |
Evaluate and fall back to the 3.0 solver
Always run the 3.0 solver after the internal solver. If the internal
solver failed, and the 3.0 solver did not, use the 3.0 result.
If 3.0 solver failed or produced a worse result than the internal
solver, write an apport crash dump.
We exclude situations which we now the solver can't handle, i.e.
removals are forbidden and you requested removals, and stuff like
that.
Diffstat (limited to 'test/integration/test-solver3-evaluation')
| -rwxr-xr-x | test/integration/test-solver3-evaluation | 220 |
1 files changed, 220 insertions, 0 deletions
diff --git a/test/integration/test-solver3-evaluation b/test/integration/test-solver3-evaluation new file mode 100755 index 000000000..d3521e9c6 --- /dev/null +++ b/test/integration/test-solver3-evaluation @@ -0,0 +1,220 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'apport' 'all' '3' + +insertpackage 'unstable' 'x' 'all' '3' 'Depends: a | b' +insertpackage 'unstable' 'y' 'all' '3' 'Depends: b | a' +insertpackage 'unstable' 'a' 'all' '3' 'Depends: c' +insertpackage 'unstable' 'b' 'all' '3' +insertpackage 'unstable' 'c' 'all' '3' + +setupaptarchive + +mkdir rootdir/var/log/apt + +testsuccess aptget install y x --solver internal -s -o Dir::Apport=var/crash + +testsuccess sed -i "s/^Date:.*/Date: Sun Mar 9 00:08:41 2025/" rootdir/var/crash/apt-edsp.$(id -u).crash + +testsuccessequal "ProblemType: AptSolver +Architecture: amd64 +Date: Sun Mar 9 00:08:41 2025 +Package: apt +Title: Failure: The 3.0 solver produced a worse result +SourcePackage: apt +ErrorMessage: +AptSolverDump: + Request: EDSP 0.5 + Architecture: amd64 + Architectures: amd64 + Machine-ID: 912e43bd1c1d4ba481f9f8ccab25f9ee + Install: x:amd64 y:amd64 + Solver: internal + + Package: a + Architecture: all + Version: 3 + APT-ID: 2 + Source: a + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + Depends: c + + Package: b + Architecture: all + Version: 3 + APT-ID: 3 + Source: b + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + + Package: c + Architecture: all + Version: 3 + APT-ID: 4 + Source: c + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + + Package: x + Architecture: all + Version: 3 + APT-ID: 0 + Source: x + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + Depends: a | b + + Package: y + Architecture: all + Version: 3 + APT-ID: 1 + Source: y + Source-Version: 3 + Priority: optional + Section: other + Size: 42 + APT-Release: + a=unstable,n=sid,c=main,b=all + APT-Pin: 500 + APT-Candidate: yes + Depends: b | a + + Package: apport + Architecture: all + Version: 3 + APT-ID: 5 + Source: apport + Source-Version: 3 + Priority: optional + Section: other + Installed: yes + APT-Pin: 100 + APT-Candidate: yes + " cat rootdir/var/crash/apt-edsp.$(id -u).crash + + +testsuccessequal "Request: EDSP 0.5 +Architecture: amd64 +Architectures: amd64 +Machine-ID: 912e43bd1c1d4ba481f9f8ccab25f9ee +Install: x:amd64 y:amd64 +Solver: internal + +Package: a +Architecture: all +Version: 3 +APT-ID: 2 +Source: a +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes +Depends: c + +Package: b +Architecture: all +Version: 3 +APT-ID: 3 +Source: b +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes + +Package: c +Architecture: all +Version: 3 +APT-ID: 4 +Source: c +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes + +Package: x +Architecture: all +Version: 3 +APT-ID: 0 +Source: x +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes +Depends: a | b + +Package: y +Architecture: all +Version: 3 +APT-ID: 1 +Source: y +Source-Version: 3 +Priority: optional +Section: other +Size: 42 +APT-Release: + a=unstable,n=sid,c=main,b=all +APT-Pin: 500 +APT-Candidate: yes +Depends: b | a + +Package: apport +Architecture: all +Version: 3 +APT-ID: 5 +Source: apport +Source-Version: 3 +Priority: optional +Section: other +Installed: yes +APT-Pin: 100 +APT-Candidate: yes +" cat rootdir/var/log/apt/edsp.log + + |
