summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-05-25 08:50:20 +0000
committerJulian Andres Klode <jak@debian.org>2024-05-25 08:50:20 +0000
commitf75c7c10c31e79462db27161155b28f075679ef9 (patch)
tree0f1738842318b9d09911ee040e18801c47a32143 /test/integration/framework
parent140d36fd16a3d4f1fce0c54474b946d0577f1fde (diff)
parent4a2b89be6fa73b9c193d5b70e11a9305272efc3e (diff)
Merge branch 'solver3' into 'main'
solver3: Run the test suite, at least the passing tests + some fixes. See merge request apt-team/apt!349
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework22
1 files changed, 21 insertions, 1 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 98fd7710a..e13888da2 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -19,6 +19,9 @@ while [ -n "$1" -a -z "$CHECK_ARGS" ]; do
elif [ "$1" = '--level' ]; then
export MSGLEVEL=$2
shift
+ elif [ "$1" = '--solver' ]; then
+ export APT_SOLVER=$2
+ shift
else
echo >&2 "WARNING: Unknown parameter »$1« will be ignored"
fi
@@ -537,7 +540,10 @@ exec fakeroot gdb --quiet -ex run '${DPKG:-dpkg}' --args '${DPKG:-dpkg}' --root=
EOF
chmod +x "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/gdb-dpkg"
echo "Dir::Bin::dpkg \"${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg\";" > rootdir/etc/apt/apt.conf.d/99dpkg
-
+ # Set the solver for the test case.
+ if [ "$APT_SOLVER" ]; then
+ echo "APT::Solver \"$APT_SOLVER\";" >> aptconfig.conf
+ fi
{
echo 'quiet "0";'
echo 'quiet::NoUpdate "true";'
@@ -585,6 +591,9 @@ EOF
# prefer our apt binaries over the system apt binaries
export PATH="${APTCMDLINEBINDIR}:${PATH}:/usr/sbin:/sbin"
}
+allowremovemanual() {
+ echo 'APT::Solver::RemoveManual "true";' >> ${TMPWORKINGDIRECTORY}/rootdir/etc/apt/apt.conf.d/allow-remove-manual.conf
+}
getarchitecture() {
if [ "$1" = "native" -o -z "$1" ]; then
@@ -1550,11 +1559,22 @@ downloadfile() {
fi
}
+cleanup_solver3_pipe() {
+ if [ "$APT_SOLVER" != "3.0" ]; then
+ cat
+ else
+ # FIXME: We do not have support for listing autoremovals yet.
+ # FIXME: Progress output is different
+ sed -e '/Solving dependencies\.\.\./ d' \
+ -e "/no longer required[.:]$/,/^Use '.* autoremove'/ d"
+ fi
+}
cleanup_output() {
cat "$1" | sed \
-e '/gpgv: WARNING: This key is not suitable for signing in --compliance=gnupg mode/ d' \
-e '/^profiling:/ d' \
| sed -e '/\.\.\.profiling:/ {N;s#\.\.\.profiling:.*\n#...#g}' \
+ | cleanup_solver3_pipe \
>"$2"
}