From 8f418981337503ff7abedd872f788b51bcdbc886 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 22 Apr 2014 16:07:32 +0200 Subject: show upgradable packages after apt update Closes: 748389 --- test/integration/test-apt-cli-update | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 test/integration/test-apt-cli-update (limited to 'test') diff --git a/test/integration/test-apt-cli-update b/test/integration/test-apt-cli-update new file mode 100755 index 000000000..8237bf03f --- /dev/null +++ b/test/integration/test-apt-cli-update @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +insertpackage 'unstable' 'foo' 'all' '2.0' +insertinstalledpackage 'foo' 'all' '1.0' + +setupaptarchive + +APTARCHIVE=$(readlink -f ./aptarchive) + +testequal "1 package can be upgraded. Run 'apt list --upgradable' to see it." apt update -q -- cgit v1.2.3 From 28ba3f89659afe95fee4175d802febf895dc15a4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 May 2014 09:24:58 +0200 Subject: Fix uninitialized value Reported-By: scan-build --- test/libapt/cdrom_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/libapt/cdrom_test.cc b/test/libapt/cdrom_test.cc index 626ef538e..5cf3b353c 100644 --- a/test/libapt/cdrom_test.cc +++ b/test/libapt/cdrom_test.cc @@ -91,7 +91,7 @@ TEST(CDROMTest,ReduceSourcelist) } TEST(CDROMTest, FindMountPointForDevice) { - char * tempfile; + char * tempfile = NULL; FileFd fd; createTemporaryFile("mountpoints", fd, &tempfile, "rootfs / rootfs rw 0 0\n" -- cgit v1.2.3 From e1a69e71efc0679815f722480169f16bf02622ab Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 12 May 2014 21:25:43 +0200 Subject: (try to) fix travis-ci build failures dpkg on Ubuntu 12.04 does not seem to support parsing arch-specific dependencies, so we try to detect if we face such a dpkg in the test. In the other test the order depends on libdb, which changes per arch, so we just run it through our sorting binary and be happy (hopefully). Git-Dch: Ignore --- test/integration/framework | 3 ++- test/integration/test-apt-ftparchive-src-cachedb | 10 +++++----- test/integration/test-bug-747261-arch-specific-conflicts | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index eda3cebad..4f0a69994 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -36,7 +36,7 @@ msgndebug() { echo -n "${CDEBUG}D: $1${CNORMAL}"; } msgtest() { while [ -n "$1" ]; do echo -n "${CINFO}$1${CCMD} " - echo -n "$(echo "$2" | sed -e 's/^aptc/apt-c/' -e 's/^aptg/apt-g/' -e 's/^aptf/apt-f/')${CINFO} " + echo -n "$(echo "$2" | sed -e 's#^apt\([cgfs]\)#apt-\1#')${CINFO} " shift if [ -n "$1" ]; then shift; else break; fi done @@ -114,6 +114,7 @@ aptget() { runapt apt-get "$@"; } aptftparchive() { runapt apt-ftparchive "$@"; } aptkey() { runapt apt-key "$@"; } aptmark() { runapt apt-mark "$@"; } +aptsortpkgs() { runapt apt-sortpkgs "$@"; } apt() { runapt apt "$@"; } apthelper() { runapt "${APTHELPERBINDIR}/apt-helper" "$@"; } aptwebserver() { runapt "${APTWEBSERVERBINDIR}/aptwebserver" "$@"; } diff --git a/test/integration/test-apt-ftparchive-src-cachedb b/test/integration/test-apt-ftparchive-src-cachedb index 1af193632..adcca6217 100755 --- a/test/integration/test-apt-ftparchive-src-cachedb +++ b/test/integration/test-apt-ftparchive-src-cachedb @@ -3,9 +3,9 @@ set -e assert_correct_sources_file() { testequal "Package: bar -Binary: bar -Version: 1.0 Architecture: all +Version: 1.0 +Binary: bar Format: 3.0 (native) Directory: pool/main Files: @@ -24,9 +24,9 @@ Checksums-Sha512: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e 0 bar_1.0.tar.gz Package: foo -Binary: foo -Version: 1.0 Architecture: all +Version: 1.0 +Binary: foo Format: 3.0 (native) Directory: pool/main Files: @@ -43,7 +43,7 @@ Checksums-Sha256: Checksums-Sha512: 3da0240fd764657c2f3661b4d750578a9a99b0580591b133756379d48117ebda87a5ed2467f513200d6e7eaf51422cbe91c15720eef7fb4bba2cc8ff81ebc547 171 foo_1.0.dsc cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e 0 foo_1.0.tar.gz -" cat ./aptarchive/dists/test/main/source/Sources +" aptsortpkgs ./aptarchive/dists/test/main/source/Sources } create_source_files() { diff --git a/test/integration/test-bug-747261-arch-specific-conflicts b/test/integration/test-bug-747261-arch-specific-conflicts index bfb2d089f..be971b89e 100755 --- a/test/integration/test-bug-747261-arch-specific-conflicts +++ b/test/integration/test-bug-747261-arch-specific-conflicts @@ -6,6 +6,21 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture 'amd64' 'sparc' 'armel' +msgtest 'Check that dpkg supports' 'arch-specific dependencies' +set +e +# this fails always, the question is just how it fails +dpkg-checkbuilddeps -d 'foobar:barfoo' /dev/null 2>/dev/null >/dev/null +RETURNCODE=$? +set -e +if [ "$RETURNCODE" != '1' ]; then + dpkg-checkbuilddeps -d 'foobar:barfoo' /dev/null || true + echo "Command had returncode: $RETURNCODE" + msgskip + exit 0 +else + msgpass +fi + buildsimplenativepackage 'libc6' 'amd64,sparc,armel' '1' 'stable' 'Multi-Arch: same' buildsimplenativepackage 'libc6-i386' 'amd64' '1' 'stable' 'Conflicts: libc6:sparc' -- cgit v1.2.3 From 1f6cf9e79742ea8e328ef2225b2f5217a9440216 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 30 May 2014 18:01:47 +0200 Subject: support parsing EDSP requests Architecture{,s} stanza Adds also a small testcase for EDSP Git-Dch: Ignore --- test/integration/framework | 6 ++ .../test-external-dependency-solver-protocol | 65 ++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100755 test/integration/test-external-dependency-solver-protocol (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 4f0a69994..7959699fd 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -194,6 +194,12 @@ setupenvironment() { touch var/lib/dpkg/available mkdir -p usr/lib/apt ln -s ${METHODSDIR} usr/lib/apt/methods + if [ "$BUILDDIRECTORY" = "$LIBRARYPATH" ]; then + mkdir -p usr/lib/apt/solvers + ln -s "${BUILDDIRECTORY}/apt-dump-solver" usr/lib/apt/solvers/dump + ln -s "${BUILDDIRECTORY}/apt-internal-solver" usr/lib/apt/solvers/apt + echo "Dir::Bin::Solvers \"${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/solvers\";" > etc/apt/apt.conf.d/externalsolver.conf + fi # use the autoremove from the BUILDDIRECTORY if its there, otherwise # system if [ -e ${BUILDDIRECTORY}/../../debian/apt.conf.autoremove ]; then diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol new file mode 100755 index 000000000..129565993 --- /dev/null +++ b/test/integration/test-external-dependency-solver-protocol @@ -0,0 +1,65 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertinstalledpackage 'cool' 'all' '1' +insertinstalledpackage 'stuff' 'all' '1' + +insertpackage 'unstable' 'cool' 'all' '2' 'Multi-Arch: foreign' +insertpackage 'unstable' 'stuff' 'all' '2' 'Multi-Arch: foreign' +insertpackage 'unstable' 'coolstuff' 'i386,amd64' '2' 'Depends: cool, stuff' +insertpackage 'unstable' 'awesome' 'all' '2' 'Multi-Arch: foreign' +insertpackage 'unstable' 'awesomecoolstuff' 'i386' '2' 'Depends: coolstuff, awesome' + +insertpackage 'experimental' 'cool' 'all' '3' 'Multi-Arch: foreign' +insertpackage 'experimental' 'stuff' 'all' '3' 'Multi-Arch: foreign' +insertpackage 'experimental' 'coolstuff' 'i386,amd64' '3' 'Depends: cool, stuff' + +setupaptarchive + +rm -f /tmp/dump.edsp +testequal 'Reading package lists... +Building dependency tree... +Execute external solver... +The solver encountered an error of type: ERR_JUST_DUMPING +The following information might help you to understand what is wrong: +I am too dumb, i can just dump! +Please use one of my friends instead! + +E: External solver failed with: I am too dumb, i can just dump!' aptget install --solver dump coolstuff -s +testsuccess test -s /tmp/dump.edsp +rm -f /tmp/dump.edsp + +#FIXME: this should be unstable, but we don't support pinning yet +testequal 'Reading package lists... +Building dependency tree... +Execute external solver... +The following NEW packages will be installed: + coolstuff +0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. +Inst coolstuff (3 experimental [amd64]) +Conf coolstuff (3 experimental [amd64])' aptget install --solver apt coolstuff -s + +testsuccess aptget install awesomecoolstuff:i386 -s +testsuccess aptget install --solver apt awesomecoolstuff:i386 -s + +rm -f /tmp/dump.edsp +testfailure aptget install --solver dump awesomecoolstuff:i386 -s +testsuccess test -s /tmp/dump.edsp + +configarchitecture 'armel' +msgtest 'Test direct calling is okay for' 'apt-internal-solver' +cat /tmp/dump.edsp | runapt apt-internal-solver > solver.result 2>&1 || true +if [ "$(tail -n2 solver.result | head -n1 )" = "Message: Done" ]; then + msgpass +else + cat solver.result + msgfail +fi +rm -f /tmp/dump.edsp + +testfailure aptget install --solver apt awesomecoolstuff:i386 -s -- cgit v1.2.3 From 91a6f32eec508465e7ffafa6b3fef3bb59c719c0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 30 May 2014 19:18:25 +0200 Subject: show current/total testcase statistic also in concise mode Git-Dch: Ignore --- test/integration/run-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/run-tests b/test/integration/run-tests index d700cc3fc..d39daeee5 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -39,7 +39,7 @@ fi TOTAL="$(run-parts --list $DIR | grep '/test-' | wc -l)" for testcase in $(run-parts --list $DIR | grep '/test-'); do if [ "$MSGLEVEL" -le 2 ]; then - echo -n "${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: " + echo -n "($(($ALL+1))/${TOTAL}) ${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: " else echo "${CTEST}Run Testcase ($(($ALL+1))/${TOTAL}) ${CHIGH}$(basename ${testcase})${CRESET}" fi -- cgit v1.2.3 From d91e3cfa1992599c088673ef68bcdfd4d0aedc85 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 30 May 2014 23:15:28 +0200 Subject: use 'native' instead of 'amd64' as pkg arch Git-Dch: Ignore --- test/integration/test-essential-force-loopbreak | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/integration/test-essential-force-loopbreak b/test/integration/test-essential-force-loopbreak index 842dce61c..d60c6cbd5 100755 --- a/test/integration/test-essential-force-loopbreak +++ b/test/integration/test-essential-force-loopbreak @@ -5,18 +5,18 @@ TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configarchitecture 'amd64' +configarchitecture 'native' -insertinstalledpackage 'sysvinit' 'amd64' '1' 'Essential: yes' +insertinstalledpackage 'sysvinit' 'native' '1' 'Essential: yes' -buildsimplenativepackage 'sysvinit' 'amd64' '2' 'sid' 'Pre-Depends: sysvinit-core | systemd-sysv +buildsimplenativepackage 'sysvinit' 'native' '2' 'sid' 'Pre-Depends: sysvinit-core | systemd-sysv Essential: yes' -buildsimplenativepackage 'sysvinit-core' 'amd64' '2' 'sid' +buildsimplenativepackage 'sysvinit-core' 'native' '2' 'sid' -buildsimplenativepackage 'systemd-sysv' 'amd64' '2~conflict' 'sid-conflict' 'Conflicts: sysvinit (<< 2) +buildsimplenativepackage 'systemd-sysv' 'native' '2~conflict' 'sid-conflict' 'Conflicts: sysvinit (<< 2) Breaks: sysvinit-core' -buildsimplenativepackage 'systemd-sysv' 'amd64' '2~break' 'sid-break' 'Breaks: sysvinit (<< 2), sysvinit-core' +buildsimplenativepackage 'systemd-sysv' 'native' '2~break' 'sid-break' 'Breaks: sysvinit (<< 2), sysvinit-core' setupaptarchive @@ -25,7 +25,7 @@ cp -a rootdir/var/lib/dpkg/status dpkg.status.backup testforcebreak() { cp -a dpkg.status.backup rootdir/var/lib/dpkg/status rm -f rootdir/var/lib/apt/extended_states - testequal 'Reading package lists... + testequal "Reading package lists... Building dependency tree... The following extra packages will be installed: sysvinit @@ -34,8 +34,8 @@ The following NEW packages will be installed: The following packages will be upgraded: sysvinit 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -E: This installation run will require temporarily removing the essential package sysvinit:amd64 due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option. -E: Internal Error, Could not early remove sysvinit:amd64 (2)' aptget install systemd-sysv -t "$1" -s +E: This installation run will require temporarily removing the essential package sysvinit:$(getarchitecture 'native') due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option. +E: Internal Error, Could not early remove sysvinit:amd64 (2)" aptget install systemd-sysv -t "$1" -s # ensure that really nothing happens testfailure aptget install systemd-sysv -y -t "$1" -o Debug::pkgPackageManager=1 testdpkginstalled 'sysvinit' -- cgit v1.2.3 From a3f1d60cb75ab83f63a52a43c056a4752c8fdeb2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 30 May 2014 14:47:56 +0200 Subject: Show unauthenticated warning for source packages as well This will show the same unauthenticated warning for source packages as for binary packages and will not download a source package if it is unauthenticated. This can be overridden with --allow-unauthenticated Closes: #749795 --- test/integration/test-apt-get-source-authenticated | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 test/integration/test-apt-get-source-authenticated (limited to 'test') diff --git a/test/integration/test-apt-get-source-authenticated b/test/integration/test-apt-get-source-authenticated new file mode 100755 index 000000000..2cee13923 --- /dev/null +++ b/test/integration/test-apt-get-source-authenticated @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Regression test for debian bug #749795. Ensure that we fail with +# a error if apt-get source foo will download a source that comes +# from a unauthenticated repository +# +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture "i386" + +# a "normal" package with source and binary +buildsimplenativepackage 'foo' 'all' '2.0' + +setupaptarchive --no-update + +APTARCHIVE=$(readlink -f ./aptarchive) +rm -f $APTARCHIVE/dists/unstable/*Release* + +# update without authenticated InRelease file +testsuccess aptget update + +# this all should fail +testfailure aptget install -y foo +testfailure aptget source foo + +# allow overriding the warning +testsuccess aptget source --allow-unauthenticated foo -- cgit v1.2.3 From 243b2a381f4a12939d91084ecf100ee6d3dcb007 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 4 Jun 2014 12:39:36 +0200 Subject: Add compat mode for old (32bit FileSize) CacheDB (LP: #1274466) --- test/integration/cachedb-lp1274466-old-format.db | Bin 0 -> 8192 bytes test/integration/deb-lp1274466-cachedb.deb | Bin 0 -> 1270 bytes .../test-apt-ftparchive-cachedb-lp1274466 | 51 +++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 test/integration/cachedb-lp1274466-old-format.db create mode 100644 test/integration/deb-lp1274466-cachedb.deb create mode 100755 test/integration/test-apt-ftparchive-cachedb-lp1274466 (limited to 'test') diff --git a/test/integration/cachedb-lp1274466-old-format.db b/test/integration/cachedb-lp1274466-old-format.db new file mode 100644 index 000000000..88da5f1ee Binary files /dev/null and b/test/integration/cachedb-lp1274466-old-format.db differ diff --git a/test/integration/deb-lp1274466-cachedb.deb b/test/integration/deb-lp1274466-cachedb.deb new file mode 100644 index 000000000..43d7ee6f1 Binary files /dev/null and b/test/integration/deb-lp1274466-cachedb.deb differ diff --git a/test/integration/test-apt-ftparchive-cachedb-lp1274466 b/test/integration/test-apt-ftparchive-cachedb-lp1274466 new file mode 100755 index 000000000..211740a53 --- /dev/null +++ b/test/integration/test-apt-ftparchive-cachedb-lp1274466 @@ -0,0 +1,51 @@ +#!/bin/sh +set -e + + +# +# main() +# +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture "i386" + +# gather the db and the deb, ensure mtime is not modfied as its saved in the DB +cp -p $TESTDIR/deb-lp1274466-cachedb.deb foo_1_i386.deb +cp $TESTDIR/cachedb-lp1274466-old-format.db old-format.db + +# verify that the format is different +testsuccess aptftparchive --db new-format.db packages . +db_dump new-format.db > new-format.dump +db_dump old-format.db > old-format.dump +testfailure diff -u old-format.dump new-format.dump + +# ensure the new format as the sha512 +testsuccess grep 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c new-format.dump +# but the old format does not +testfailure grep 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c old-format.dump + +# regression test for corruption with previous generation of cachedb +testequal "Package: foo +Priority: optional +Section: others +Installed-Size: 29 +Maintainer: Joe Sixpack +Architecture: i386 +Version: 1 +Filename: ./foo_1_i386.deb +Size: 1270 +MD5sum: 85d0e908c1a897700e2c5dea72d7e3c0 +SHA1: 858b09169032b7925a0e463f46b6634243fc40ce +SHA256: 3750a2c9c6b5beee7f307564be3d51d3ec7cbb78fa4f0b47f84a7c41477bff59 +SHA512: 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c +Description: an autogenerated dummy foo=1/test + If you find such a package installed on your system, + something went horribly wrong! They are autogenerated + und used only by testcases and surf no other proposeā€¦ +" aptftparchive --db old-format.db packages . + +# ensure that the db is updated +db_dump old-format.db > old-format.dump +testsuccess diff -u old-format.dump new-format.dump + -- cgit v1.2.3 From e41d3d7e25754f858b6dfe4dd841f4749f7f3ab1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 7 Jun 2014 22:46:37 +0200 Subject: do not revert candidate for protected packages In commit 21b3eac8 I promoted the check for installable dependencies to a pre-install check, which also reverts to a known good candidate (the installed version) if it fails. This revert was done even for user requested candidate switches which disabled our Broken detection so that install requests which are impossible to satisfy do not fail anymore, but print an (incomplete) solution proposal and then exit successfully. Closes: 745046 --- .../test-bug-745046-candidate-propagation-fails | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 test/integration/test-bug-745046-candidate-propagation-fails (limited to 'test') diff --git a/test/integration/test-bug-745046-candidate-propagation-fails b/test/integration/test-bug-745046-candidate-propagation-fails new file mode 100755 index 000000000..e4aa67a72 --- /dev/null +++ b/test/integration/test-bug-745046-candidate-propagation-fails @@ -0,0 +1,39 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'gedit' 'amd64' '1' + +insertpackage 'unstable' 'gedit' 'amd64' '1' +insertpackage 'experimental' 'gedit' 'amd64' '2' 'Depends: common (>= 2)' + +setupaptarchive + +testequal "Reading package lists... +Building dependency tree... +Selected version '2' (experimental [amd64]) for 'gedit' +Some packages could not be installed. This may mean that you have +requested an impossible situation or if you are using the unstable +distribution that some required packages have not yet been created +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + gedit : Depends: common (>= 2) but it is not installable +E: Unable to correct problems, you have held broken packages." aptget install gedit/experimental -sq=0 + +insertinstalledpackage 'common' 'amd64' '2' + +testequal "Reading package lists... +Building dependency tree... +Selected version '2' (experimental [amd64]) for 'gedit' +The following packages will be upgraded: + gedit +1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst gedit [1] (2 experimental [amd64]) +Conf gedit (2 experimental [amd64])" aptget install gedit/experimental -sq=0 -- cgit v1.2.3 From 4dde2b4285fc6288e44e915a0d7bc0faac114a2e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 10 Jun 2014 14:12:12 +0200 Subject: support Acquire::GzipIndexes in dumpavail Closes: 742835 --- test/integration/test-compressed-indexes | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index 67ca0ba27..6671dd75a 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -67,6 +67,8 @@ testrun() { msgtest "\tdsc file is present"; testsuccess --nomsg test -f testpkg_1.0.dsc msgtest "\tdirectory is present"; testsuccess --nomsg test -d testpkg-1.0 rm -rf testpkg-1.0 + testequal "$(aptcache show testpkg -o Acquire::Languages=none) +" aptcache dumpavail } echo 'Acquire::GzipIndexes "false";' > rootdir/etc/apt/apt.conf.d/02compressindex -- cgit v1.2.3 From ea606ec43a364a8e471fd9502d79fe2dfeb6e4ba Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 10 Jun 2014 15:21:30 +0200 Subject: fix test/integration/test-apt-ftparchive-cachedb-lp1274466 in travis --- test/integration/test-apt-ftparchive-cachedb-lp1274466 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/integration/test-apt-ftparchive-cachedb-lp1274466 b/test/integration/test-apt-ftparchive-cachedb-lp1274466 index 211740a53..2a28d6ef0 100755 --- a/test/integration/test-apt-ftparchive-cachedb-lp1274466 +++ b/test/integration/test-apt-ftparchive-cachedb-lp1274466 @@ -12,7 +12,7 @@ configarchitecture "i386" # gather the db and the deb, ensure mtime is not modfied as its saved in the DB cp -p $TESTDIR/deb-lp1274466-cachedb.deb foo_1_i386.deb -cp $TESTDIR/cachedb-lp1274466-old-format.db old-format.db +cp -p $TESTDIR/cachedb-lp1274466-old-format.db old-format.db # verify that the format is different testsuccess aptftparchive --db new-format.db packages . @@ -45,7 +45,7 @@ Description: an autogenerated dummy foo=1/test und used only by testcases and surf no other proposeā€¦ " aptftparchive --db old-format.db packages . -# ensure that the db is updated -db_dump old-format.db > old-format.dump -testsuccess diff -u old-format.dump new-format.dump +# ensure that the db is updated and contains the new sha512 +testsuccess grep 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c old-format.dump + -- cgit v1.2.3 From 686b484b407fdbef47d9f2064284a567b72417fe Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 11 Jun 2014 14:50:48 +0200 Subject: fix autopkgtest tests --- test/integration/framework | 2 ++ test/integration/test-external-dependency-solver-protocol | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 7959699fd..6c9e8bd57 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -120,6 +120,7 @@ apthelper() { runapt "${APTHELPERBINDIR}/apt-helper" "$@"; } aptwebserver() { runapt "${APTWEBSERVERBINDIR}/aptwebserver" "$@"; } aptitude() { runapt aptitude "$@"; } aptextracttemplates() { runapt apt-extracttemplates "$@"; } +aptinternalsolver() { runapt "${APTINTERNALSOLVERBINDIR}/apt-internal-solver" "$@"; } dpkg() { command dpkg --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log "$@" @@ -181,6 +182,7 @@ setupenvironment() { METHODSDIR=${APT_INTEGRATION_TESTS_METHODS_DIR:-"${BUILDDIRECTORY}/methods"} APTHELPERBINDIR=${APT_INTEGRATION_TESTS_LIBEXEC_DIR:-"${BUILDDIRECTORY}"} APTWEBSERVERBINDIR=${APT_INTEGRATION_TESTS_WEBSERVER_BIN_DIR:-"${BUILDDIRECTORY}"} + APTINTERNALSOLVERBINDIR=${APT_INTEGRATION_TESTS_INTERNAL_SOLVER_DIR:-"${BUILDDIRECTORY}"} test -x "${BUILDDIRECTORY}/apt-get" || msgdie "You need to build tree first" # ----- diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol index 129565993..09230d383 100755 --- a/test/integration/test-external-dependency-solver-protocol +++ b/test/integration/test-external-dependency-solver-protocol @@ -53,7 +53,7 @@ testsuccess test -s /tmp/dump.edsp configarchitecture 'armel' msgtest 'Test direct calling is okay for' 'apt-internal-solver' -cat /tmp/dump.edsp | runapt apt-internal-solver > solver.result 2>&1 || true +cat /tmp/dump.edsp | aptinternalsolver > solver.result 2>&1 || true if [ "$(tail -n2 solver.result | head -n1 )" = "Message: Done" ]; then msgpass else -- cgit v1.2.3 From 3082603f0ef76876810cb8c6d02d03ba67ec8c6b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 11 Jun 2014 18:17:45 +0200 Subject: fix test-apt-ftparchive-cachedb-lp1274466 and apt-internal-solver tests --- test/integration/framework | 4 ++-- test/integration/test-apt-ftparchive-cachedb-lp1274466 | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 6c9e8bd57..a687dcb35 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -120,7 +120,7 @@ apthelper() { runapt "${APTHELPERBINDIR}/apt-helper" "$@"; } aptwebserver() { runapt "${APTWEBSERVERBINDIR}/aptwebserver" "$@"; } aptitude() { runapt aptitude "$@"; } aptextracttemplates() { runapt apt-extracttemplates "$@"; } -aptinternalsolver() { runapt "${APTINTERNALSOLVERBINDIR}/apt-internal-solver" "$@"; } +aptinternalsolver() { runapt "${APTINTERNALSOLVER}" "$@"; } dpkg() { command dpkg --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log "$@" @@ -182,7 +182,7 @@ setupenvironment() { METHODSDIR=${APT_INTEGRATION_TESTS_METHODS_DIR:-"${BUILDDIRECTORY}/methods"} APTHELPERBINDIR=${APT_INTEGRATION_TESTS_LIBEXEC_DIR:-"${BUILDDIRECTORY}"} APTWEBSERVERBINDIR=${APT_INTEGRATION_TESTS_WEBSERVER_BIN_DIR:-"${BUILDDIRECTORY}"} - APTINTERNALSOLVERBINDIR=${APT_INTEGRATION_TESTS_INTERNAL_SOLVER_DIR:-"${BUILDDIRECTORY}"} + APTINTERNALSOLVER=${APT_INTEGRATION_TESTS_INTERNAL_SOLVER:-"${BUILDDIRECTORY}/apt-internal-solver"} test -x "${BUILDDIRECTORY}/apt-get" || msgdie "You need to build tree first" # ----- diff --git a/test/integration/test-apt-ftparchive-cachedb-lp1274466 b/test/integration/test-apt-ftparchive-cachedb-lp1274466 index 2a28d6ef0..579ae33a6 100755 --- a/test/integration/test-apt-ftparchive-cachedb-lp1274466 +++ b/test/integration/test-apt-ftparchive-cachedb-lp1274466 @@ -46,6 +46,8 @@ Description: an autogenerated dummy foo=1/test " aptftparchive --db old-format.db packages . # ensure that the db is updated and contains the new sha512 +db_dump old-format.db > old-format.dump + testsuccess grep 7da58ff901a40ecf42a730dc33198b182e9ba9ec98799fc2c2b6fabeeee40cc12a0e7cadb4b66764235c56e1009dbfe8a9a566fb1eedf47a992d1fff2cc3332c old-format.dump -- cgit v1.2.3 From eb197ed71b1535f3c1715c8a751485ef927b51b7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 12 Jun 2014 10:09:24 +0200 Subject: test/integration/test-essential-force-loopbreak: fix on non-amd64 systems --- test/integration/test-essential-force-loopbreak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/test-essential-force-loopbreak b/test/integration/test-essential-force-loopbreak index d60c6cbd5..ac8fc6d28 100755 --- a/test/integration/test-essential-force-loopbreak +++ b/test/integration/test-essential-force-loopbreak @@ -35,7 +35,7 @@ The following packages will be upgraded: sysvinit 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. E: This installation run will require temporarily removing the essential package sysvinit:$(getarchitecture 'native') due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option. -E: Internal Error, Could not early remove sysvinit:amd64 (2)" aptget install systemd-sysv -t "$1" -s +E: Internal Error, Could not early remove sysvinit:$(dpkg --print-architecture) (2)" aptget install systemd-sysv -t "$1" -s # ensure that really nothing happens testfailure aptget install systemd-sysv -y -t "$1" -o Debug::pkgPackageManager=1 testdpkginstalled 'sysvinit' -- cgit v1.2.3