]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-upgrade
add test for upgrade, upgrade --with-new-pkgs, dist-upgrade
[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
12buildsimplenativepackage 'foo' 'all' '1.0'
13buildsimplenativepackage 'bar' 'all' '1.0'
14
15buildsimplenativepackage 'apx' 'all' '1.0' 'stable'
16buildsimplenativepackage 'apx' 'all' '2.0' 'unstable' 'Conflicts: foo'
17
18buildsimplenativepackage 'apc' 'all' '1.0' 'stable'
19buildsimplenativepackage 'apc' 'all' '2.0' 'unstable' 'Depends: bar'
20
21insertinstalledpackage 'apx' 'all' '1.0'
22insertinstalledpackage 'apc' 'all' '1.0'
23insertinstalledpackage 'foo' 'all' '1.0'
24
25setupaptarchive
26
27msgtest "Test normal upgrade works"
28testequal 'Reading package lists...
29Building dependency tree...
30The following packages have been kept back:
31 apc apx
32The following packages will be upgraded:
33 foo
341 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
35Inst foo [1.0] (1.0 unstable [all])
36Conf foo (1.0 unstable [all])' aptget -s upgrade && msgpass || msgfail
37
38msgtest "Test if upgrade --with-new-pkgs works"
39testequal 'Reading package lists...
40Building dependency tree...
41The following NEW packages will be installed:
42 bar
43The following packages have been kept back:
44 apx foo
45The following packages will be upgraded:
46 apc
471 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
48Inst bar (1.0 unstable [all])
49Inst apc [1.0] (2.0 unstable [all])
50Conf bar (1.0 unstable [all])
51Conf apc (2.0 unstable [all])' aptget -s upgrade --with-new-pkgs && msgpass || msgfail
52
53msgtest "Test dist-upgrade works"
54testequal 'Reading package lists...
55Building dependency tree...
56The following NEW packages will be installed:
57 bar
58The following packages have been kept back:
59 apx
60The following packages will be upgraded:
61 apc foo
622 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
63Inst bar (1.0 unstable [all])
64Inst apc [1.0] (2.0 unstable [all])
65Inst foo [1.0] (1.0 unstable [all])
66Conf bar (1.0 unstable [all])
67Conf apc (2.0 unstable [all])
68Conf foo (1.0 unstable [all])' aptget -s dist-upgrade && msgpass || msgfail
69