Browse Source

fix bashism (local outside function) and releasefile creation in testcases

tags/debian/0.8.15.7
David Kalnischkies 10 years ago
parent
commit
718f797cef
4 changed files with 20 additions and 10 deletions
  1. +7
    -2
      test/integration/framework
  2. +4
    -4
      test/integration/test-compressed-indexes
  3. +4
    -4
      test/integration/test-disappearing-packages
  4. +5
    -0
      test/integration/test-releasefile-valid-until

+ 7
- 2
test/integration/framework View File

@@ -513,6 +513,7 @@ buildaptarchivefromfiles() {
# can be overridden by testcases for their pleasure
getcodenamefromsuite() { echo -n "$1"; }
getreleaseversionfromsuite() { true; }
getlabelfromsuite() { true; }

generatereleasefiles() {
# $1 is the Date header and $2 is the ValidUntil header to be set
@@ -526,13 +527,17 @@ generatereleasefiles() {
local SUITE="$(echo "$dir" | cut -d'/' -f 4)"
local CODENAME="$(getcodenamefromsuite $SUITE)"
local VERSION="$(getreleaseversionfromsuite $SUITE)"
local LABEL="$(getlabelfromsuite $SUITE)"
if [ -n "$VERSION" ]; then
VERSION="-o APT::FTPArchive::Release::Version='${VERSION}'"
VERSION="-o APT::FTPArchive::Release::Version=${VERSION}"
fi
if [ -n "$LABEL" ]; then
LABEL="-o APT::FTPArchive::Release::Label=${LABEL}"
fi
aptftparchive -qq release $dir \
-o APT::FTPArchive::Release::Suite="${SUITE}" \
-o APT::FTPArchive::Release::Codename="${CODENAME}" \
-o APT::FTPArchive::Release::Label="Testcases" \
${LABEL} \
${VERSION} \
| sed -e '/0 Release$/ d' > $dir/Release # remove the self reference
if [ "$SUITE" = "experimental" -o "$SUITE" = "experimental2" ]; then


+ 4
- 4
test/integration/test-compressed-indexes View File

@@ -10,10 +10,10 @@ configarchitecture "i386"
buildsimplenativepackage "testpkg" "i386" "1.0"
setupaptarchive

local GOODSHOW="$(aptcache show testpkg)
GOODSHOW="$(aptcache show testpkg)
"
local GOODPOLICY="$(aptcache policy testpkg)"
local GOODSHOWSRC="$(aptcache showsrc testpkg)
GOODPOLICY="$(aptcache policy testpkg)"
GOODSHOWSRC="$(aptcache showsrc testpkg)
"

test $(echo "$GOODSHOW" | grep -e '^Package: testpkg' -e '^Version: 1.0' -e '^Architecture: i386' | wc -l) -eq 3 || msgdie 'show is broken'
@@ -99,7 +99,7 @@ testrun "compressed"
rm rootdir/etc/apt/apt.conf.d/02compressindex
changetowebserver
aptget update -qq
local GOODPOLICY="$(aptcache policy testpkg)"
GOODPOLICY="$(aptcache policy testpkg)"
test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 http://' | wc -l) -eq 4
testequal "$GOODPOLICY" aptcache policy testpkg



+ 4
- 4
test/integration/test-disappearing-packages View File

@@ -12,13 +12,13 @@ buildsimplenativepackage "unrelated" "all" "0.5" "unstable"
setupsimplenativepackage "new-pkg" "i386" "2.0" "unstable" "Provides: old-pkg
Replaces: old-pkg
Conflicts: old-pkg (<< 2.0)"
local BUILDDIR="incoming/new-pkg-2.0"
BUILDDIR="incoming/new-pkg-2.0"
echo "/usr/share/doc/new-pkg /usr/share/doc/old-pkg" > ${BUILDDIR}/debian/new-pkg.links
buildpackage "$BUILDDIR" "unstable" "main"
rm -rf "$BUILDDIR"

setupsimplenativepackage "old-pkg" "all" "2.0" "unstable" "Depends: new-pkg"
local BUILDDIR="incoming/old-pkg-2.0"
BUILDDIR="incoming/old-pkg-2.0"
echo "/usr/share/doc/new-pkg /usr/share/doc/old-pkg" > ${BUILDDIR}/debian/old-pkg.links
echo "
override_dh_link:
@@ -33,9 +33,9 @@ aptget install old-pkg=1.0 --trivial-only -qq 2>&1 > /dev/null

testmarkedauto # old-pkg is manual installed

local CMD="aptget dist-upgrade -y -q=0"
CMD="aptget dist-upgrade -y -q=0"
msgtest "Test for equality of" "$CMD"
local COMPAREFILE=$(mktemp)
COMPAREFILE=$(mktemp)
echo "The following package disappeared from your system as
all files have been overwritten by other packages:
old-pkg


+ 5
- 0
test/integration/test-releasefile-valid-until View File

@@ -8,6 +8,11 @@ configarchitecture 'i386'

insertpackage 'wheezy' 'apt' 'all' '0.8.15'

getlabelfromsuite() {
echo -n 'Testcases'
}


setupaptarchive

setupreleasefile() {


Loading…
Cancel
Save