X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/c355ea30383486e74635cd0248d3b53ed9759c39..21248c0f00ee71412dbadc6ebf84011cf974346d:/test/integration/test-pdiff-usage diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage index d773dcd66..7d72a6944 100755 --- a/test/integration/test-pdiff-usage +++ b/test/integration/test-pdiff-usage @@ -14,16 +14,7 @@ changetowebserver PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')" wasmergeused() { - msgtest 'Test for successful execution of' "$*" - local OUTPUT=$(mktemp) - addtrap "rm $OUTPUT;" - if aptget update "$@" >${OUTPUT} 2>&1; then - msgpass - else - echo - cat $OUTPUT - msgfail - fi + testsuccess aptget update "$@" msgtest 'No intermediate patch files' 'still exist' local EDS="$(find rootdir/var/lib/apt/lists -name '*.ed' -o -name '*.ed.*')" @@ -36,7 +27,7 @@ wasmergeused() { fi msgtest 'Check if the right pdiff merger was used' - if grep -q '^pkgAcqIndexMergeDiffs::Done(): rred' $OUTPUT; then + if grep -q '^pkgAcqIndexMergeDiffs::Done(): rred' rootdir/tmp/testsuccess.output; then if echo "$*" | grep -q -- '-o Acquire::PDiffs::Merge=1'; then msgpass else @@ -56,11 +47,11 @@ testrun() { compressfile 'aptarchive/Packages' generatereleasefiles signreleasefiles - rm -rf aptarchive/Packages.diff rootdir/var/lib/apt/lists + rm -rf aptarchive/Packages.diff rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists-bak testsuccess aptget update "$@" cp -a rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists-bak testnopackage newstuff - testequal "$(cat ${PKGFILE}) + testsuccessequal "$(cat ${PKGFILE}) " aptcache show apt oldstuff msgmsg "Testcase: apply with one patch: $*" @@ -90,13 +81,15 @@ SHA256-Patches: find aptarchive -name 'Packages*' -type f -delete wasmergeused "$@" testnopackage oldstuff - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff msgmsg "Testcase: index is already up-to-date: $*" find rootdir/var/lib/apt/lists -name '*diff_Index' -type f -delete testsuccess aptget update "$@" - testequal "$(cat ${PKGFILE}-new) + testequal 'Hit http://localhost:8080 InRelease +Reading package lists...' aptget update "$@" -o Debug::Acquire::Transaction=0 -o Debug::pkgAcquire::Diffs=0 + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff msgmsg "Testcase: apply with two patches: $*" @@ -146,7 +139,7 @@ SHA256-Patches: cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists wasmergeused "$@" testnopackage oldstuff - testequal "$(cat Packages-future) + testsuccessequal "$(cat Packages-future) " aptcache show apt newstuff futurestuff msgmsg "Testcase: patch applying fails, but successful fallback: $*" @@ -178,7 +171,7 @@ SHA256-Patches: signreleasefiles testsuccess aptget update "$@" testnopackage oldstuff - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff msgmsg "Testcase: pdiff patch bigger than index itself: $*" @@ -212,7 +205,7 @@ SHA256-Patches: cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output testsuccess grep 'bytes (Limit is' rootdir/tmp/aptgetupdate.output testnopackage oldstuff - testequal "$(cat ${PKGFILE}-new) + testsuccessequal "$(cat ${PKGFILE}-new) " aptcache show apt newstuff } echo 'Debug::pkgAcquire::Diffs "true";