summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-02-18 15:46:04 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-02-18 15:48:49 +0100
commit815d5b01bf9be1d476b110050b20ae980c76d4a8 (patch)
tree616fbd3d84e81c2a50cad68bab5f6538b683492c
parentf331e31505ab78620de2670b19bdefaee395b4e8 (diff)
test: Improve output cleaning for solver progress
We don't really care about solver progress messages in testing; hide them when comparing output, and hide them better than before. Previously testsuccessequal ... --solver 3.0 behaved differently than tests run with globally forced on 3.0 solver. Stop cleaning up autoremovals, but do clean up "Calculating upgrade" as well.
-rw-r--r--test/integration/framework17
1 files changed, 5 insertions, 12 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 3784ece06..35c1a1032 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -1555,22 +1555,15 @@ 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 \
+ -e '/\.\.\.profiling:/ {N;s#\.\.\.profiling:.*\n#...#g}' \
+ -e '/^Solving dependencies\.\.\.$/ d' \
+ -e '/^Calculating upgrade\.\.\.$/ d' \
+ -e 's/Solving dependencies\.\.\.//' \
+ -e 's/Calculating upgrade\.\.\.//' \
>"$2"
}