diff options
Diffstat (limited to 'test/test.d')
-rwxr-xr-x | test/test.d/db-remove.sh | 24 | ||||
-rwxr-xr-x | test/test.d/db-update.sh | 3 | ||||
-rwxr-xr-x | test/test.d/testing2x.sh | 25 |
3 files changed, 44 insertions, 8 deletions
diff --git a/test/test.d/db-remove.sh b/test/test.d/db-remove.sh index 6905821..f706b7a 100755 --- a/test/test.d/db-remove.sh +++ b/test/test.d/db-remove.sh @@ -20,9 +20,6 @@ testRemovePackages() { for pkgname in ${pkgnames[@]}; do for arch in ${arches[@]}; do - # TODO: removing pkg-split-a/pkg-split-b won't work because - # db-remove only removes single packages, not a group of split - # packages. do we want that? ../db-remove extra ${arch} ${pkgname} done done @@ -56,9 +53,6 @@ testRemoveMultiplePackages() { ../db-update for arch in ${arches[@]}; do - # TODO: removing pkg-split-a/pkg-split-b won't work because - # db-remove only removes single packages, not a group of split - # packages. do we want that? ../db-remove extra ${arch} ${pkgnames[@]} done @@ -94,4 +88,22 @@ testRemoveAnyPackages() { done } +testRemoveSingleArch() { + local pkgs=('pkg-any-a' 'pkg-any-b') + local pkgbase + + for pkgbase in ${pkgs[@]}; do + releasePackage extra ${pkgbase} any + done + + ../db-update + + ../db-remove extra i686 pkg-any-a + + checkRemovedPackage extra pkg-any-a i686 + checkPackage extra pkg-any-a-1-1-any.pkg.tar.xz x86_64 + checkPackage extra pkg-any-b-1-1-any.pkg.tar.xz i686 + checkPackage extra pkg-any-b-1-1-any.pkg.tar.xz x86_64 +} + . "${curdir}/../lib/shunit2" diff --git a/test/test.d/db-update.sh b/test/test.d/db-update.sh index 5cee647..6fe0321 100755 --- a/test/test.d/db-update.sh +++ b/test/test.d/db-update.sh @@ -150,10 +150,9 @@ testAddIncompleteSplitPackage() { releasePackage ${repo} ${pkgbase} ${arch} done - # remove a split package to make db-update fail + # remove a split package to make db-update ignore it rm "${STAGING}"/extra/${pkgbase}1-* - # TODO: should this really not add any packages but exit 0? check against new specs ../db-update for arch in ${arches[@]}; do diff --git a/test/test.d/testing2x.sh b/test/test.d/testing2x.sh index 586ce40..29c10e6 100755 --- a/test/test.d/testing2x.sh +++ b/test/test.d/testing2x.sh @@ -24,4 +24,29 @@ testTesting2xAnyPackage() { checkRemovedAnyPackage testing pkg-any-a } +testTesting2xMultiArchPackage() { + releasePackage core pkg-any-a any + releasePackage extra pkg-any-a any + ../db-update + ../db-remove core i686 pkg-any-a + ../db-remove extra x86_64 pkg-any-a + + pushd "${TMP}/svn-packages-copy/pkg-any-a/trunk/" >/dev/null + sed 's/pkgrel=1/pkgrel=2/g' -i PKGBUILD + arch_svn commit -q -m"update pkg to pkgrel=2" >/dev/null + sudo chronic extra-i686-build + mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/" + popd >/dev/null + + releasePackage testing pkg-any-a any + ../db-update + rm -f "${pkgdir}/pkg-any-a/pkg-any-a-1-2-any.pkg.tar.xz" + + ../testing2x pkg-any-a + + checkPackage core pkg-any-a-1-2-any.pkg.tar.xz x86_64 + checkPackage extra pkg-any-a-1-2-any.pkg.tar.xz i686 + checkRemovedAnyPackage testing pkg-any-a +} + . "${curdir}/../lib/shunit2" |