]>
Commit | Line | Data |
---|---|---|
42c1513b MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture 'amd64' 'i386' | |
9 | ||
10 | buildsimplenativepackage 'testing' 'amd64' '0.1' 'stable' | |
11 | buildsimplenativepackage 'testing' 'amd64' '0.8.15' 'stable' | |
12 | buildsimplenativepackage 'testing2' 'amd64,i386' '0.8.15' 'stable' | |
13 | setupaptarchive | |
14 | ||
15 | # install native | |
16 | exec 3> apt-progress.log | |
17 | testsuccess aptget install testing=0.1 -y -o APT::Status-Fd=3 | |
18 | testequal "dlstatus:1:0:Retrieving file 1 of 1 | |
f7bf262e | 19 | dlstatus:1:20:Retrieving file 1 of 1 |
42c1513b | 20 | pmstatus:dpkg-exec:0:Running dpkg |
dd640f3c MV |
21 | pmstatus:testing:0:Installing testing (amd64) |
22 | pmstatus:testing:20:Preparing testing (amd64) | |
23 | pmstatus:testing:40:Unpacking testing (amd64) | |
d274520e | 24 | pmstatus:testing:60:Preparing to configure testing (amd64) |
42c1513b | 25 | pmstatus:dpkg-exec:60:Running dpkg |
dd640f3c MV |
26 | pmstatus:testing:60:Configuring testing (amd64) |
27 | pmstatus:testing:80:Configuring testing (amd64) | |
28 | pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log | |
42c1513b MV |
29 | |
30 | # upgrade | |
31 | exec 3> apt-progress.log | |
32 | testsuccess aptget install testing=0.8.15 -y -o APT::Status-Fd=3 | |
33 | testequal "dlstatus:1:0:Retrieving file 1 of 1 | |
f7bf262e | 34 | dlstatus:1:20:Retrieving file 1 of 1 |
42c1513b | 35 | pmstatus:dpkg-exec:0:Running dpkg |
4c559e97 DK |
36 | pmstatus:testing:0:Installing testing (amd64) |
37 | pmstatus:testing:20:Preparing testing (amd64) | |
38 | pmstatus:testing:40:Unpacking testing (amd64) | |
39 | pmstatus:testing:60:Preparing to configure testing (amd64) | |
40 | pmstatus:dpkg-exec:60:Running dpkg | |
41 | pmstatus:testing:60:Configuring testing (amd64) | |
42 | pmstatus:testing:80:Configuring testing (amd64) | |
43 | pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log | |
44 | ||
45 | # reinstall | |
46 | exec 3> apt-progress.log | |
47 | testsuccess aptget install testing=0.8.15 --reinstall -y -o APT::Status-Fd=3 | |
48 | testequal "dlstatus:1:0:Retrieving file 1 of 1 | |
a1380a5c | 49 | dlstatus:1:20:Retrieving file 1 of 1 |
4c559e97 DK |
50 | pmstatus:dpkg-exec:0:Running dpkg |
51 | pmstatus:testing:0:Installing testing (amd64) | |
dd640f3c MV |
52 | pmstatus:testing:20:Preparing testing (amd64) |
53 | pmstatus:testing:40:Unpacking testing (amd64) | |
d274520e | 54 | pmstatus:testing:60:Preparing to configure testing (amd64) |
42c1513b | 55 | pmstatus:dpkg-exec:60:Running dpkg |
dd640f3c MV |
56 | pmstatus:testing:60:Configuring testing (amd64) |
57 | pmstatus:testing:80:Configuring testing (amd64) | |
58 | pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log | |
42c1513b MV |
59 | |
60 | # and remove | |
61 | exec 3> apt-progress.log | |
62 | testsuccess aptget remove testing -y -o APT::Status-Fd=3 | |
63 | testequal "pmstatus:dpkg-exec:0:Running dpkg | |
dd640f3c MV |
64 | pmstatus:testing:0:Removing testing (amd64) |
65 | pmstatus:testing:33.3333:Preparing for removal of testing (amd64) | |
66 | pmstatus:testing:66.6667:Removing testing (amd64) | |
67 | pmstatus:testing:100:Removed testing (amd64)" cat apt-progress.log | |
42c1513b | 68 | |
42c1513b MV |
69 | # install non-native and ensure we get proper progress info |
70 | exec 3> apt-progress.log | |
71 | testsuccess aptget install testing2:i386 -y -o APT::Status-Fd=3 | |
72 | ||
73 | # and compare | |
74 | testequal "dlstatus:1:0:Retrieving file 1 of 1 | |
f7bf262e | 75 | dlstatus:1:20:Retrieving file 1 of 1 |
42c1513b | 76 | pmstatus:dpkg-exec:0:Running dpkg |
dd640f3c MV |
77 | pmstatus:testing2:0:Installing testing2 (i386) |
78 | pmstatus:testing2:20:Preparing testing2 (i386) | |
79 | pmstatus:testing2:40:Unpacking testing2 (i386) | |
80 | pmstatus:testing2:60:Preparing to configure testing2 (i386) | |
42c1513b | 81 | pmstatus:dpkg-exec:60:Running dpkg |
dd640f3c MV |
82 | pmstatus:testing2:60:Configuring testing2 (i386) |
83 | pmstatus:testing2:80:Configuring testing2 (i386) | |
84 | pmstatus:testing2:100:Installed testing2 (i386)" cat apt-progress.log | |
42c1513b | 85 | |
dd640f3c | 86 | rm -f apt-progress*.log |