]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-sourceslist-arch-plusminus-options
randomize acquire order for same type index files
[apt.git] / test / integration / test-sourceslist-arch-plusminus-options
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6setupenvironment
7configarchitecture 'amd64'
8
9testbinaries() {
10 msgtest 'Test acquired archs for' "$1"
11 shift
12 rm -f gotarchs.list
13 aptget update --print-uris | grep -o '/binary-[a-z0-9-]\+/Packages' | sort > gotarchs.list
14 while [ -n "$1" ]; do
15 echo "/binary-${1}/Packages"
16 shift
17 done | sort | checkdiff - gotarchs.list && msgpass || msgfail
18}
19
20echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
21testbinaries 'default & native' 'amd64' 'all'
22configarchitecture 'amd64' 'i386'
23testbinaries 'default & native + foreign' 'amd64' 'i386' 'all'
24configarchitecture 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel'
25testbinaries 'default & native + many foreigns' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all'
26
27echo 'deb [arch=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
28testbinaries 'arch=native' 'amd64' 'all'
29
30echo 'deb [arch=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
31testbinaries 'arch=foreign' 'mips' 'all'
32
33echo 'deb [arch=kfreebsd-armel] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
34testbinaries 'arch=unknown' 'kfreebsd-armel' 'all'
35
36echo 'deb [arch=amd64,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
37testbinaries 'arch=native,foreign' 'amd64' 'i386' 'all'
38
39echo 'deb [arch=mips,armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
40testbinaries 'arch=foreign,foreign' 'mips' 'armhf' 'all'
41
42echo 'deb [arch=kfreebsd-armel,hurd-powerpc,mipsel,armel] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
43testbinaries 'arch=unknown,unknown,foreign,foreign' 'kfreebsd-armel' 'hurd-powerpc' 'mipsel' 'armel' 'all'
44
45echo 'deb [arch+=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
46testbinaries 'arch+=native' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all'
47
48echo 'deb [arch+=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
49testbinaries 'arch+=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all'
50
51echo 'deb [arch+=mips,armhf,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
52testbinaries 'arch+=foreign,foreign,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all'
53
54echo 'deb [arch+=hurd-powerpc] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
55testbinaries 'arch+=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc' 'all'
56
57echo 'deb [arch+=mips,hurd-powerpc,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
58testbinaries 'arch+=foreign,unknown,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc' 'all'
59
60echo 'deb [arch-=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
61testbinaries 'arch-=native' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all'
62
63echo 'deb [arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
64testbinaries 'arch-=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mipsel' 'all'
65
66echo 'deb [arch-=mips,armhf,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
67testbinaries 'arch-=foreign,foreign,foreign' 'amd64' 'armel' 'mipsel' 'all'
68
69echo 'deb [arch-=hurd-powerpc] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
70testbinaries 'arch-=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all'
71
72echo 'deb [arch-=mips,hurd-powerpc,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
73testbinaries 'arch-=foreign,unknown,foreign' 'amd64' 'armel' 'armhf' 'mipsel' 'all'
74
75echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
76testbinaries 'subtract from a arch-set' 'i386' 'all'
77
78echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
79testbinaries 'useless subtract from a arch-set' 'i386' 'all'
80
81echo 'deb [arch=mips,i386 arch+=armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
82testbinaries 'addition to a arch-set' 'i386' 'mips' 'armhf' 'all'
83
84echo 'deb [arch=mips,i386 arch+=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
85testbinaries 'useless addition to a arch-set' 'i386' 'mips' 'all'
86
87echo 'deb [arch=i386 arch-=all] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
88testbinaries 'substract all from arch-set' 'i386'
89
90echo 'deb [arch=i386 arch+=all] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
91testbinaries 'useless addition of all' 'i386' 'all'
92
93echo 'deb [arch=all] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list
94testbinaries 'explicit all' 'all'