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