]> git.saurik.com Git - apt.git/blame - test/integration/test-crossgrades
improve arch-unqualified dpkg-progress parsing
[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'
4b10240c 14buildsimplenativepackage 'crosser' 'i386,armel' '3' 'experimental' 'Multi-Arch: same'
83e5cffc
DK
15setupaptarchive
16
17singleinstance() {
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}
32singleinstance 'internal'
33singleinstance 'apt'
34
35multiinstance() {
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}
58multiinstance 'internal'