]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
tests: enhance https support in the testcases
[apt.git] / test / integration / framework
index 0f57d0259fc119b9fad5675153a16b9664847317..6a2a78c83174a6f850ad6a94da4c774c8fe2d732 100644 (file)
@@ -116,7 +116,7 @@ aptitude() {
 }
 gdb() {
        echo "gdb: run »$*«"
 }
 gdb() {
        echo "gdb: run »$*«"
-       APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which gdb) ${BUILDDIRECTORY}/$1
+       APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which gdb) ${BUILDDIRECTORY}/$1 --args $*
 }
 http() {
        LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/methods/http
 }
 http() {
        LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/methods/http
@@ -192,6 +192,7 @@ setupenvironment() {
        fi
        echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
        echo 'quiet::NoUpdate "true";' >> aptconfig.conf
        fi
        echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
        echo 'quiet::NoUpdate "true";' >> aptconfig.conf
+       echo "Acquire::https::CaInfo \"${TESTDIR}/apt.pem\";" > rootdir/etc/apt/apt.conf.d/99https
        export LC_ALL=C
        export PATH="${PATH}:/usr/local/sbin:/usr/sbin:/sbin"
        configcompression '.' 'gz' #'bz2' 'lzma' 'xz'
        export LC_ALL=C
        export PATH="${PATH}:/usr/local/sbin:/usr/sbin:/sbin"
        configcompression '.' 'gz' #'bz2' 'lzma' 'xz'
@@ -395,10 +396,6 @@ Package: $NAME" >> ${BUILDDIR}/debian/control
                 if [ -n "$FILE_TREE" ]; then
                     cp -ar "$FILE_TREE" ${BUILDDIR}/debian/tmp
                 fi
                 if [ -n "$FILE_TREE" ]; then
                     cp -ar "$FILE_TREE" ${BUILDDIR}/debian/tmp
                 fi
-                if [ -n "$POSTINST" ]; then
-                    echo "$POSTINST" > ${BUILDDIR}/debian/tmp/DEBIAN/postinst
-                    chmod +x  ${BUILDDIR}/debian/tmp/DEBIAN/postinst
-                fi
 
                (cd ${BUILDDIR}; dpkg-gencontrol -DArchitecture=$arch)
                (cd ${BUILDDIR}/debian/tmp; md5sum $(find usr/ -type f) > DEBIAN/md5sums)
 
                (cd ${BUILDDIR}; dpkg-gencontrol -DArchitecture=$arch)
                (cd ${BUILDDIR}/debian/tmp; md5sum $(find usr/ -type f) > DEBIAN/md5sums)
@@ -803,6 +800,11 @@ rewritesourceslist() {
 }
 
 changetowebserver() {
 }
 
 changetowebserver() {
+       if [ "$1" != '--no-rewrite' ]; then
+               rewritesourceslist 'http://localhost:8080/'
+       else
+               shift
+       fi
        local LOG='/dev/null'
        if test -x ${BUILDDIRECTORY}/aptwebserver; then
                cd aptarchive
        local LOG='/dev/null'
        if test -x ${BUILDDIRECTORY}/aptwebserver; then
                cd aptarchive
@@ -816,9 +818,6 @@ changetowebserver() {
        else
                msgdie 'You have to build aptwerbserver or install a webserver'
        fi
        else
                msgdie 'You have to build aptwerbserver or install a webserver'
        fi
-       if [ "$1" != '--no-rewrite' ]; then
-               rewritesourceslist 'http://localhost:8080/'
-       fi
 }
 
 changetohttpswebserver() {
 }
 
 changetohttpswebserver() {
@@ -830,6 +829,7 @@ changetohttpswebserver() {
        fi
        echo "pid = ${TMPWORKINGDIRECTORY}/aptarchive/stunnel.pid
 cert = ${TESTDIRECTORY}/apt.pem
        fi
        echo "pid = ${TMPWORKINGDIRECTORY}/aptarchive/stunnel.pid
 cert = ${TESTDIRECTORY}/apt.pem
+output = /dev/null
 
 [https]
 accept = 4433
 
 [https]
 accept = 4433