Commit | Line | Data |
---|---|---|
3d1be93d DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
3abb6a6a DK |
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
5 | . "$TESTDIR/framework" | |
3d1be93d DK |
6 | setupenvironment |
7 | configarchitecture 'amd64' | |
8 | ||
9 | testbinaries() { | |
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 | ||
20 | echo 'deb http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 21 | testbinaries 'default & native' 'amd64' 'all' |
3d1be93d | 22 | configarchitecture 'amd64' 'i386' |
1dd20368 | 23 | testbinaries 'default & native + foreign' 'amd64' 'i386' 'all' |
3d1be93d | 24 | configarchitecture 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' |
1dd20368 | 25 | testbinaries 'default & native + many foreigns' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' |
3d1be93d DK |
26 | |
27 | echo 'deb [arch=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 28 | testbinaries 'arch=native' 'amd64' 'all' |
3d1be93d DK |
29 | |
30 | echo 'deb [arch=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 31 | testbinaries 'arch=foreign' 'mips' 'all' |
3d1be93d DK |
32 | |
33 | echo 'deb [arch=kfreebsd-armel] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 34 | testbinaries 'arch=unknown' 'kfreebsd-armel' 'all' |
3d1be93d DK |
35 | |
36 | echo 'deb [arch=amd64,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 37 | testbinaries 'arch=native,foreign' 'amd64' 'i386' 'all' |
3d1be93d DK |
38 | |
39 | echo 'deb [arch=mips,armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 40 | testbinaries 'arch=foreign,foreign' 'mips' 'armhf' 'all' |
3d1be93d DK |
41 | |
42 | echo 'deb [arch=kfreebsd-armel,hurd-powerpc,mipsel,armel] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 43 | testbinaries 'arch=unknown,unknown,foreign,foreign' 'kfreebsd-armel' 'hurd-powerpc' 'mipsel' 'armel' 'all' |
3d1be93d DK |
44 | |
45 | echo 'deb [arch+=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 46 | testbinaries 'arch+=native' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' |
3d1be93d DK |
47 | |
48 | echo 'deb [arch+=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 49 | testbinaries 'arch+=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' |
3d1be93d DK |
50 | |
51 | echo 'deb [arch+=mips,armhf,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 52 | testbinaries 'arch+=foreign,foreign,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' |
3d1be93d DK |
53 | |
54 | echo 'deb [arch+=hurd-powerpc] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 55 | testbinaries 'arch+=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc' 'all' |
3d1be93d DK |
56 | |
57 | echo 'deb [arch+=mips,hurd-powerpc,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 58 | testbinaries 'arch+=foreign,unknown,foreign' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'hurd-powerpc' 'all' |
3d1be93d DK |
59 | |
60 | echo 'deb [arch-=amd64] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 61 | testbinaries 'arch-=native' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' |
3d1be93d DK |
62 | |
63 | echo 'deb [arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 64 | testbinaries 'arch-=foreign' 'amd64' 'i386' 'armel' 'armhf' 'mipsel' 'all' |
3d1be93d DK |
65 | |
66 | echo 'deb [arch-=mips,armhf,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 67 | testbinaries 'arch-=foreign,foreign,foreign' 'amd64' 'armel' 'mipsel' 'all' |
3d1be93d DK |
68 | |
69 | echo 'deb [arch-=hurd-powerpc] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 70 | testbinaries 'arch-=unknown' 'amd64' 'i386' 'armel' 'armhf' 'mips' 'mipsel' 'all' |
3d1be93d DK |
71 | |
72 | echo 'deb [arch-=mips,hurd-powerpc,i386] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 73 | testbinaries 'arch-=foreign,unknown,foreign' 'amd64' 'armel' 'armhf' 'mipsel' 'all' |
3d1be93d DK |
74 | |
75 | echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
8d89cda7 | 76 | testbinaries 'subtract from a arch-set' 'i386' 'all' |
3d1be93d DK |
77 | |
78 | echo 'deb [arch=mips,i386 arch-=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 79 | testbinaries 'useless subtract from a arch-set' 'i386' 'all' |
3d1be93d DK |
80 | |
81 | echo 'deb [arch=mips,i386 arch+=armhf] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 | 82 | testbinaries 'addition to a arch-set' 'i386' 'mips' 'armhf' 'all' |
3d1be93d DK |
83 | |
84 | echo 'deb [arch=mips,i386 arch+=mips] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
1dd20368 DK |
85 | testbinaries 'useless addition to a arch-set' 'i386' 'mips' 'all' |
86 | ||
87 | echo 'deb [arch=i386 arch-=all] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
88 | testbinaries 'substract all from arch-set' 'i386' | |
89 | ||
90 | echo 'deb [arch=i386 arch+=all] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
91 | testbinaries 'useless addition of all' 'i386' 'all' | |
e8e5d464 DK |
92 | |
93 | echo 'deb [arch=all] http://example.org/debian stable rocks' > rootdir/etc/apt/sources.list | |
94 | testbinaries 'explicit all' 'all' |