X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3abb6a6a1e485b3bc899b64b0a1b7dc2db25a9c2..57f7fb6511fcc7c55ee7a88475d15385093c048e:/test/integration/test-compressed-indexes diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index 49ffc4a8a..b8bb58953 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -5,8 +5,9 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" . "$TESTDIR/framework" setupenvironment -configcompression '.' 'xz' 'bz2' 'lzma' 'gz' +configcompression 'ALL' configarchitecture 'i386' +LOWCOSTEXT='lz4' buildsimplenativepackage 'testpkg' 'i386' '1.0' @@ -32,13 +33,11 @@ testrun() { msgtest 'Check if all index files are' "${1:-uncompressed}" if [ "$1" = 'compressed' ]; then ! test -e rootdir/var/lib/apt/lists/*i386_Packages || F=1 - ! test -e rootdir/var/lib/apt/lists/*all_Packages || F=1 ! test -e rootdir/var/lib/apt/lists/*_Sources || F=1 ! test -e rootdir/var/lib/apt/lists/*_Translation-en || F=1 - test -e rootdir/var/lib/apt/lists/*i386_Packages.${COMPRESS} || F=1 - test -e rootdir/var/lib/apt/lists/*all_Packages.${COMPRESS} || F=1 - test -e rootdir/var/lib/apt/lists/*_Sources.${COMPRESS} || F=1 - test -e rootdir/var/lib/apt/lists/*_Translation-en.${COMPRESS} || F=1 + test -e rootdir/var/lib/apt/lists/*i386_Packages.$LOWCOSTEXT || F=1 + test -e rootdir/var/lib/apt/lists/*_Sources.$LOWCOSTEXT || F=1 + test -e rootdir/var/lib/apt/lists/*_Translation-en.$LOWCOSTEXT || F=1 # there is no point in trying pdiff if we have compressed indexes # as we can't patch compressed files (well, we can, but what is the point?) ! test -e rootdir/var/lib/apt/lists/*diff_Index || F=1 @@ -46,11 +45,9 @@ testrun() { # clear the faked pdiff indexes so the glob below works rm -f rootdir/var/lib/apt/lists/*diff_Index test -e rootdir/var/lib/apt/lists/*i386_Packages || F=1 - test -e rootdir/var/lib/apt/lists/*all_Packages || F=1 test -e rootdir/var/lib/apt/lists/*_Sources || F=1 test -e rootdir/var/lib/apt/lists/*_Translation-en || F=1 ! test -e rootdir/var/lib/apt/lists/*i386_Packages.* || F=1 - ! test -e rootdir/var/lib/apt/lists/*all_Packages.* || F=1 ! test -e rootdir/var/lib/apt/lists/*_Sources.* || F=1 ! test -e rootdir/var/lib/apt/lists/*_Translation-en.* || F=1 fi @@ -73,7 +70,7 @@ The following NEW packages will be installed: testpkg 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Inst testpkg (1.0 unstable [i386]) -Conf testpkg (1.0 unstable [i386])' aptget install testpkg -s +Conf testpkg (1.0 unstable [i386])' aptget install testpkg -s -o Debug::pkgAcquire::Auth=0 -o Debug::pkgAcquire::Worker=0 rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin testsuccessequal "$GOODSHOW" aptcache show testpkg testsuccessequal "$GOODSHOW" aptcache show testpkg @@ -111,6 +108,7 @@ testovermethod() { INDCOMP='uncompressed' else INDCOMP='compressed' + echo 'APT::Compressor::lz4::Name "lz4";' >> rootdir/etc/apt/apt.conf.d/02compressindex fi msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes gzip=$INDEX" @@ -146,7 +144,7 @@ testsuccessequal "$GOODSHOWSRC" aptcache showsrc testpkg GOODPOLICY="$(aptcache policy testpkg)" test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 file:/' | wc -l) -eq 4 || msgdie 'file policy is broken' testsuccessequal "$GOODPOLICY" aptcache policy testpkg -for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testovermethod 'file' $COMPRESSOR; done +forallsupportedcompressors testovermethod 'file' rewritesourceslist "copy://${TMPWORKINGDIRECTORY}/aptarchive" rm -rf rootdir/var/lib/apt/lists @@ -154,7 +152,7 @@ testsuccess aptget update GOODPOLICY="$(aptcache policy testpkg)" test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 copy:/' | wc -l) -eq 4 || msgdie 'copy policy is broken' testsuccessequal "$GOODPOLICY" aptcache policy testpkg -for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testovermethod 'copy' $COMPRESSOR; done +forallsupportedcompressors testovermethod 'copy' changetowebserver rm -rf rootdir/var/lib/apt/lists @@ -162,7 +160,7 @@ testsuccess aptget update GOODPOLICY="$(aptcache policy testpkg)" test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 http://' | wc -l) -eq 4 || msgdie 'http policy is broken' testsuccessequal "$GOODPOLICY" aptcache policy testpkg -for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testovermethod 'http' $COMPRESSOR; done +forallsupportedcompressors testovermethod 'http' changetohttpswebserver rm -rf rootdir/var/lib/apt/lists @@ -170,7 +168,7 @@ testsuccess aptget update GOODPOLICY="$(aptcache policy testpkg)" test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 https://' | wc -l) -eq 4 || msgdie 'https policy is broken' testsuccessequal "$GOODPOLICY" aptcache policy testpkg -for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testovermethod 'https' $COMPRESSOR; done +forallsupportedcompressors testovermethod 'https' changetocdrom 'Debian APT Testdisk 0.8.15' rm -rf rootdir/var/lib/apt/lists @@ -178,4 +176,4 @@ testsuccess aptcdrom add