]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
add testcase for Bug#718329
[apt.git] / test / integration / framework
index 5b9a58568e09f8eacc10566b75a2259e3c527bbd..be2cb95d110105d657a0d3ba37c987e82e276a40 100644 (file)
@@ -190,7 +190,7 @@ setupenvironment() {
        mkdir -p var/lib/dpkg/info var/lib/dpkg/updates var/lib/dpkg/triggers
        touch var/lib/dpkg/available
        mkdir -p usr/lib/apt
-       ln -s ${BUILDDIRECTORY}/methods usr/lib/apt/methods
+       ln -s ${METHODSDIR} usr/lib/apt/methods
        cd ..
        local PACKAGESFILE=$(echo "$(basename $0)" | sed -e 's/^test-/Packages-/' -e 's/^skip-/Packages-/')
        if [ -f "${TESTDIRECTORY}/${PACKAGESFILE}" ]; then
@@ -377,6 +377,7 @@ buildsimplenativepackage() {
        local SECTION="${7:-others}"
        local PRIORITY="${8:-optional}"
         local FILE_TREE="$9"
+        local COMPRESS_TYPE="${10:-gzip}"
        local DISTSECTION
        if [ "$SECTION" = "$(echo "$SECTION" | cut -d'/' -f 2)" ]; then
                DISTSECTION="main"
@@ -442,7 +443,7 @@ Package: $NAME" >> ${BUILDDIR}/debian/control
                local LOG="${BUILDDIR}/../${NAME}_${VERSION}_${arch}.dpkg-deb.log"
                # ensure the right permissions as dpkg-deb ensists
                chmod 755 ${BUILDDIR}/debian/tmp/DEBIAN
-               if ! dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. >$LOG 2>&1; then
+               if ! dpkg-deb -Z${COMPRESS_TYPE} --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. >$LOG 2>&1; then
                        cat $LOG
                        false
                fi
@@ -901,7 +902,7 @@ changetohttpswebserver() {
                msgdie 'You need to install stunnel4 for https testcases'
        fi
        if [ ! -e "${TMPWORKINGDIRECTORY}/aptarchive/aptwebserver.pid" ]; then
-               changetowebserver --no-rewrite
+               changetowebserver --no-rewrite "$@"
        fi
        echo "pid = ${TMPWORKINGDIRECTORY}/aptarchive/stunnel.pid
 cert = ${TESTDIRECTORY}/apt.pem
@@ -947,7 +948,7 @@ URI: $1
 Filename: ${2}
 "
                # simple worker keeping stdin open until we are done (201) or error (400)
-               # and requesting new URIs on try-agains/redirects inbetween
+               # and requesting new URIs on try-agains/redirects in-between
                { tail -n 999 -f "$DOWNLOG" & echo "TAILPID: $!"; } | while read f1 f2; do
                        if [ "$f1" = 'TAILPID:' ]; then
                                TAILPID="$f2"
@@ -1119,7 +1120,7 @@ testfailure() {
        if [ "$1" = '--nomsg' ]; then
                shift
        else
-               msgtest 'Test for failure in  execution of' "$*"
+               msgtest 'Test for failure in execution of' "$*"
        fi
        local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output"
        if $@ >${OUTPUT} 2>&1; then