]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
eipp: add Allow-Temporary-Remove-of-Essentials
[apt.git] / test / integration / framework
index b7bee8a57bc67eab33a91445e81cc684dc95bb99..93e17e4548ff346e993746e8b8f25fc73f8483b0 100644 (file)
@@ -191,6 +191,7 @@ aptitude() { runapt aptitude "$@"; }
 aptextracttemplates() { runapt apt-extracttemplates "$@"; }
 aptinternalsolver() { runapt "${APTINTERNALSOLVER}" "$@"; }
 aptdumpsolver() { runapt "${APTDUMPSOLVER}" "$@"; }
+aptinternalplaner() { runapt "${APTINTERNALPLANER}" "$@"; }
 
 dpkg() {
        "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" "$@"
@@ -289,6 +290,7 @@ setupenvironment() {
         APTWEBSERVERBINDIR="${APT_INTEGRATION_TESTS_WEBSERVER_BIN_DIR:-"${BUILDDIRECTORY}"}"
         APTINTERNALSOLVER="${APT_INTEGRATION_TESTS_INTERNAL_SOLVER:-"${BUILDDIRECTORY}/apt-internal-solver"}"
        APTDUMPSOLVER="${APT_INTEGRATION_TESTS_DUMP_SOLVER:-"${BUILDDIRECTORY}/apt-dump-solver"}"
+       APTINTERNALPLANER="${APT_INTEGRATION_TESTS_INTERNAL_PLANER:-"${BUILDDIRECTORY}/apt-internal-planer"}"
        test -x "${BUILDDIRECTORY}/apt-get" || msgdie "You need to build tree first"
         # -----
 
@@ -302,10 +304,13 @@ setupenvironment() {
        mkdir -p usr/lib/apt
        ln -s "${METHODSDIR}" usr/lib/apt/methods
        if [ "$BUILDDIRECTORY" = "$LIBRARYPATH" ]; then
-               mkdir -p usr/lib/apt/solvers
+               mkdir -p usr/lib/apt/solvers usr/lib/apt/planers
                ln -s "${BUILDDIRECTORY}/apt-dump-solver" usr/lib/apt/solvers/dump
+               ln -s "${BUILDDIRECTORY}/apt-dump-solver" usr/lib/apt/planers/dump
                ln -s "${BUILDDIRECTORY}/apt-internal-solver" usr/lib/apt/solvers/apt
+               ln -s "${BUILDDIRECTORY}/apt-internal-planer" usr/lib/apt/planers/apt
                echo "Dir::Bin::Solvers \"${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/solvers\";" > etc/apt/apt.conf.d/externalsolver.conf
+               echo "Dir::Bin::Planers \"${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/planers\";" > etc/apt/apt.conf.d/externalplaner.conf
        fi
         # use the autoremove from the BUILDDIRECTORY if its there, otherwise
         # system
@@ -539,6 +544,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
@@ -963,7 +972,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"
@@ -974,7 +983,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