]> git.saurik.com Git - apt.git/blob - test/integration/test-crossgrades
Merge branch 'feature/apt-dpkg-comm'
[apt.git] / test / integration / test-crossgrades
1 #!/bin/sh
2 set -e
3
4 TESTDIR="$(readlink -f "$(dirname "$0")")"
5 . "$TESTDIR/framework"
6
7 setupenvironment
8 configarchitecture 'i386' 'amd64' 'armel'
9 configdpkgnoopchroot
10
11 buildsimplenativepackage 'unrelated' 'amd64' '1' 'stable'
12 buildsimplenativepackage 'crosser' 'i386,armel' '1' 'stable' 'Multi-Arch: same'
13 buildsimplenativepackage 'crosser' 'amd64' '2' 'unstable'
14 setupaptarchive
15
16 singleinstance() {
17 testsuccess apt install crosser:i386=1 unrelated:amd64 -y --planner $1
18 testdpkginstalled 'crosser:i386' 'unrelated'
19
20 testsuccess apt install crosser:amd64 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1
21 cp -a rootdir/tmp/testsuccess.output crosser.output
22 testfailure grep -- '--remove.*crosser.*' crosser.output
23 testfailure grep -- '--purge' crosser.output
24 testsuccess apt install crosser:amd64 unrelated:amd64- -y -o Dpkg::Use-Pty=0 --purge -o Debug::pkgDPkgProgressReporting=1 --planner $1
25 testdpkgnotinstalled 'crosser:i386' 'unrelated'
26 testdpkginstalled 'crosser:amd64'
27
28 testsuccess apt purge crosser:amd64 -y --planner $1
29 testdpkgnotinstalled 'crosser:amd64'
30 }
31 singleinstance 'internal'
32 singleinstance 'apt'
33
34 multiinstance() {
35 testsuccess apt install crosser:i386=1 crosser:armel=1 unrelated:amd64 -y --planner $1
36 testdpkginstalled 'crosser:i386' 'crosser:armel' 'unrelated'
37
38 testsuccess apt install crosser:amd64 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1
39 cp -a rootdir/tmp/testsuccess.output crosser.output
40 testsuccess grep -- '--remove.*crosser.*' crosser.output
41 testsuccess grep -- '--purge' crosser.output
42 testsuccess apt install crosser:amd64 unrelated:amd64- -y -o Dpkg::Use-Pty=0 --purge -o Debug::pkgDPkgProgressReporting=1 --planner $1
43 testdpkgnotinstalled 'crosser:i386' 'crosser:armel' 'unrelated'
44 testdpkginstalled 'crosser:amd64'
45
46 testsuccess apt purge crosser:amd64 -y --planner $1
47 testdpkgnotinstalled 'crosser:amd64'
48 }
49 multiinstance 'internal'