]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
[apt.git] / test / integration / framework
index 3ea9f3774a16d1b71cf5594be1ca9896c0ba0c2b..5439244f709b5e14f8db46fdf95076a292e65f0a 100644 (file)
@@ -110,6 +110,7 @@ aptget() { runapt apt-get "$@"; }
 aptftparchive() { runapt apt-ftparchive "$@"; }
 aptkey() { runapt apt-key "$@"; }
 aptmark() { runapt apt-mark "$@"; }
+apt() { runapt apt "$@"; }
 aptwebserver() {
   LD_LIBRARY_PATH=${APTWEBSERVERBINDIR} ${APTWEBSERVERBINDIR}/aptwebserver "$@";
 }
@@ -217,6 +218,7 @@ setupenvironment() {
        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
+        echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary
        export LC_ALL=C.UTF-8
        export PATH="${PATH}:/usr/local/sbin:/usr/sbin:/sbin"
        configcompression '.' 'gz' #'bz2' 'lzma' 'xz'
@@ -997,10 +999,20 @@ testempty() {
 }
 
 testequal() {
+       local MSG='Test of equality of'
+       if [ "$1" = '--nomsg' ]; then
+               MSG=''
+               shift
+       fi
+
        local COMPAREFILE="${TMPWORKINGDIRECTORY}/rootdir/tmp/testequal.comparefile"
+       addtrap "rm $COMPAREFILE;"
        echo "$1" > $COMPAREFILE
        shift
-       msgtest "Test for equality of" "$*"
+
+       if [ -n "$MSG" ]; then
+               msgtest "$MSG" "$*"
+       fi
        $* 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail
 }