summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-12-19 13:12:35 +0000
committerJulian Andres Klode <jak@debian.org>2024-12-19 13:12:35 +0000
commitb1cb2d37d015579d208bb79f6c4977e20fde12a5 (patch)
treeb57e0ac1ce86a0e1fec730b0a3457bd48feec237 /test/integration/framework
parentf54a561bc81d1bcbce6a107ad535f0c6d6e88d38 (diff)
parent6e260e26e4cd671f781151e24d89a17b29a55530 (diff)
Merge branch 'pager' into 'main'
Introduce automatic pager for read commands See merge request apt-team/apt!410
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 6d4d0b07f..a93168278 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -174,6 +174,13 @@ getaptconfig() {
}
runapt() {
msgdebug "Executing: ${CCMD}$*${CDEBUG} "
+ local unbuffer=
+ unset NO_COLOR
+ if [ "$1" = "--unbuffer" ]; then
+ unbuffer="unbuffer"
+ export NO_COLOR=1
+ shift
+ fi
local CMD="$1"
shift
case "$CMD" in
@@ -181,9 +188,9 @@ runapt() {
*) CMD="${APTCMDLINEBINDIR}/$CMD";;
esac
if [ "$CMD" = 'aptitude' ]; then
- MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG="$(getaptconfig)" LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}" command "$CMD" "$@"
+ MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG="$(getaptconfig)" LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}" command $unbuffer "$CMD" "$@"
else
- MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG="$(getaptconfig)" LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}" "$CMD" "$@"
+ MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG="$(getaptconfig)" LD_LIBRARY_PATH="${LIBRARYPATH}:${LD_LIBRARY_PATH}" $unbuffer "$CMD" "$@"
fi
}
runpython3() { runapt command python3 "$@"; }