diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-04-05 11:58:09 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-04-05 11:58:09 +0200 |
commit | 70d761713bf1b1b4520079161708f66e8e3a4e31 (patch) | |
tree | 2467b28af8632554bc6f4ad186abe9ee0546ffa9 /test/integration/test-bug-612958-use-dpkg-multiarch-config | |
parent | 8d39b60d85b8123758f310e4a279c71879e13a06 (diff) | |
parent | 00870bf52186b5adb9819c707b411ac2fffe482b (diff) |
merged from debian-sid
Diffstat (limited to 'test/integration/test-bug-612958-use-dpkg-multiarch-config')
-rwxr-xr-x | test/integration/test-bug-612958-use-dpkg-multiarch-config | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/test/integration/test-bug-612958-use-dpkg-multiarch-config b/test/integration/test-bug-612958-use-dpkg-multiarch-config new file mode 100755 index 000000000..4f31c3953 --- /dev/null +++ b/test/integration/test-bug-612958-use-dpkg-multiarch-config @@ -0,0 +1,59 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' +setupaptarchive + +insertinstalledpackage 'libapt' 'i386' '1.0' +insertinstalledpackage 'libapt' 'amd64' '1.0' +insertinstalledpackage 'libapt' 'armel' '1.0' + +testpass() { + rm rootdir/var/cache/apt/*.bin + msgtest 'Test architecture handling' "$1 with $2" + aptcache show libapt:$2 2> /dev/null > /dev/null && msgpass || msgfail +} + +testfail() { + rm rootdir/var/cache/apt/*.bin + msgtest 'Test architecture handling' "$1 with $2" + aptcache show libapt:$2 2> /dev/null > /dev/null && msgfail || msgpass +} + +testpass 'no config' 'i386' +testfail 'no config' 'amd64' +testfail 'no config' 'armel' + +CONFFILE=rootdir/etc/apt/apt.conf.d/99multiarch +echo '#clear APT::Architectures;' >> $CONFFILE +echo 'APT::Architectures:: "i386";' >> $CONFFILE +echo 'APT::Architectures:: "amd64";' >> $CONFFILE + +testpass 'apt config' 'i386' +testpass 'apt config' 'amd64' +testfail 'apt config' 'armel' + +echo 'APT::Architectures:: "armel";' >> $CONFFILE + +testpass 'apt config' 'armel' + +rm $CONFFILE + +echo '#clear APT::Architectures;' >> $CONFFILE +echo 'Dir::Bin::dpkg "./dpkg-printer";' >> $CONFFILE + +echo '#! /bin/sh +echo "amd64"' > ./dpkg-printer +chmod +x ./dpkg-printer + +testpass 'dpkg config' 'i386' +testpass 'dpkg config' 'amd64' +testfail 'dpkg config' 'armel' + +echo '#! /bin/sh +echo "amd64 armel"' > ./dpkg-printer + +testpass 'dpkg config' 'armel' |