]> git.saurik.com Git - apt.git/blobdiff - test/integration/framework
fix test/integration/test-apt-helper
[apt.git] / test / integration / framework
index 00c8f3abcb0a11fb376fa323791286f7df64cb8f..8e401cb5f506b0e7229f02d7b77447733a97f528 100644 (file)
@@ -90,7 +90,13 @@ msgdone() {
                echo "${CDONE}DONE${CNORMAL}";
        fi
 }
                echo "${CDONE}DONE${CNORMAL}";
        fi
 }
-
+getaptconfig() {
+       if [ -f ./aptconfig.conf ]; then
+            echo "./aptconfig.conf"
+       elif [ -f ../aptconfig.conf ]; then
+            echo "../aptconfig.conf"
+        fi
+}
 runapt() {
        msgdebug "Executing: ${CCMD}$*${CDEBUG} "
        local CMD="$1"
 runapt() {
        msgdebug "Executing: ${CCMD}$*${CDEBUG} "
        local CMD="$1"
@@ -99,13 +105,7 @@ runapt() {
        sh|aptitude|*/*) ;;
        *) CMD="${BUILDDIRECTORY}/$CMD";;
        esac
        sh|aptitude|*/*) ;;
        *) CMD="${BUILDDIRECTORY}/$CMD";;
        esac
-       if [ -f ./aptconfig.conf ]; then
-               MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${LIBRARYPATH} $CMD "$@"
-       elif [ -f ../aptconfig.conf ]; then
-               MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG=../aptconfig.conf LD_LIBRARY_PATH=${LIBRARYPATH} $CMD "$@"
-       else
-               MALLOC_PERTURB_=21 MALLOC_CHECK_=2 LD_LIBRARY_PATH=${LIBRARYPATH} $CMD "$@"
-       fi
+       MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG="$(getaptconfig)" LD_LIBRARY_PATH=${BUILDDIRECTORY} $CMD "$@"
 }
 aptconfig() { runapt apt-config "$@"; }
 aptcache() { runapt apt-cache "$@"; }
 }
 aptconfig() { runapt apt-config "$@"; }
 aptcache() { runapt apt-cache "$@"; }