]> git.saurik.com Git - apt.git/blame - test/integration/test-crossgrades
acquire: Use priority queues and a 3 stage pipeline design
[apt.git] / test / integration / test-crossgrades
CommitLineData
83e5cffc
DK
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6
7setupenvironment
8configarchitecture 'i386' 'amd64' 'armel'
9configdpkgnoopchroot
10
11buildsimplenativepackage 'unrelated' 'amd64' '1' 'stable'
12buildsimplenativepackage 'crosser' 'i386,armel' '1' 'stable' 'Multi-Arch: same'
13buildsimplenativepackage 'crosser' 'amd64' '2' 'unstable'
14setupaptarchive
15
16singleinstance() {
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}
31singleinstance 'internal'
32singleinstance 'apt'
33
34multiinstance() {
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}
49multiinstance 'internal'