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