]> git.saurik.com Git - apt.git/blame - test/integration/test-apt-get-source-arch
Fix the test suite again
[apt.git] / test / integration / test-apt-get-source-arch
CommitLineData
adf379e7
MV
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6
7setupenvironment
8configarchitecture "i386" "amd64"
9
10
11# different version for the individual arches
12insertpackage 'stable' 'foo' 'amd64' '1.0'
13insertsource 'stable' 'foo' 'amd64' '1.0'
14
15insertpackage 'stable' 'foo' 'i386' '1.0'
16insertsource 'stable' 'foo' 'i386' '1.0'
17insertpackage 'stable' 'foo' 'i386' '2.0'
18insertsource 'stable' 'foo' 'i386' '2.0'
19
20insertpackage 'oldstable' 'foo' 'i386' '0.1'
21insertsource 'oldstable' 'foo' 'i386' '0.1'
22# just needed so that there is a release file entry for the test
23insertpackage 'oldstable' 'unreleated' 'amd64' '0.1'
24
25setupaptarchive
26
27APTARCHIVE=$(readlink -f ./aptarchive)
28
29HEADER="Reading package lists...
30Building dependency tree..."
9d2a8a73
DK
31DOWNLOAD10="Need to get 0 B/25 B of source archives.
32'file://${APTARCHIVE}/foo_1.0.dsc' foo_1.0.dsc 11 MD5Sum:b998e085e36cf162e6a33c2801318fef
33'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 14 MD5Sum:d46b9a02af8487cbeb49165540c88184"
adf379e7
MV
34
35# pick :amd64
25b86db1 36testsuccessequal "$HEADER
9d2a8a73 37$DOWNLOAD10" aptget source -q --print-uris foo:amd64
adf379e7
MV
38
39# pick :i386
25b86db1 40testsuccessequal "$HEADER
9d2a8a73
DK
41Need to get 0 B/25 B of source archives.
42'file://${APTARCHIVE}/foo_2.0.dsc' foo_2.0.dsc 11 MD5Sum:c0de572c6f8aa576c8ff78c81132ed55
43'file://${APTARCHIVE}/foo_2.0.tar.gz' foo_2.0.tar.gz 14 MD5Sum:e10bb487c375b2b938d27bd31c2d1f5f" aptget source -q --print-uris foo:i386
adf379e7
MV
44
45# pick :i386 by release
25b86db1 46testsuccessequal "$HEADER
adf379e7 47Selected version '0.1' (oldstable) for foo
9d2a8a73
DK
48Need to get 0 B/25 B of source archives.
49'file://${APTARCHIVE}/foo_0.1.dsc' foo_0.1.dsc 11 MD5Sum:0811a4d85238056c613ea897f49f01af
50'file://${APTARCHIVE}/foo_0.1.tar.gz' foo_0.1.tar.gz 14 MD5Sum:fa1ecb7a1a53e8e6f6551ca7db888a61" aptget source -q --print-uris foo:i386/oldstable
adf379e7
MV
51
52# pick :i386 by version
25b86db1 53testsuccessequal "$HEADER
9d2a8a73 54$DOWNLOAD10" aptget source -q --print-uris foo:i386=1.0
adf379e7
MV
55
56# error on unknown arch
25b86db1 57testfailureequal "$HEADER
adf379e7
MV
58E: Can not find a package for architecture 'not-a-available-arch'
59E: Unable to find a source package for foo:not-a-available-arch" aptget source -q --print-uris foo:not-a-available-arch
37f45a57
MV
60
61# error on unavailable version for arch
25b86db1 62testfailureequal "$HEADER
c9829e07 63E: Can not find a package 'foo:amd64' with version '2.0'
37f45a57
MV
64E: Unable to find a source package for foo:amd64=2.0" aptget source -q --print-uris foo:amd64=2.0
65
25b86db1
DK
66# error on unavailable release for arch
67testfailureequal "$HEADER
c9829e07 68E: Can not find a package 'foo:amd64' with release 'oldstable'
37f45a57 69E: Unable to find a source package for foo:amd64/oldstable" aptget source -q --print-uris foo:amd64/oldstable