summaryrefslogtreecommitdiffstats
path: root/test/integration/framework
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:48:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 02:48:09 +0000
commit4d72383e52dc7708fe5e3d9911733c1a10b27949 (patch)
tree1ca877f9fa4d082c476f24b83d3dde386e5993c7 /test/integration/framework
parentAdding upstream version 2.9.3. (diff)
downloadapt-4d72383e52dc7708fe5e3d9911733c1a10b27949.tar.xz
apt-4d72383e52dc7708fe5e3d9911733c1a10b27949.zip
Adding upstream version 2.9.4.upstream/2.9.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework23
1 files changed, 21 insertions, 2 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 9cb4081..e13888d 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,12 +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 '/...$/ d' \
-e '/^profiling:/ d' \
| sed -e '/\.\.\.profiling:/ {N;s#\.\.\.profiling:.*\n#...#g}' \
+ | cleanup_solver3_pipe \
>"$2"
}