summaryrefslogtreecommitdiff
path: root/test/integration/test-sourceslist-arch-plusminus-options
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-07-24 22:06:18 +0200
committerMichael Vogt <mvo@debian.org>2013-07-24 22:06:18 +0200
commitf39daeb1f66b8910f91274055bf07c3d008cdc50 (patch)
tree9283950ebf8a3089b8b16b1d09c3aec8ecc5eb07 /test/integration/test-sourceslist-arch-plusminus-options
parent267275c59cc35704789a228c6e9b1464c4cabd74 (diff)
parentc7a629dd114c41a1244744e2f5085df2f505dc90 (diff)
Merge remote-tracking branch 'upstream/debian/sid'
Diffstat (limited to 'test/integration/test-sourceslist-arch-plusminus-options')
-rwxr-xr-xtest/integration/test-sourceslist-arch-plusminus-options85
1 files changed, 85 insertions, 0 deletions
diff --git a/test/integration/test-sourceslist-arch-plusminus-options b/test/integration/test-sourceslist-arch-plusminus-options
new file mode 100755
index 000000000..0d4d7448f
--- /dev/null
+++ b/test/integration/test-sourceslist-arch-plusminus-options
@@ -0,0 +1,85 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+testbinaries() {
+ msgtest 'Test acquired archs for' "$1"
+ shift
+ rm -f gotarchs.list
+ aptget update --print-uris | grep -o '/binary-[a-z0-9-]\+/Packages' | sort > gotarchs.list
+ while [ -n "$1" ]; do
+ echo "/binary-${1}/Packages"
+ shift
+ done | sort | checkdiff - gotarchs.list && msgpass || msgfail
+}
+
+echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'default & native' 'amd64'
+configarchitecture 'amd64' 'i386'
+testbinaries 'default & native + foreign' 'amd64' 'i386'
+configarchitecture 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel'
+testbinaries 'default & native + many foreigns' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel'
+
+echo 'deb [arch=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch=native' 'amd64'
+
+echo 'deb [arch=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch=foreign' 'mips'
+
+echo 'deb [arch=kfreebsd-armel] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch=unknown' 'kfreebsd-armel'
+
+echo 'deb [arch=amd64,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch=native,foreign' 'amd64' 'i386'
+
+echo 'deb [arch=mips,armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch=foreign,foreign' 'mips' 'armhf'
+
+echo 'deb [arch=kfreebsd-armel,hurd-powerpc,mipsel,armel] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch=unknown,unknown,foreign,foreign' 'kfreebsd-armel' 'hurd-powerpc' 'mipsel' 'armel'
+
+echo 'deb [arch+=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch+=native' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel'
+
+echo 'deb [arch+=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch+=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel'
+
+echo 'deb [arch+=mips,armhf,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch+=foreign,foreign,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel'
+
+echo 'deb [arch+=hurd-powerpc] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch+=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc'
+
+echo 'deb [arch+=mips,hurd-powerpc,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch+=foreign,unknown,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc'
+
+echo 'deb [arch-=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch-=native' 'i386' 'armel' 'armhf' 'mips' 'mipsel'
+
+echo 'deb [arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch-=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mipsel'
+
+echo 'deb [arch-=mips,armhf,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch-=foreign,foreign,foreign' 'amd64' 'armel' 'mipsel'
+
+echo 'deb [arch-=hurd-powerpc] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch-=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel'
+
+echo 'deb [arch-=mips,hurd-powerpc,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'arch-=foreign,unknown,foreign' 'amd64' 'armel' 'armhf' 'mipsel'
+
+echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'substract from a arch-set' 'i386'
+
+echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'useless substract from a arch-set' 'i386'
+
+echo 'deb [arch=mips,i386 arch+=armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'addition to a arch-set' 'i386' 'mips' 'armhf'
+
+echo 'deb [arch=mips,i386 arch+=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
+testbinaries 'useless addition to a arch-set' 'i386' 'mips'