summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-get-source-arch
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-12 21:39:44 +0100
committerMichael Vogt <mvo@debian.org>2013-12-12 21:46:09 +0100
commit81dca2d03ad4095c7aaa8b5f74885bc0e61b3ee3 (patch)
treedce43f02c0f8d61c413d98f559f4f3ef90d60876 /test/integration/test-apt-get-source-arch
parent49fc36e1acda8453df079cad8d04b70d9ad4fcfa (diff)
parent5669725a6163d3e1184c3991f993085e42734c33 (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: configure.ac debian/changelog doc/apt-verbatim.ent doc/po/apt-doc.pot po/ar.po po/ast.po po/bg.po po/bs.po po/ca.po po/cs.po po/cy.po po/da.po po/de.po po/dz.po po/el.po po/es.po po/eu.po po/fi.po po/fr.po po/gl.po po/hu.po po/it.po po/ja.po po/km.po po/ko.po po/ku.po po/lt.po po/mr.po po/nb.po po/ne.po po/nl.po po/nn.po po/pl.po po/pt.po po/pt_BR.po po/ro.po po/ru.po po/sk.po po/sl.po po/sv.po po/th.po po/tl.po po/tr.po po/uk.po po/vi.po po/zh_CN.po po/zh_TW.po
Diffstat (limited to 'test/integration/test-apt-get-source-arch')
-rwxr-xr-xtest/integration/test-apt-get-source-arch70
1 files changed, 70 insertions, 0 deletions
diff --git a/test/integration/test-apt-get-source-arch b/test/integration/test-apt-get-source-arch
new file mode 100755
index 000000000..d7ed56dc9
--- /dev/null
+++ b/test/integration/test-apt-get-source-arch
@@ -0,0 +1,70 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture "i386" "amd64"
+
+
+# different version for the individual arches
+insertpackage 'stable' 'foo' 'amd64' '1.0'
+insertsource 'stable' 'foo' 'amd64' '1.0'
+
+insertpackage 'stable' 'foo' 'i386' '1.0'
+insertsource 'stable' 'foo' 'i386' '1.0'
+insertpackage 'stable' 'foo' 'i386' '2.0'
+insertsource 'stable' 'foo' 'i386' '2.0'
+
+insertpackage 'oldstable' 'foo' 'i386' '0.1'
+insertsource 'oldstable' 'foo' 'i386' '0.1'
+# just needed so that there is a release file entry for the test
+insertpackage 'oldstable' 'unreleated' 'amd64' '0.1'
+
+setupaptarchive
+
+APTARCHIVE=$(readlink -f ./aptarchive)
+
+HEADER="Reading package lists...
+Building dependency tree..."
+
+# pick :amd64
+testequal "$HEADER
+Need to get 0 B of source archives.
+'file://${APTARCHIVE}/foo_1.0.dsc' foo_1.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
+'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo:amd64
+
+# pick :i386
+testequal "$HEADER
+Need to get 0 B of source archives.
+'file://${APTARCHIVE}/foo_2.0.dsc' foo_2.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
+'file://${APTARCHIVE}/foo_2.0.tar.gz' foo_2.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo:i386
+
+# pick :i386 by release
+testequal "$HEADER
+Selected version '0.1' (oldstable) for foo
+Need to get 0 B of source archives.
+'file://${APTARCHIVE}/foo_0.1.dsc' foo_0.1.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
+'file://${APTARCHIVE}/foo_0.1.tar.gz' foo_0.1.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo:i386/oldstable
+
+# pick :i386 by version
+testequal "$HEADER
+Need to get 0 B of source archives.
+'file://${APTARCHIVE}/foo_1.0.dsc' foo_1.0.dsc 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e
+'file://${APTARCHIVE}/foo_1.0.tar.gz' foo_1.0.tar.gz 0 MD5Sum:d41d8cd98f00b204e9800998ecf8427e" aptget source -q --print-uris foo:i386=1.0
+
+# error on unknown arch
+testequal "$HEADER
+E: Can not find a package for architecture 'not-a-available-arch'
+E: Unable to find a source package for foo:not-a-available-arch" aptget source -q --print-uris foo:not-a-available-arch
+
+# error on unavailable version for arch
+testequal "$HEADER
+E: Can not find a package 'foo:amd64' with version '2.0'
+E: Unable to find a source package for foo:amd64=2.0" aptget source -q --print-uris foo:amd64=2.0
+
+# error on unavailable release for arch
+testequal "$HEADER
+E: Can not find a package 'foo:amd64' with release 'oldstable'
+E: Unable to find a source package for foo:amd64/oldstable" aptget source -q --print-uris foo:amd64/oldstable