diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/test-apt-cli-upgrade | 6 | ||||
-rwxr-xr-x | test/integration/test-apt-get-autoremove | 10 | ||||
-rwxr-xr-x | test/integration/test-apt-get-download | 14 | ||||
-rwxr-xr-x | test/integration/test-architecture-specification-parsing | 82 | ||||
-rwxr-xr-x | test/integration/test-pdiff-usage | 28 | ||||
-rwxr-xr-x | test/integration/test-very-tight-loop-configure-with-unpacking-new-packages | 29 |
6 files changed, 103 insertions, 66 deletions
diff --git a/test/integration/test-apt-cli-upgrade b/test/integration/test-apt-cli-upgrade index 163a55576..21ce69413 100755 --- a/test/integration/test-apt-cli-upgrade +++ b/test/integration/test-apt-cli-upgrade @@ -16,8 +16,7 @@ setupaptarchive APTARCHIVE=$(readlink -f ./aptarchive) # default is to allow new dependencies -testequal "Calculating upgrade... Done -The following NEW packages will be installed: +testequal "The following NEW packages will be installed: foo-new-dependency The following packages will be upgraded: foo @@ -28,7 +27,6 @@ Conf foo-new-dependency (2.0 unstable [all]) Conf foo (2.0 unstable [all])" apt upgrade -qq -s # ensure -testequal "Calculating upgrade... Done -The following packages have been kept back: +testequal "The following packages have been kept back: foo 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded." apt upgrade -qq -s --no-new-pkgs diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove index 68ea1c574..acde4b096 100755 --- a/test/integration/test-apt-get-autoremove +++ b/test/integration/test-apt-get-autoremove @@ -42,12 +42,12 @@ testsuccess aptget autoremove -y testdpkgnotinstalled 'po-debconf' testmarkedauto -sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -testfileequal 'rootdir/var/log/apt/history.log' ' -Install: unrelated:i386 (1), debhelper:i386 (8.0.0), po-debconf:i386 (1.0.16, automatic) - +sed rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d' -e 's#), #)\nInstall: #g' | sort -u > apt-history.log +testfileequal 'apt-history.log' ' +Install: debhelper:i386 (8.0.0) +Install: po-debconf:i386 (1.0.16, automatic) +Install: unrelated:i386 (1) Remove: debhelper:i386 (8.0.0) - Remove: po-debconf:i386 (1.0.16)' testsuccess aptget install debhelper -y diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download index c2a5c3d8e..be3144e1f 100755 --- a/test/integration/test-apt-get-download +++ b/test/integration/test-apt-get-download @@ -34,8 +34,14 @@ testequal "'file://${DEBFILE}' apt_2.0_all.deb $(stat -c%s $DEBFILE) SHA512:$(sh # deb:677887 testequal "E: Can't find a source to download version '1.0' of 'vrms:i386'" aptget download vrms -# deb:736962 - apt-get download foo && -aptget download apt -aptget download apt +# deb:736962 +testsuccess aptget download apt +testsuccess aptget download apt testsuccess test -s apt_2.0_all.deb -rm -f apt_1.0_all.deb + +rm -f apt_1.0_all.deb apt_2.0_all.deb + +# deb:738103 +testsuccess aptget download apt apt apt/unstable apt=2.0 +testsuccess test -s apt_2.0_all.deb + diff --git a/test/integration/test-architecture-specification-parsing b/test/integration/test-architecture-specification-parsing index 2741509a7..a43354871 100755 --- a/test/integration/test-architecture-specification-parsing +++ b/test/integration/test-architecture-specification-parsing @@ -4,102 +4,106 @@ set -e TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture 'amd64' 'armel' -buildsimplenativepackage 'pkg-arch-foo' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !amd64] -Depends: foo [amd64 !amd64]' -buildsimplenativepackage 'pkg-arch-no-foo' 'amd64' '1.0' 'stable' 'Build-Depends: foo [!amd64 amd64] -Depends: foo [!amd64 amd64]' -buildsimplenativepackage 'pkg-arch-foo-unrelated-no' 'amd64' '1.0' 'stable' 'Build-Depends: foo [!kfreebsd-any amd64] -Depends: foo [!kfreebsd-any amd64]' -buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !kfreebsd-any] -Depends: foo [amd64 !kfreebsd-any]' -buildsimplenativepackage 'no-depends' 'armel' '1.0' 'stable' 'Build-Depends: foo [armhf], bar [arm] -Depends: foo [armhf], bar [arm]' +# 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}" 'armel' + +buildsimplenativepackage 'pkg-arch-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !${NATIVE}] +Depends: foo [${NATIVE} !${NATIVE}]" +buildsimplenativepackage 'pkg-arch-no-foo' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!${NATIVE} ${NATIVE}] +Depends: foo [!${NATIVE} ${NATIVE}]" +buildsimplenativepackage 'pkg-arch-foo-unrelated-no' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [!kfreebsd-any ${NATIVE}] +Depends: foo [!kfreebsd-any ${NATIVE}]" +buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' "$NATIVE" '1.0' 'stable' "Build-Depends: foo [${NATIVE} !kfreebsd-any] +Depends: foo [${NATIVE} !kfreebsd-any]" +buildsimplenativepackage 'no-depends' 'armel' '1.0' 'stable' 'Build-Depends: foo [armeb], bar [arm] +Depends: foo [armeb], bar [arm]' -buildsimplenativepackage 'foo' 'amd64' '1.0' 'stable' +buildsimplenativepackage 'foo' "$NATIVE" '1.0' 'stable' insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign' setupaptarchive -testequal 'Reading package lists... +testequal "Reading package lists... Building dependency tree... The following extra packages will be installed: foo The following NEW packages will be installed: foo pkg-arch-foo 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. -Inst foo (1.0 stable [amd64]) -Inst pkg-arch-foo (1.0 stable [amd64]) -Conf foo (1.0 stable [amd64]) -Conf pkg-arch-foo (1.0 stable [amd64])' aptget install pkg-arch-foo -s +Inst foo (1.0 stable [${NATIVE}]) +Inst pkg-arch-foo (1.0 stable [${NATIVE}]) +Conf foo (1.0 stable [${NATIVE}]) +Conf pkg-arch-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo -s -testequal 'Reading package lists... +testequal "Reading package lists... Building dependency tree... The following NEW packages will be installed: pkg-arch-no-foo 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst pkg-arch-no-foo (1.0 stable [amd64]) -Conf pkg-arch-no-foo (1.0 stable [amd64])' aptget install pkg-arch-no-foo -s +Inst pkg-arch-no-foo (1.0 stable [${NATIVE}]) +Conf pkg-arch-no-foo (1.0 stable [${NATIVE}])" aptget install pkg-arch-no-foo -s -testequal 'Reading package lists... +testequal "Reading package lists... Building dependency tree... The following extra packages will be installed: foo The following NEW packages will be installed: foo pkg-arch-foo-unrelated-no 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. -Inst foo (1.0 stable [amd64]) -Inst pkg-arch-foo-unrelated-no (1.0 stable [amd64]) -Conf foo (1.0 stable [amd64]) -Conf pkg-arch-foo-unrelated-no (1.0 stable [amd64])' aptget install pkg-arch-foo-unrelated-no -s +Inst foo (1.0 stable [${NATIVE}]) +Inst pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}]) +Conf foo (1.0 stable [${NATIVE}]) +Conf pkg-arch-foo-unrelated-no (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no -s -testequal 'Reading package lists... +testequal "Reading package lists... Building dependency tree... The following extra packages will be installed: foo The following NEW packages will be installed: foo pkg-arch-foo-unrelated-no2 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. -Inst foo (1.0 stable [amd64]) -Inst pkg-arch-foo-unrelated-no2 (1.0 stable [amd64]) -Conf foo (1.0 stable [amd64]) -Conf pkg-arch-foo-unrelated-no2 (1.0 stable [amd64])' aptget install pkg-arch-foo-unrelated-no2 -s +Inst foo (1.0 stable [${NATIVE}]) +Inst pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}]) +Conf foo (1.0 stable [${NATIVE}]) +Conf pkg-arch-foo-unrelated-no2 (1.0 stable [${NATIVE}])" aptget install pkg-arch-foo-unrelated-no2 -s -testequal 'Reading package lists... +testequal "Reading package lists... Building dependency tree... The following NEW packages will be installed: foo 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst foo (1.0 stable [amd64]) -Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo -s +Inst foo (1.0 stable [${NATIVE}]) +Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo -s testequal 'Reading package lists... Building dependency tree... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s -testequal 'Reading package lists... +testequal "Reading package lists... Building dependency tree... The following NEW packages will be installed: foo 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst foo (1.0 stable [amd64]) -Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo-unrelated-no -s +Inst foo (1.0 stable [${NATIVE}]) +Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no -s -testequal 'Reading package lists... +testequal "Reading package lists... Building dependency tree... The following NEW packages will be installed: foo 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst foo (1.0 stable [amd64]) -Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo-unrelated-no2 -s +Inst foo (1.0 stable [${NATIVE}]) +Conf foo (1.0 stable [${NATIVE}])" aptget build-dep pkg-arch-foo-unrelated-no2 -s testequal 'Reading package lists... Building dependency tree... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep no-depends -s # this is not really testing APT - more that dpkg is in line with us +configarchitecture 'amd64' 'armel' testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index ad31511b9..afe1ad443 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -31,6 +31,16 @@ wasmergeused() { msgfail fi + msgtest 'No intermediate patch files' 'still exist' + local EDS="$(find rootdir/var/lib/apt/lists -name '*.ed' -o -name '*.ed.*')" + if [ -z "$EDS" ]; then + msgpass + else + echo + echo "$EDS" + msgfail + fi + msgtest 'Check if the right pdiff merger was used' if grep -q '^pkgAcqIndexMergeDiffs::Done(): rred' $OUTPUT; then if echo "$*" | grep -q -- '-o Acquire::PDiffs::Merge=1'; then @@ -46,7 +56,7 @@ wasmergeused() { } testrun() { - # setup the base + msgmsg "Testcase: setup the base with: $*" find aptarchive -name 'Packages*' -type f -delete cp ${PKGFILE} aptarchive/Packages compressfile 'aptarchive/Packages' @@ -59,7 +69,7 @@ testrun() { testequal "$(cat ${PKGFILE}) " aptcache show apt oldstuff - msgmsg 'Testcase: apply with one patch' + msgmsg "Testcase: apply with one patch: $*" cp ${PKGFILE}-new aptarchive/Packages compressfile 'aptarchive/Packages' mkdir -p aptarchive/Packages.diff @@ -82,13 +92,13 @@ SHA1-Patches: testequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff - msgmsg 'Testcase: index is already up-to-date' + msgmsg "Testcase: index is already up-to-date: $*" find rootdir/var/lib/apt/lists -name '*.IndexDiff' -type f -delete testsuccess aptget update "$@" testequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff - msgmsg 'Testcase: apply with two patches' + msgmsg "Testcase: apply with two patches: $*" cp ${PKGFILE}-new aptarchive/Packages echo ' Package: futurestuff @@ -129,7 +139,7 @@ SHA1-Patches: testequal "$(cat Packages-future) " aptcache show apt newstuff futurestuff - msgmsg 'Testcase: patch applying fails, but successful fallback' + msgmsg "Testcase: patch applying fails, but successful fallback: $*" rm -rf rootdir/var/lib/apt/lists cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists cp ${PKGFILE}-new aptarchive/Packages @@ -154,6 +164,10 @@ SHA1-Patches: testequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff } +echo 'Debug::pkgAcquire::Diffs "true"; +Debug::pkgAcquire::rred "true";' > rootdir/etc/apt/apt.conf.d/rreddebug.conf -testrun -o Debug::pkgAcquire::Diffs=1 -o Debug::pkgAcquire::rred=1 -o Acquire::PDiffs::Merge=0 -testrun -o Debug::pkgAcquire::Diffs=1 -o Debug::pkgAcquire::rred=1 -o Acquire::PDiffs::Merge=1 +testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 +testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1 +testrun -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=0 +testrun -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=0 diff --git a/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages b/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages index 7f3b05e59..5856cd744 100755 --- a/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages +++ b/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages @@ -15,19 +15,18 @@ Breaks: libreoffice-core (>= 3+), libreoffice-core (<= 3~), libreoffice-style-ga insertinstalledpackage 'libreoffice-style-galaxy' 'amd64' '3' 'Depends: libreoffice-core Provides: libreoffice-style' -buildsimplenativepackage 'libreoffice' 'amd64' '4' 'sid' 'Depends: libreoffice-core (= 4)' -buildsimplenativepackage 'libreoffice-core' 'amd64' '4' 'sid' 'Depends: libreoffice-common (>= 4) +insertpackage 'sid' 'libreoffice' 'amd64' '4' 'Depends: libreoffice-core (= 4)' +insertpackage 'sid' 'libreoffice-core' 'amd64' '4' 'Depends: libreoffice-common (>= 4) Breaks: libreoffice-common (<< 4), libreoffice-style-galaxy (<< 4)' -buildsimplenativepackage 'libreoffice-common' 'all' '4' 'sid' 'Depends: libreoffice-style, ure +insertpackage 'sid' 'libreoffice-common' 'all' '4' 'Depends: libreoffice-style, ure Breaks: libreoffice-core (>= 4+), libreoffice-core (<= 4~), libreoffice-style-galaxy (>= 4+), libreoffice-style-galaxy (<= 4~)' -buildsimplenativepackage 'libreoffice-style-galaxy' 'amd64' '4' 'sid' 'Depends: libreoffice-core +insertpackage 'sid' 'libreoffice-style-galaxy' 'amd64' '4' 'Depends: libreoffice-core Provides: libreoffice-style' - -buildsimplenativepackage 'ure' 'amd64' '4' 'sid' +insertpackage 'sid' 'ure' 'amd64' '4' setupaptarchive -testequal 'Reading package lists... +testequalor2 'Reading package lists... Building dependency tree... The following NEW packages will be installed: ure @@ -43,4 +42,20 @@ Conf ure (4 sid [amd64]) Conf libreoffice-style-galaxy (4 sid [amd64]) Conf libreoffice-common (4 sid [all]) Conf libreoffice-core (4 sid [amd64]) +Conf libreoffice (4 sid [amd64])' 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + ure +The following packages will be upgraded: + libreoffice libreoffice-common libreoffice-core libreoffice-style-galaxy +4 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst libreoffice [3] (4 sid [amd64]) [] +Inst libreoffice-style-galaxy [3] (4 sid [amd64]) [libreoffice-common:amd64 on libreoffice-style-galaxy:amd64] [libreoffice-common:amd64 ] +Inst libreoffice-core [3] (4 sid [amd64]) [libreoffice-common:amd64 on libreoffice-core:amd64] [libreoffice-common:amd64 on libreoffice-style-galaxy:amd64] [libreoffice-core:amd64 on libreoffice-common:amd64] [libreoffice-common:amd64 ] +Inst libreoffice-common [3] (4 sid [all]) [] +Inst ure (4 sid [amd64]) +Conf ure (4 sid [amd64]) +Conf libreoffice-style-galaxy (4 sid [amd64]) +Conf libreoffice-common (4 sid [all]) +Conf libreoffice-core (4 sid [amd64]) Conf libreoffice (4 sid [amd64])' aptget dist-upgrade -s |