diff options
author | Julian Andres Klode <jak@debian.org> | 2016-09-07 13:35:40 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-09-07 14:00:38 +0200 |
commit | 561a3557e7fa6c4ed693c3bb486d189a468a8080 (patch) | |
tree | 468a045e06219fe9ee0a5f674170becd154c562c /test | |
parent | c382e0dff11beb00632d67d9361831358a38e465 (diff) |
test: Always install dpkg into our tests, regardless of MA
Even if we only configure a single architecture, install dpkg, so
dpkg can assert multi arch correctly. This also has the nice side
effect of making single architecture and multiple architecture
test cases more uniform.
This fixes a regression from f878d3a862128bc1385616751ae1d78246b1bd01
("test: Assert multi-arch in the chroot").
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/framework | 12 | ||||
-rwxr-xr-x | test/integration/test-apt-cli-list | 2 | ||||
-rwxr-xr-x | test/integration/test-apt-move-and-forget-manual-sections | 6 | ||||
-rwxr-xr-x | test/integration/test-apt-update-nofallback | 3 | ||||
-rwxr-xr-x | test/integration/test-apt-update-rollback | 6 | ||||
-rwxr-xr-x | test/integration/test-bug-728500-tempdir | 3 | ||||
-rwxr-xr-x | test/integration/test-bug-753297-upgradable | 1 | ||||
-rwxr-xr-x | test/integration/test-external-installation-planner-protocol | 2 |
8 files changed, 20 insertions, 15 deletions
diff --git a/test/integration/framework b/test/integration/framework index c5b752e18..d5b68da84 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -534,13 +534,11 @@ configdpkg() { fi fi rm -f rootdir/etc/apt/apt.conf.d/00foreigndpkg - # if multi-arch make sure dpkg can detect itself as capable of it - if getarchitectures | grep -E -q '[^ ]+ [^ ]+'; then - if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then - # dpkg doesn't really check the version as long as it is fully installed, - # but just to be sure we choose one above the required version - insertinstalledpackage 'dpkg' "all" '1.16.2+fake' - fi + # make sure dpkg can detect itself as capable of it + if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then + # dpkg doesn't really check the version as long as it is fully installed, + # but just to be sure we choose one above the required version + insertinstalledpackage 'dpkg' "all" '1.16.2+fake' fi if dpkg --assert-multi-arch >/dev/null 2>&1 ; then local ARCHS="$(getarchitectures)" diff --git a/test/integration/test-apt-cli-list b/test/integration/test-apt-cli-list index ca6f86661..f87208a08 100755 --- a/test/integration/test-apt-cli-list +++ b/test/integration/test-apt-cli-list @@ -22,6 +22,7 @@ setupaptarchive testsuccessequal "Listing... bar/now 1.0 i386 [installed,local] baz/unstable 2.0 all [upgradable from: 0.1] +dpkg/now 1.16.2+fake all [installed,local] foo/unstable 1.0 all foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list @@ -38,6 +39,7 @@ foobar/unstable 2.0 i386 [upgradable from: 1.0]" apt list --upgradable testsuccessequal "Listing... bar/now 1.0 i386 [installed,local] baz/now 0.1 all [installed,upgradable to: 2.0] +dpkg/now 1.16.2+fake all [installed,local] foobar/now 1.0 i386 [installed,upgradable to: 2.0]" apt list --installed testsuccessequal "Listing... diff --git a/test/integration/test-apt-move-and-forget-manual-sections b/test/integration/test-apt-move-and-forget-manual-sections index 4617abab3..69a7d9f1d 100755 --- a/test/integration/test-apt-move-and-forget-manual-sections +++ b/test/integration/test-apt-move-and-forget-manual-sections @@ -15,17 +15,17 @@ buildsimplenativepackage 'libdef' 'native' '1' 'unstable' '' '' 'libs' setupaptarchive testmarkedauto -testmarkedmanual +testmarkedmanual 'dpkg' testsuccess aptget install libabc/stable -y testdpkginstalled 'libabc' testdpkgnotinstalled 'libdef' -testmarkedmanual 'libabc' +testmarkedmanual 'dpkg' 'libabc' testmarkedauto testsuccess aptget dist-upgrade -y testdpkginstalled 'libabc' 'libdef' testmarkedauto 'libabc' -testmarkedmanual 'libdef' +testmarkedmanual 'dpkg' 'libdef' diff --git a/test/integration/test-apt-update-nofallback b/test/integration/test-apt-update-nofallback index 60f329a4a..47adff33d 100755 --- a/test/integration/test-apt-update-nofallback +++ b/test/integration/test-apt-update-nofallback @@ -41,7 +41,8 @@ N: See apt-secure(8) manpage for repository creation and user configuration deta assert_repo_is_intact() { - testsuccessequal "foo/unstable 2.0 all" apt list -qq + testsuccessequal "dpkg/now 1.16.2+fake all [installed,local] +foo/unstable 2.0 all" apt list -qq testsuccess aptget install -y -s foo testfailure aptget install -y evil testsuccess aptget source foo --print-uris diff --git a/test/integration/test-apt-update-rollback b/test/integration/test-apt-update-rollback index f9c55bc91..b5471dc6c 100755 --- a/test/integration/test-apt-update-rollback +++ b/test/integration/test-apt-update-rollback @@ -39,7 +39,8 @@ start_with_good_inrelease() { create_fresh_archive testsuccess aptget update listcurrentlistsdirectory > lists.before - testsuccessequal 'old/unstable 1.0 all' apt list -qq + testsuccessequal 'dpkg/now 1.16.2+fake all [installed,local] +old/unstable 1.0 all' apt list -qq } test_inrelease_to_new_inrelease() { @@ -48,7 +49,8 @@ test_inrelease_to_new_inrelease() { add_new_package '+1hour' testsuccess aptget update -o Debug::Acquire::Transaction=1 - testsuccessequal 'new/unstable 1.0 all + testsuccessequal 'dpkg/now 1.16.2+fake all [installed,local] +new/unstable 1.0 all old/unstable 1.0 all' apt list -qq } diff --git a/test/integration/test-bug-728500-tempdir b/test/integration/test-bug-728500-tempdir index 7497ffcf8..37661d168 100755 --- a/test/integration/test-bug-728500-tempdir +++ b/test/integration/test-bug-728500-tempdir @@ -18,5 +18,6 @@ export TMPDIR=/does-not-exists testsuccess aptget update -o Debug::Acquire::gpg=1 unset TMPDIR -testsuccessequal 'coolstuff' aptcache pkgnames +testsuccessequal 'coolstuff +dpkg' aptcache pkgnames testsuccess ls rootdir/var/lib/apt/lists/*InRelease diff --git a/test/integration/test-bug-753297-upgradable b/test/integration/test-bug-753297-upgradable index f33a6591d..353728db0 100755 --- a/test/integration/test-bug-753297-upgradable +++ b/test/integration/test-bug-753297-upgradable @@ -31,4 +31,5 @@ N: There is 1 additional version. Please use the '-a' switch to see it" apt list testsuccessequal "Listing... bar/testing 2 all [upgradable from: 1] +dpkg/now 1.16.2+fake all [installed,local] foo/testing,now 1 all [installed]" apt list diff --git a/test/integration/test-external-installation-planner-protocol b/test/integration/test-external-installation-planner-protocol index 03b2c4831..1d9abc901 100755 --- a/test/integration/test-external-installation-planner-protocol +++ b/test/integration/test-external-installation-planner-protocol @@ -43,7 +43,7 @@ Remove: bar:amd64 Install: libfoo:amd64 foo:amd64 Planner: internal' head -n 6 "$EIPPLOG" aptinternalplanner < "$EIPPLOG" > planner.log || true -testsuccessequal 'Remove: 6 +testsuccessequal 'Remove: 7 Unpack: 2 Unpack: 4' grep -e '^Unpack:' -e '^Install:' -e '^Configure:' -e '^Remove:' planner.log |