summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework50
1 files changed, 28 insertions, 22 deletions
diff --git a/test/integration/framework b/test/integration/framework
index ea3903056..190d4d665 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -664,47 +664,53 @@ buildaptftparchivedirectorystructure() {
}
insertpackage() {
- local RELEASE="$1"
+ local RELEASES="$1"
local NAME="$2"
local ARCH="$3"
local VERSION="$4"
local DEPENDENCIES="$5"
local PRIORITY="${6:-optional}"
- local DESCRIPTION="${7:-"an autogenerated dummy ${NAME}=${VERSION}/${RELEASE}
+ local DESCRIPTION="${7:-"an autogenerated dummy ${NAME}=${VERSION}/${RELEASES}
If you find such a package installed on your system,
something went horribly wrong! They are autogenerated
und used only by testcases and surf no other proposeā€¦"}"
local ARCHS=""
- for arch in $(getarchitecturesfromcommalist "$ARCH"); do
- if [ "$arch" = 'all' -o "$arch" = 'none' ]; then
- ARCHS="$(getarchitectures)"
- else
- ARCHS="$arch"
+ for RELEASE in $(printf '%s' "$RELEASES" | tr ',' '\n'); do
+ if [ "$RELEASE" = 'installed' ]; then
+ insertinstalledpackage "$2" "$3" "$4" "$5" "$6" "$7"
+ continue
fi
- for BUILDARCH in $ARCHS; do
- local PPATH="aptarchive/dists/${RELEASE}/main/binary-${BUILDARCH}"
- mkdir -p $PPATH
- local FILE="${PPATH}/Packages"
- echo "Package: $NAME
+ for arch in $(getarchitecturesfromcommalist "$ARCH"); do
+ if [ "$arch" = 'all' -o "$arch" = 'none' ]; then
+ ARCHS="$(getarchitectures)"
+ else
+ ARCHS="$arch"
+ fi
+ for BUILDARCH in $ARCHS; do
+ local PPATH="aptarchive/dists/${RELEASE}/main/binary-${BUILDARCH}"
+ mkdir -p $PPATH
+ local FILE="${PPATH}/Packages"
+ echo "Package: $NAME
Priority: $PRIORITY
Section: other
Installed-Size: 42
Maintainer: Joe Sixpack <joe@example.org>" >> $FILE
- test "$arch" = 'none' || echo "Architecture: $arch" >> $FILE
- echo "Version: $VERSION
+ test "$arch" = 'none' || echo "Architecture: $arch" >> $FILE
+ echo "Version: $VERSION
Filename: pool/main/${NAME}/${NAME}_${VERSION}_${arch}.deb" >> $FILE
- test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
- echo "Description: $(printf '%s' "$DESCRIPTION" | head -n 1)" >> $FILE
- echo "Description-md5: $(printf '%s' "$DESCRIPTION" | md5sum | cut -d' ' -f 1)" >> $FILE
- echo >> $FILE
+ test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
+ echo "Description: $(printf '%s' "$DESCRIPTION" | head -n 1)" >> $FILE
+ echo "Description-md5: $(printf '%s' "$DESCRIPTION" | md5sum | cut -d' ' -f 1)" >> $FILE
+ echo >> $FILE
+ done
done
- done
- mkdir -p aptarchive/dists/${RELEASE}/main/source aptarchive/dists/${RELEASE}/main/i18n
- touch aptarchive/dists/${RELEASE}/main/source/Sources
- echo "Package: $NAME
+ mkdir -p aptarchive/dists/${RELEASE}/main/source aptarchive/dists/${RELEASE}/main/i18n
+ touch aptarchive/dists/${RELEASE}/main/source/Sources
+ echo "Package: $NAME
Description-md5: $(printf '%s' "$DESCRIPTION" | md5sum | cut -d' ' -f 1)
Description-en: $DESCRIPTION
" >> aptarchive/dists/${RELEASE}/main/i18n/Translation-en
+ done
}
insertsource() {