summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-06-15 23:59:14 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-06-15 23:59:14 +0200
commit533fe3d13927798c17bdef84eba60ed9441d9608 (patch)
tree8b2b35e32d5ada46f75bac29bdd712e03688a92c /test
parent9d2a8a7388cf3b0bbbe92f6b0b30a533e1167f40 (diff)
allow ratelimiting progress reporting for testcases
Progress reports once in a while which is a bit to unpredictable for testcases, so we enforce a steady progress for them in the hope that this makes the tests (mostly test-apt-progress-fd) a bit more stable. Git-Dch: Ignore
Diffstat (limited to 'test')
-rw-r--r--test/integration/framework23
-rwxr-xr-xtest/integration/test-acquire-same-repository-multiple-times2
2 files changed, 14 insertions, 11 deletions
diff --git a/test/integration/framework b/test/integration/framework
index d8f7567d9..5d949009f 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -273,16 +273,19 @@ EOF
chmod +x "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg"
echo "Dir::Bin::dpkg \"${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg\";" > rootdir/etc/apt/apt.conf.d/99dpkg
- if ! command dpkg --assert-multi-arch >/dev/null 2>&1; then
- echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it…
- fi
- echo 'quiet::NoUpdate "true";' >> aptconfig.conf
- echo 'quiet::NoStatistic "true";' >> aptconfig.conf
- # too distracting for users, but helpful to detect changes
- echo 'Acquire::Progress::Ignore::ShowErrorText "true";' >> aptconfig.conf
- # in testcases, it can appear as if localhost has a rotation setup,
- # hide this as we can't really deal with it properly
- echo 'Acquire::Failure::ShowIP "false";' >> aptconfig.conf
+ {
+ if ! command dpkg --assert-multi-arch >/dev/null 2>&1; then
+ echo "DPKG::options:: \"--force-architecture\";" # Added to test multiarch before dpkg is ready for it…
+ fi
+ echo 'quiet::NoUpdate "true";'
+ echo 'quiet::NoStatistic "true";'
+ # too distracting for users, but helpful to detect changes
+ echo 'Acquire::Progress::Ignore::ShowErrorText "true";'
+ echo 'Acquire::Progress::Diffpercent "true";'
+ # in testcases, it can appear as if localhost has a rotation setup,
+ # hide this as we can't really deal with it properly
+ echo 'Acquire::Failure::ShowIP "false";'
+ } >> aptconfig.conf
cp "${TESTDIRECTORY}/apt.pem" "${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem"
if [ "$(id -u)" = '0' ]; then
diff --git a/test/integration/test-acquire-same-repository-multiple-times b/test/integration/test-acquire-same-repository-multiple-times
index bfeaf88db..a46e0d73c 100755
--- a/test/integration/test-acquire-same-repository-multiple-times
+++ b/test/integration/test-acquire-same-repository-multiple-times
@@ -32,7 +32,7 @@ cat >$NEWMETHODS/file <<EOF
while read line; do
echo "\$line"
if [ -z "\$line" ]; then
- sleep 0.2
+ sleep 0.5
fi
done | $OLDMETHODS/file
EOF