]>
Commit | Line | Data |
---|---|---|
83e5cffc DK |
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' | |
4b10240c | 14 | buildsimplenativepackage 'crosser' 'i386,armel' '3' 'experimental' 'Multi-Arch: same' |
83e5cffc DK |
15 | setupaptarchive |
16 | ||
17 | singleinstance() { | |
18 | testsuccess apt install crosser:i386=1 unrelated:amd64 -y --planner $1 | |
19 | testdpkginstalled 'crosser:i386' 'unrelated' | |
20 | ||
21 | testsuccess apt install crosser:amd64 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1 | |
22 | cp -a rootdir/tmp/testsuccess.output crosser.output | |
23 | testfailure grep -- '--remove.*crosser.*' crosser.output | |
24 | testfailure grep -- '--purge' crosser.output | |
25 | testsuccess apt install crosser:amd64 unrelated:amd64- -y -o Dpkg::Use-Pty=0 --purge -o Debug::pkgDPkgProgressReporting=1 --planner $1 | |
26 | testdpkgnotinstalled 'crosser:i386' 'unrelated' | |
27 | testdpkginstalled 'crosser:amd64' | |
28 | ||
29 | testsuccess apt purge crosser:amd64 -y --planner $1 | |
30 | testdpkgnotinstalled 'crosser:amd64' | |
31 | } | |
32 | singleinstance 'internal' | |
33 | singleinstance 'apt' | |
34 | ||
35 | multiinstance() { | |
36 | testsuccess apt install crosser:i386=1 crosser:armel=1 unrelated:amd64 -y --planner $1 | |
37 | testdpkginstalled 'crosser:i386' 'crosser:armel' 'unrelated' | |
38 | ||
39 | testsuccess apt install crosser:amd64 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1 | |
40 | cp -a rootdir/tmp/testsuccess.output crosser.output | |
41 | testsuccess grep -- '--remove.*crosser.*' crosser.output | |
42 | testsuccess grep -- '--purge' crosser.output | |
43 | testsuccess apt install crosser:amd64 unrelated:amd64- -y -o Dpkg::Use-Pty=0 --purge -o Debug::pkgDPkgProgressReporting=1 --planner $1 | |
44 | testdpkgnotinstalled 'crosser:i386' 'crosser:armel' 'unrelated' | |
45 | testdpkginstalled 'crosser:amd64' | |
46 | ||
4b10240c DK |
47 | testsuccess apt install crosser:i386 crosser:armel -t experimental -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1 |
48 | cp -a rootdir/tmp/testsuccess.output crosser.output | |
49 | testsuccess grep -- '--remove.*crosser.*' crosser.output | |
50 | testsuccess grep -- '--purge' crosser.output | |
51 | testsuccess apt install crosser:i386 crosser:armel -t experimental -y -o Debug::pkgDPkgProgressReporting=1 -o Dpkg::Use-Pty=0 --purge --planner $1 | |
52 | testdpkgnotinstalled 'crosser:amd64' 'unrelated' | |
53 | testdpkginstalled 'crosser:i386' 'crosser:armel' | |
54 | ||
55 | testsuccess apt purge crosser:i386 crosser:armel -y --planner $1 | |
56 | testdpkgnotinstalled 'crosser:i386' 'crosser:armel' 'unrelated' | |
83e5cffc DK |
57 | } |
58 | multiinstance 'internal' |