add framework code to run the installed aptitude with the current
authorDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 30 Nov 2010 18:23:54 +0000 (19:23 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 30 Nov 2010 18:23:54 +0000 (19:23 +0100)
build library in the test environment

test/integration/framework

index a0bad41..8abefc8 100644 (file)
@@ -78,6 +78,15 @@ aptkey() { runapt apt-key $*; }
 dpkg() {
        $(which dpkg) --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log $*
 }
+aptitude() {
+       if [ -f ./aptconfig.conf ]; then
+               APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY}  $(which aptitude) $*
+       elif [ -f ../aptconfig.conf ]; then
+               APT_CONFIG=../aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $*
+       else
+               LD_LIBRARY_PATH=${BUILDDIRECTORY}  $(which aptitude) $*
+       fi
+}
 
 setupenvironment() {
        TMPWORKINGDIRECTORY=$(mktemp -d)