X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/761a5ad2ec07f097b05c32427bd0ebddfd587987..57f7fb6511fcc7c55ee7a88475d15385093c048e:/test/integration/framework diff --git a/test/integration/framework b/test/integration/framework index 1f843babf..3f7101170 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -339,7 +339,9 @@ setupenvironment() { # destroys coverage reporting though, so we disable changing user for the calling gpgv echo "Dir::Bin::apt-key \"${BUILDDIRECTORY}/apt-key\";" >> aptconfig.conf if [ "$(id -u)" = '0' ]; then - echo 'Binary::gpgv::Debug::NoDropPrivs "true";' >>aptconfig.conf + echo 'Binary::gpgv::APT::Sandbox::User "root";' >> aptconfig.conf + # same for the solver executables + echo 'APT::Solver::RunAsUser "root";' >> aptconfig.conf fi cat > "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" < rootdir/etc/apt/apt.conf.d/no-sha1 fi + # most tests just need one signed Release file, not both + export APT_DONT_SIGN='Release.gpg' + msgdone "info" } @@ -534,6 +539,10 @@ EOF testempty --nomsg gcc -Wall -Wextra -fPIC -shared -o noopchroot.so noopchroot.c -ldl } configcompression() { + if [ "$1" = 'ALL' ]; then + configcompression '.' $(aptconfig dump APT::Compressor --format '%t %v%n' | sed -n 's#^Extension \.\(.*\)$#\1#p') + return + fi local CMD='apthelper cat-file -C' while [ -n "$1" ]; do case "$1" in @@ -958,7 +967,7 @@ buildaptarchivefromfiles() { } compressfile() { - cat "${TMPWORKINGDIRECTORY}/rootdir/etc/testcase-compressor.conf" | while read compressor extension command; do + while read compressor extension command; do if [ "$compressor" = '.' ]; then if [ -n "$2" ]; then touch -d "$2" "$1" @@ -969,7 +978,7 @@ compressfile() { if [ -n "$2" ]; then touch -d "$2" "${1}.${extension}" fi - done + done < "${TMPWORKINGDIRECTORY}/rootdir/etc/testcase-compressor.conf" } # can be overridden by testcases for their pleasure @@ -1694,8 +1703,9 @@ testfailure() { local EXITCODE=$? if expr match "$1" '^apt.*' >/dev/null; then if [ "$1" = 'aptkey' ]; then - if grep -q -E " Can't check signature: " "$OUTPUT" || \ - grep -q -E " BAD signature from " "$OUTPUT"; then + if grep -q " Can't check signature: + BAD signature from + signature could not be verified" "$OUTPUT"; then msgpass else msgfailoutput "run failed with exitcode ${EXITCODE}, but no signature error" "$OUTPUT" "$@"