]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
trusted=yes sources are secure, we just don't know why
[apt.git] / test / integration / framework
index ad3c33c28b9d8bbd44ee4b592e2669ceb4d0b4df..76425f0c3f9f085e382b11befa695d6134e6dd36 100644 (file)
@@ -235,6 +235,9 @@ setupenvironment() {
        echo 'quiet::NoStatistic "true";' >> aptconfig.conf
        # too distracting for users, but helpful to detect changes
        echo 'Acquire::Progress::Ignore::ShowErrorText "true";' >> aptconfig.conf
+       # in testcases, it can appear as if localhost has a rotation setup,
+       # hide this as we can't really deal with it properly
+       echo 'Acquire::Failure::ShowIP "false";' >> aptconfig.conf
 
        echo "Acquire::https::CaInfo \"${TESTDIR}/apt.pem\";" > rootdir/etc/apt/apt.conf.d/99https
        echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary
@@ -856,6 +859,7 @@ setupaptarchive() {
 
 signreleasefiles() {
        local SIGNER="${1:-Joe Sixpack}"
+       local REPODIR="${2:-aptarchive}"
        local KEY="keys/$(echo "$SIGNER" | tr 'A-Z' 'a-z' | sed 's# ##g')"
        local GPG="aptkey --quiet --keyring ${KEY}.pub --secret-keyring ${KEY}.sec --readonly adv --batch --yes"
        msgninfo "\tSign archive with $SIGNER key $KEY… "
@@ -882,7 +886,7 @@ signreleasefiles() {
                        cp ${REXKEY}.pub $PUBUNEXPIRED
                fi
        fi
-       for RELEASE in $(find aptarchive/ -name Release); do
+       for RELEASE in $(find ${REPODIR}/ -name Release); do
                $GPG --default-key "$SIGNER" --armor --detach-sign --sign --output ${RELEASE}.gpg ${RELEASE}
                local INRELEASE="$(echo "${RELEASE}" | sed 's#/Release$#/InRelease#')"
                $GPG --default-key "$SIGNER" --clearsign --output $INRELEASE $RELEASE
@@ -1164,9 +1168,10 @@ testsuccess() {
        if $@ >${OUTPUT} 2>&1; then
                msgpass
        else
+               local EXITCODE=$?
                echo >&2
                cat >&2 $OUTPUT
-               msgfail
+               msgfail "exitcode $EXITCODE"
        fi
 }
 
@@ -1178,9 +1183,10 @@ testfailure() {
        fi
        local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output"
        if $@ >${OUTPUT} 2>&1; then
+               local EXITCODE=$?
                echo >&2
                cat >&2 $OUTPUT
-               msgfail
+               msgfail "exitcode $EXITCODE"
        else
                msgpass
        fi