move iprogress.{cc,h} to private-progress.{cc,h} until its fully stable
[ntk/apt.git] / test / integration / test-apt-progress-fd
CommitLineData
42c1513b
MV
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture 'amd64' 'i386'
9
10buildsimplenativepackage 'testing' 'amd64' '0.1' 'stable'
11buildsimplenativepackage 'testing' 'amd64' '0.8.15' 'stable'
12buildsimplenativepackage 'testing2' 'amd64,i386' '0.8.15' 'stable'
13setupaptarchive
14
15# install native
16exec 3> apt-progress.log
17testsuccess aptget install testing=0.1 -y -o APT::Status-Fd=3
18testequal "dlstatus:1:0:Retrieving file 1 of 1
19dlstatus:1:0:Retrieving file 1 of 1
20pmstatus:dpkg-exec:0:Running dpkg
dd640f3c
MV
21pmstatus:testing:0:Installing testing (amd64)
22pmstatus:testing:20:Preparing testing (amd64)
23pmstatus:testing:40:Unpacking testing (amd64)
42c1513b
MV
24pmstatus:testing:60:Preparing to configure testing
25pmstatus:dpkg-exec:60:Running dpkg
dd640f3c
MV
26pmstatus:testing:60:Configuring testing (amd64)
27pmstatus:testing:80:Configuring testing (amd64)
28pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log
42c1513b
MV
29
30# upgrade
31exec 3> apt-progress.log
32testsuccess aptget install testing=0.8.15 -y -o APT::Status-Fd=3
33testequal "dlstatus:1:0:Retrieving file 1 of 1
34dlstatus:1:0:Retrieving file 1 of 1
35pmstatus:dpkg-exec:0:Running dpkg
dd640f3c
MV
36pmstatus:testing:20:Preparing testing (amd64)
37pmstatus:testing:40:Unpacking testing (amd64)
42c1513b
MV
38pmstatus:testing:60:Preparing to configure testing
39pmstatus:dpkg-exec:60:Running dpkg
dd640f3c
MV
40pmstatus:testing:60:Configuring testing (amd64)
41pmstatus:testing:80:Configuring testing (amd64)
42pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log
42c1513b
MV
43
44# and remove
45exec 3> apt-progress.log
46testsuccess aptget remove testing -y -o APT::Status-Fd=3
47testequal "pmstatus:dpkg-exec:0:Running dpkg
dd640f3c
MV
48pmstatus:testing:0:Removing testing (amd64)
49pmstatus:testing:33.3333:Preparing for removal of testing (amd64)
50pmstatus:testing:66.6667:Removing testing (amd64)
51pmstatus:testing:100:Removed testing (amd64)" cat apt-progress.log
42c1513b 52
42c1513b
MV
53# install non-native and ensure we get proper progress info
54exec 3> apt-progress.log
55testsuccess aptget install testing2:i386 -y -o APT::Status-Fd=3
56
57# and compare
58testequal "dlstatus:1:0:Retrieving file 1 of 1
59dlstatus:1:0:Retrieving file 1 of 1
60pmstatus:dpkg-exec:0:Running dpkg
dd640f3c
MV
61pmstatus:testing2:0:Installing testing2 (i386)
62pmstatus:testing2:20:Preparing testing2 (i386)
63pmstatus:testing2:40:Unpacking testing2 (i386)
64pmstatus:testing2:60:Preparing to configure testing2 (i386)
42c1513b 65pmstatus:dpkg-exec:60:Running dpkg
dd640f3c
MV
66pmstatus:testing2:60:Configuring testing2 (i386)
67pmstatus:testing2:80:Configuring testing2 (i386)
68pmstatus:testing2:100:Installed testing2 (i386)" cat apt-progress.log
42c1513b 69
dd640f3c 70rm -f apt-progress*.log