]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-pdiff-usage
Run ./prepare-release pre-export
[apt.git] / test / integration / test-pdiff-usage
index e5fe21e0f9d328141450ed9533503226deb2742a..d60a81b211393f9ed9603dde82a87851d767caf2 100755 (executable)
@@ -6,10 +6,11 @@ TESTDIR=$(readlink -f $(dirname $0))
 
 setupenvironment
 configarchitecture 'i386'
+confighashes 'SHA1' 'SHA256'
 
 buildaptarchive
 setupflataptarchive
-changetowebserver
+changetowebserver -o aptwebserver::support::modified-since=false
 
 PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')"
 
@@ -95,14 +96,6 @@ SHA256-Download:
        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 'Hit:1 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: $*"
        cp ${PKGFILE}-new aptarchive/Packages
        echo '
@@ -254,23 +247,28 @@ echo 'Debug::pkgAcquire::Diffs "true";
 Debug::Acquire::Transaction "true";
 Debug::pkgAcquire::rred "true";' > rootdir/etc/apt/apt.conf.d/rreddebug.conf
 
-testrun nohash -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1
-testrun nohash -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=1
+testcase() {
+       testrun nohash -o Acquire::PDiffs::Merge=0 -o APT::Get::List-Cleanup=1 "$@"
+       testrun nohash -o Acquire::PDiffs::Merge=1 -o APT::Get::List-Cleanup=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
+       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 "$@"
 
-sha256sum() {
-       echo '01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b -'
-}
-testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA1
-testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA1
+       sha256sum() {
+               echo '01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b -'
+       }
+       testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA1 "$@"
+       testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA1 "$@"
+       unset -f sha256sum
 
-unset -f sha256sum
-sha1sum() {
-       echo 'adc83b19e793491b1c6ea0fd8b46cd9f32e592fc -'
+       sha1sum() {
+               echo 'adc83b19e793491b1c6ea0fd8b46cd9f32e592fc -'
+       }
+       testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA256 "$@"
+       testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA256 "$@"
+       unset -f sha1sum
 }
-testrun -o Acquire::PDiffs::Merge=0 -o Acquire::ForceHash=SHA256
-testrun -o Acquire::PDiffs::Merge=1 -o Acquire::ForceHash=SHA256
+testcase -o Acquire::GzipIndexes=0
+testcase -o Acquire::GzipIndexes=1