blob: b428215394e46b8d38e3613be32d4c7242ae4578 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
#!/bin/sh
set -e
TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
allowremovemanual
configarchitecture 'i386' 'amd64' 'armel'
configdpkgnoopchroot
buildsimplenativepackage 'unrelated' 'amd64' '1' 'stable'
buildsimplenativepackage 'crosser' 'i386,armel' '1' 'stable' 'Multi-Arch: same'
buildsimplenativepackage 'crosser' 'amd64' '2' 'unstable'
buildsimplenativepackage 'crosser' 'i386,armel' '3' 'experimental' 'Multi-Arch: same'
setupaptarchive
singleinstance() {
testsuccess apt install crosser:i386=1 unrelated:amd64 -y --planner $1
testdpkginstalled 'crosser:i386' 'unrelated'
testsuccess apt install crosser:amd64 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1
cp -a rootdir/tmp/testsuccess.output crosser.output
testfailure grep -- '--remove.*crosser.*' crosser.output
testfailure grep -- '--purge' crosser.output
testsuccess apt install crosser:amd64 unrelated:amd64- -y -o Dpkg::Use-Pty=0 --purge -o Debug::pkgDPkgProgressReporting=1 --planner $1
testdpkgnotinstalled 'crosser:i386' 'unrelated'
testdpkginstalled 'crosser:amd64'
testsuccess apt install crosser:armel=3 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1
cp -a rootdir/tmp/testsuccess.output crosser.output
testsuccess grep -- '--remove.*crosser.*' crosser.output
testsuccess grep -- '--purge' crosser.output
testsuccess apt install crosser:armel=3 -y -o Debug::pkgDPkgProgressReporting=1 -o Dpkg::Use-Pty=0 --purge --planner $1
testdpkgnotinstalled 'crosser:i386' 'crosser:amd64' 'unrelated'
testdpkginstalled 'crosser:armel'
testsuccess apt install crosser=1 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1 --allow-downgrades
cp -a rootdir/tmp/testsuccess.output crosser.output
testsuccess grep -- '--remove.*crosser.*' crosser.output
testsuccess grep -- '--purge' crosser.output
testsuccess apt install crosser=1 -y -o Debug::pkgDPkgProgressReporting=1 -o Dpkg::Use-Pty=0 --purge --planner $1 --allow-downgrades
testdpkgnotinstalled 'crosser:armel' 'crosser:amd64' 'unrelated'
testdpkginstalled 'crosser:i386'
testsuccess apt purge crosser:i386 -y --planner $1
testdpkgnotinstalled 'crosser:i386'
}
singleinstance 'internal'
singleinstance 'apt'
multiinstance() {
testsuccess apt install crosser:i386=1 crosser:armel=1 unrelated:amd64 -y --planner $1
testdpkginstalled 'crosser:i386' 'crosser:armel' 'unrelated'
testsuccess apt install crosser:amd64 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1
cp -a rootdir/tmp/testsuccess.output crosser.output
testsuccess grep -- '--remove.*crosser.*' crosser.output
testsuccess grep -- '--purge' crosser.output
testsuccess apt install crosser:amd64 unrelated:amd64- -y -o Dpkg::Use-Pty=0 --purge -o Debug::pkgDPkgProgressReporting=1 --planner $1
testdpkgnotinstalled 'crosser:i386' 'crosser:armel' 'unrelated'
testdpkginstalled 'crosser:amd64'
testsuccess apt install crosser:i386 crosser:armel -t experimental -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1
cp -a rootdir/tmp/testsuccess.output crosser.output
testsuccess grep -- '--remove.*crosser.*' crosser.output
testsuccess grep -- '--purge' crosser.output
testsuccess apt install crosser:i386 crosser:armel -t experimental -y -o Debug::pkgDPkgProgressReporting=1 -o Dpkg::Use-Pty=0 --purge --planner $1
testdpkgnotinstalled 'crosser:amd64' 'unrelated'
testdpkginstalled 'crosser:i386' 'crosser:armel'
testsuccess apt install crosser:i386- crosser:armel=1 -y -o Debug::pkgDpkgPm=1 -o Dpkg::Use-Pty=0 --purge --planner $1 --allow-downgrades
cp -a rootdir/tmp/testsuccess.output crosser.output
testsuccess grep -- '--remove.*crosser.*' crosser.output
testsuccess grep -- '--purge' crosser.output
testsuccess apt install crosser:i386- crosser:armel=1 -y -o Debug::pkgDPkgProgressReporting=1 -o Dpkg::Use-Pty=0 --purge --planner $1 --allow-downgrades
testdpkgnotinstalled 'crosser:amd64' 'crosser:i386' 'unrelated'
testdpkginstalled 'crosser:armel'
testsuccess apt purge crosser:armel -y --planner $1 -o Debug::pkgDPkgProgressReporting=1
testdpkgnotinstalled 'crosser:i386' 'crosser:armel' 'crosser:amd64' 'unrelated'
}
multiinstance 'internal'
|