]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-update-reporting
tests: disable EIPP logging in test-compressed-indexes
[apt.git] / test / integration / test-apt-update-reporting
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6 setupenvironment
7 configarchitecture 'amd64'
8
9 for i in $(seq 100); do
10 insertpackage 'unstable' "foo-$i" 'all' '1.0'
11 insertsource 'unstable' "foo-$i" 'all' '1.0'
12 done
13
14 setupaptarchive --no-update
15 changetowebserver
16
17 aptget update -o Debug::Acquire::Progress=1 2>progress.log >ignore.out
18
19 has_progress() {
20 prev_percent=0.0
21 while read line; do
22 percent="$(echo "$line"|cut -b2-6)"
23 # need to cut the decimal point and digits because sh can not do
24 # float compare
25 if [ "${percent%%.*}" -lt "${prev_percent%%.*}" ]; then
26 cat progress.log
27 return 1
28 fi
29 prev_percent="$percent"
30 done < progress.log
31 return 0
32 }
33
34 msgtest "Testing that progress does not go backward"
35 testsuccess --nomsg has_progress