Add support for providing and autocopying Sources files along the way
authorAndres Mejia <mcitadel@gmail.com>
Tue, 30 Nov 2010 18:25:39 +0000 (19:25 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 30 Nov 2010 18:25:39 +0000 (19:25 +0100)
of status and Packages files with a testcase

test/integration/framework

index 8abefc8..7af59de 100644 (file)
@@ -119,6 +119,12 @@ setupenvironment() {
        else
                touch aptarchive/Packages
        fi
+       local SOURCESSFILE=$(echo "$(basename $0)" | sed -e 's/^test-/Sources-/' -e 's/^skip-/Sources-/')
+       if [ -f "${TESTDIR}/${SOURCESSFILE}" ]; then
+               cp "${TESTDIR}/${SOURCESSFILE}" aptarchive/Sources
+       else
+               touch aptarchive/Sources
+       fi
        cp $(find $TESTDIR -name '*.pub' -o -name '*.sec') keys/
        ln -s ${TMPWORKINGDIRECTORY}/keys/joesixpack.pub rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
        echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf