summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-03-10 11:43:02 +0100
committerJulian Andres Klode <jak@debian.org>2016-03-10 11:45:36 +0100
commite457c94165c9c4dfef8cea7c2f716700d1c84b3f (patch)
treeeba0b421c9279eea826ee7334929180992b70c27 /test/integration
parent0eb1cd52c8a92f6dc33efb80146d80856529ebea (diff)
Use native architecture instead of amd64 for build-dep-purge test
Using amd64 broke the test case on non-amd64 architectures. Query the native architecture from dpkg and use that instead. The definition of NATIVE is copied from the test test-architecture-specification-parsing.
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-bug-720597-build-dep-purge21
1 files changed, 12 insertions, 9 deletions
diff --git a/test/integration/test-bug-720597-build-dep-purge b/test/integration/test-bug-720597-build-dep-purge
index c62d54687..4b36989ee 100755
--- a/test/integration/test-bug-720597-build-dep-purge
+++ b/test/integration/test-bug-720597-build-dep-purge
@@ -4,16 +4,19 @@ set -e
TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
-configarchitecture 'amd64'
+
+# we need this construct here as it isn't really possible to fake native arch for dpkg-* tools
+NATIVE="$(command dpkg --print-architecture)"
+configarchitecture $NATIVE
insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
insertinstalledpackage 'pkga' 'all' '1'
-buildsimplenativepackage 'pkgb' 'amd64' '1' 'stable' 'Conflicts: pkga'
-buildsimplenativepackage 'pkgc' 'amd64' '1' 'stable' 'Build-Depends: pkgb'
+buildsimplenativepackage 'pkgb' "$NATIVE" '1' 'stable' 'Conflicts: pkga'
+buildsimplenativepackage 'pkgc' "$NATIVE" '1' 'stable' 'Build-Depends: pkgb'
setupaptarchive
-testsuccessequal 'Reading package lists...
+testsuccessequal "Reading package lists...
Reading package lists...
Building dependency tree...
The following packages will be REMOVED:
@@ -22,10 +25,10 @@ The following NEW packages will be installed:
pkgb
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Remv pkga [1]
-Inst pkgb (1 stable [amd64])
-Conf pkgb (1 stable [amd64])' aptget build-dep pkgc -s
+Inst pkgb (1 stable [$NATIVE])
+Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s
-testsuccessequal 'Reading package lists...
+testsuccessequal "Reading package lists...
Reading package lists...
Building dependency tree...
The following packages will be REMOVED:
@@ -34,8 +37,8 @@ The following NEW packages will be installed:
pkgb
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Purg pkga [1]
-Inst pkgb (1 stable [amd64])
-Conf pkgb (1 stable [amd64])' aptget build-dep pkgc -s --purge
+Inst pkgb (1 stable [$NATIVE])
+Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s --purge
testsuccessequal 'Reading package lists...
Building dependency tree...