]> git.saurik.com Git - apt.git/blob - test/integration/test-apt-get-upgrade
use "insertpackage" instead of "buildsimplenativepackage"
[apt.git] / test / integration / test-apt-get-upgrade
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6
7 setupenvironment
8 configarchitecture "i386"
9
10 # FIXME: use simulated packages instead
11
12 insertpackage 'stable' 'foo' 'all' '1.0'
13 insertpackage 'unstable' 'foo' 'all' '2.0'
14
15 insertpackage 'unstable' 'bar' 'all' '1.0'
16
17 insertpackage 'stable' 'apx' 'all' '1.0'
18 insertpackage 'unstable' 'apx' 'all' '2.0' 'Conflicts: foo'
19
20 insertpackage 'stable' 'apc' 'all' '1.0'
21 insertpackage 'unstable' 'apc' 'all' '2.0' 'Depends: bar'
22
23 insertinstalledpackage 'apx' 'all' '1.0'
24 insertinstalledpackage 'apc' 'all' '1.0'
25 insertinstalledpackage 'foo' 'all' '1.0'
26
27 setupaptarchive
28
29 msgtest "Test normal upgrade works"
30 testequal 'Reading package lists...
31 Building dependency tree...
32 The following packages have been kept back:
33 apc apx
34 The following packages will be upgraded:
35 foo
36 1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
37 Inst foo [1.0] (2.0 unstable [all])
38 Conf foo (2.0 unstable [all])' aptget -s upgrade && msgpass || msgfail
39
40 msgtest "Test if upgrade --with-new-pkgs works"
41 testequal 'Reading package lists...
42 Building dependency tree...
43 The following NEW packages will be installed:
44 bar
45 The following packages have been kept back:
46 apx foo
47 The following packages will be upgraded:
48 apc
49 1 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
50 Inst bar (1.0 unstable [all])
51 Inst apc [1.0] (2.0 unstable [all])
52 Conf bar (1.0 unstable [all])
53 Conf apc (2.0 unstable [all])' aptget -s upgrade --with-new-pkgs && msgpass || msgfail
54
55 msgtest "Test dist-upgrade works"
56 testequal 'Reading package lists...
57 Building dependency tree...
58 The following NEW packages will be installed:
59 bar
60 The following packages have been kept back:
61 apx
62 The following packages will be upgraded:
63 apc foo
64 2 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
65 Inst bar (1.0 unstable [all])
66 Inst apc [1.0] (2.0 unstable [all])
67 Inst foo [1.0] (2.0 unstable [all])
68 Conf bar (1.0 unstable [all])
69 Conf apc (2.0 unstable [all])
70 Conf foo (2.0 unstable [all])' aptget -s dist-upgrade && msgpass || msgfail
71