X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d61960d9244340956a27f4ca46aecd15cc75e18b..30ea7a60404ee53393235827202968393951d106:/test/integration/test-apt-ftparchive-src-cachedb diff --git a/test/integration/test-apt-ftparchive-src-cachedb b/test/integration/test-apt-ftparchive-src-cachedb index 28321e3c5..8bab1fd5e 100755 --- a/test/integration/test-apt-ftparchive-src-cachedb +++ b/test/integration/test-apt-ftparchive-src-cachedb @@ -2,17 +2,17 @@ set -e assert_correct_sources_file() { - testequal "Package: bar + testsuccessequal "Package: bar +Format: 3.0 (native) +Binary: bar Architecture: all Version: 1.0 -Binary: bar -Format: 3.0 (native) Directory: pool/main +Package-List: + bar deb admin extra Files: 7b57dd065e51de5905288a5104d4bef5 406 bar_1.0.dsc d41d8cd98f00b204e9800998ecf8427e 0 bar_1.0.tar.gz -Package-List: - bar deb admin extra Checksums-Sha1: 17a40b76715f393ab7fd6485c9392a02f1adf903 406 bar_1.0.dsc da39a3ee5e6b4b0d3255bfef95601890afd80709 0 bar_1.0.tar.gz @@ -24,16 +24,16 @@ Checksums-Sha512: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e 0 bar_1.0.tar.gz Package: foo +Format: 3.0 (native) +Binary: foo Architecture: all Version: 1.0 -Binary: foo -Format: 3.0 (native) Directory: pool/main +Package-List: + foo deb admin extra Files: d144826e6f02831c1933e910c92cd7e0 171 foo_1.0.dsc d41d8cd98f00b204e9800998ecf8427e 0 foo_1.0.tar.gz -Package-List: - foo deb admin extra Checksums-Sha1: 979306aa3ccff3d61bba062bb6977e2493c6f907 171 foo_1.0.dsc da39a3ee5e6b4b0d3255bfef95601890afd80709 0 foo_1.0.tar.gz @@ -43,7 +43,7 @@ Checksums-Sha256: Checksums-Sha512: 3da0240fd764657c2f3661b4d750578a9a99b0580591b133756379d48117ebda87a5ed2467f513200d6e7eaf51422cbe91c15720eef7fb4bba2cc8ff81ebc547 171 foo_1.0.dsc cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e 0 foo_1.0.tar.gz -" aptsortpkgs ./aptarchive/dists/test/main/source/Sources +" aptsortpkgs ./aptarchive/dists/test/main/source/Sources -o APT::SortPkgs::Source=true } create_source_files() { @@ -89,10 +89,11 @@ create_clearsigned_source_files() { # # main() # -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture "i386" +confighashes 'MD5' 'SHA1' 'SHA256' 'SHA512' msgtest 'Test apt-ftparchive source with missing hashes in .dsc' @@ -108,7 +109,7 @@ mkdir aptarchive-cache msgtest 'generate with --db option' cd aptarchive -aptftparchive --db ./test.db sources pool/main/ -q=0 -o APT::FTPArchive::ShowCacheMisses=1 > dists/test/main/source/Sources 2>stats-out.txt && msgpass || msgfail +aptftparchive --db ./test.db sources pool/main/ -o APT::FTPArchive::ShowCacheMisses=1 > dists/test/main/source/Sources 2>stats-out.txt && msgpass || msgfail testsuccess grep Misses stats-out.txt testfileequal '../rootdir/tmp/testsuccess.output' ' Misses in Cache: 2' cd .. @@ -116,7 +117,7 @@ assert_correct_sources_file msgtest 'generate with --db option (again to ensure its in the cache)' cd aptarchive -aptftparchive --db ./test.db sources pool/main/ -q=0 -o APT::FTPArchive::ShowCacheMisses=1 > dists/test/main/source/Sources 2>stats-out.txt && msgpass || msgfail +aptftparchive --db ./test.db sources pool/main/ -o APT::FTPArchive::ShowCacheMisses=1 > dists/test/main/source/Sources 2>stats-out.txt && msgpass || msgfail testsuccess grep Misses stats-out.txt testfileequal '../rootdir/tmp/testsuccess.output' ' Misses in Cache: 0' cd .. @@ -154,7 +155,7 @@ Tree "dists/test" { EOF msgtest 'generate (empty cachedb)' -testsuccess aptftparchive generate apt-ftparchive.conf -q=0 -o APT::FTPArchive::ShowCacheMisses=1 +testsuccess aptftparchive generate apt-ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1 cp rootdir/tmp/testsuccess.output stats-out.txt testsuccess grep Misses stats-out.txt testfileequal rootdir/tmp/testsuccess.output ' Misses in Cache: 2' @@ -162,7 +163,7 @@ assert_correct_sources_file msgtest 'generate again out of the cache' rm -f ./aptarchive/dists/test/main/source/Sources -testsuccess aptftparchive generate apt-ftparchive.conf -q=0 -o APT::FTPArchive::ShowCacheMisses=1 +testsuccess aptftparchive generate apt-ftparchive.conf -o APT::FTPArchive::ShowCacheMisses=1 cp rootdir/tmp/testsuccess.output stats-out.txt testsuccess grep Misses stats-out.txt testfileequal rootdir/tmp/testsuccess.output ' Misses in Cache: 0' @@ -182,7 +183,7 @@ rm -f aptarchive/pool/invalid/invalid_1.0.dsc # ensure clean works rm -f aptarchive/pool/main/* -testsuccess aptftparchive clean apt-ftparchive.conf -q=0 -o Debug::APT::FTPArchive::Clean=1 +testsuccess aptftparchive clean apt-ftparchive.conf -o Debug::APT::FTPArchive::Clean=1 cp rootdir/tmp/testsuccess.output clean-out.txt testsuccess grep unique clean-out.txt testfileequal 'rootdir/tmp/testsuccess.output' "0 Number of unique keys in the tree"