]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-progress-fd
merge sources.list lines based on Release filename
[apt.git] / test / integration / test-apt-progress-fd
CommitLineData
42c1513b
MV
1#!/bin/sh
2set -e
3
3abb6a6a
DK
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
42c1513b
MV
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
b58e2c7c
DK
18testfileequal './apt-progress.log' 'dlstatus:1:0.0000:Retrieving file 1 of 1
19dlstatus:1:100.0000:Retrieving file 1 of 1
20pmstatus:dpkg-exec:0.0000:Running dpkg
21pmstatus:testing:0.0000:Installing testing (amd64)
ecb777dd
DK
22pmstatus:testing:16.6667:Preparing testing (amd64)
23pmstatus:testing:33.3333:Unpacking testing (amd64)
b58e2c7c
DK
24pmstatus:testing:50.0000:Preparing to configure testing (amd64)
25pmstatus:dpkg-exec:50.0000:Running dpkg
26pmstatus:testing:50.0000:Configuring testing (amd64)
ecb777dd 27pmstatus:testing:66.6667:Configuring testing (amd64)
b4450f1d 28pmstatus:testing:83.3333:Installed testing (amd64)'
42c1513b
MV
29
30# upgrade
31exec 3> apt-progress.log
32testsuccess aptget install testing=0.8.15 -y -o APT::Status-Fd=3
b58e2c7c
DK
33testfileequal './apt-progress.log' 'dlstatus:1:0.0000:Retrieving file 1 of 1
34dlstatus:1:100.0000:Retrieving file 1 of 1
35pmstatus:dpkg-exec:0.0000:Running dpkg
36pmstatus:testing:0.0000:Installing testing (amd64)
ecb777dd
DK
37pmstatus:testing:16.6667:Preparing testing (amd64)
38pmstatus:testing:33.3333:Unpacking testing (amd64)
b58e2c7c
DK
39pmstatus:testing:50.0000:Preparing to configure testing (amd64)
40pmstatus:dpkg-exec:50.0000:Running dpkg
41pmstatus:testing:50.0000:Configuring testing (amd64)
ecb777dd 42pmstatus:testing:66.6667:Configuring testing (amd64)
b4450f1d 43pmstatus:testing:83.3333:Installed testing (amd64)'
4c559e97
DK
44
45# reinstall
46exec 3> apt-progress.log
47testsuccess aptget install testing=0.8.15 --reinstall -y -o APT::Status-Fd=3
b58e2c7c
DK
48testfileequal './apt-progress.log' 'dlstatus:1:0.0000:Retrieving file 1 of 1
49dlstatus:1:100.0000:Retrieving file 1 of 1
50pmstatus:dpkg-exec:0.0000:Running dpkg
51pmstatus:testing:0.0000:Installing testing (amd64)
ecb777dd
DK
52pmstatus:testing:16.6667:Preparing testing (amd64)
53pmstatus:testing:33.3333:Unpacking testing (amd64)
b58e2c7c
DK
54pmstatus:testing:50.0000:Preparing to configure testing (amd64)
55pmstatus:dpkg-exec:50.0000:Running dpkg
56pmstatus:testing:50.0000:Configuring testing (amd64)
ecb777dd 57pmstatus:testing:66.6667:Configuring testing (amd64)
b4450f1d 58pmstatus:testing:83.3333:Installed testing (amd64)'
42c1513b
MV
59
60# and remove
61exec 3> apt-progress.log
62testsuccess aptget remove testing -y -o APT::Status-Fd=3
b58e2c7c
DK
63testfileequal './apt-progress.log' 'pmstatus:dpkg-exec:0.0000:Running dpkg
64pmstatus:testing:0.0000:Removing testing (amd64)
65pmstatus:testing:25.0000:Preparing for removal of testing (amd64)
66pmstatus:testing:50.0000:Removing testing (amd64)
67pmstatus:testing:75.0000:Removed testing (amd64)
68pmstatus:dpkg-exec:75.0000:Running dpkg'
42c1513b 69
42c1513b
MV
70# install non-native and ensure we get proper progress info
71exec 3> apt-progress.log
72testsuccess aptget install testing2:i386 -y -o APT::Status-Fd=3
b58e2c7c
DK
73testfileequal './apt-progress.log' 'dlstatus:1:0.0000:Retrieving file 1 of 1
74dlstatus:1:100.0000:Retrieving file 1 of 1
75pmstatus:dpkg-exec:0.0000:Running dpkg
76pmstatus:testing2:0.0000:Installing testing2 (i386)
ecb777dd
DK
77pmstatus:testing2:16.6667:Preparing testing2 (i386)
78pmstatus:testing2:33.3333:Unpacking testing2 (i386)
b58e2c7c
DK
79pmstatus:testing2:50.0000:Preparing to configure testing2 (i386)
80pmstatus:dpkg-exec:50.0000:Running dpkg
81pmstatus:testing2:50.0000:Configuring testing2 (i386)
ecb777dd 82pmstatus:testing2:66.6667:Configuring testing2 (i386)
b4450f1d 83pmstatus:testing2:83.3333:Installed testing2 (i386)'
42c1513b 84
dd640f3c 85rm -f apt-progress*.log