]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-update-reporting
drop confusing comma from no strong hash message
[apt.git] / test / integration / test-apt-update-reporting
CommitLineData
fb193b1c
MV
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6setupenvironment
7configarchitecture 'amd64'
8
9for i in $(seq 100); do
10 insertpackage 'unstable' "foo-$i" 'all' '1.0'
11 insertsource 'unstable' "foo-$i" 'all' '1.0'
12done
13
14setupaptarchive --no-update
15changetowebserver
16
17aptget update -o Debug::Acquire::Progress=1 2>progress.log >ignore.out
18
19prev_percent=0.0
20while read line; do
21 percent="$(echo "$line"|cut -b2-6)"
22 # need to cut the decimal point and digits because sh can not do
23 # float compare
24 if [ "${percent%%.*}" -lt "${prev_percent%%.*}" ]; then
25 echo "progress goes backwards"
26 cat progress.log
27 exit 1
28 fi
29 prev_percent="$percent"
30done < progress.log
31