X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/23397c9d7d4d455461176600bb45c81185493504..757ec4e1ef633f9867928559df82adf3d0ac7b78:/test/integration/test-apt-update-filesize-mismatch?ds=inline diff --git a/test/integration/test-apt-update-filesize-mismatch b/test/integration/test-apt-update-filesize-mismatch index 8c73c059e..9f95906b5 100755 --- a/test/integration/test-apt-update-filesize-mismatch +++ b/test/integration/test-apt-update-filesize-mismatch @@ -1,8 +1,8 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture 'i386' configcompression 'gz' @@ -28,7 +28,7 @@ for get in $(sed -n 's#^GET /\([^ ]\+\.gz\) HTTP.\+$#\1#p' aptarchive/webserver. for ext in '' '.gz'; do COMPRESSFILE="$get" get="${get}${ext}" - FILE="$(basename -s '.gz' "$get")" + FILE="$(basename "$get" '.gz')" msgmsg 'Test filesize mismatch with file' "$FILE" rm -rf rootdir/var/lib/apt/lists @@ -38,16 +38,11 @@ for get in $(sed -n 's#^GET /\([^ ]\+\.gz\) HTTP.\+$#\1#p' aptarchive/webserver. done signreleasefiles - TEST='testfailure' - if expr match "$COMPRESSFILE" '^.*Translation-.*$' >/dev/null; then - TEST='testsuccess' - unset COMPRESSFILE - fi - $TEST aptget update -o Debug::pkgAcquire::Worker=1 - cp rootdir/tmp/${TEST}.output rootdir/tmp/update.output - testsuccess grep -E "$(basename -s '.gz' "$COMPRESSFILE").*Hash Sum mismatch" rootdir/tmp/update.output - $TEST aptcache show foo - $TEST aptget install foo -s + testfailure aptget update -o Debug::pkgAcquire::Worker=1 + cp rootdir/tmp/testfailure.output rootdir/tmp/update.output + testsuccess grep -E "$(basename "$COMPRESSFILE" '.gz').*Hash Sum mismatch" rootdir/tmp/update.output + testfailure aptcache show foo + testfailure aptget install foo -s testfailure aptcache show bar testfailure aptget install bar -s