From ce604bc3a2569198fa749acca190fef036e059a1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 15 Aug 2010 19:17:05 +0200 Subject: add test to check updating a package --- test/lib/common.inc | 3 ++- test/runTest | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/lib/common.inc b/test/lib/common.inc index 5c76eb5..e55ce38 100644 --- a/test/lib/common.inc +++ b/test/lib/common.inc @@ -75,8 +75,9 @@ releasePackage() { pushd "${TMP}/svn-packages-copy"/${pkgbase}/trunk/ >/dev/null archrelease ${repo}-${arch} >/dev/null 2&>1 + pkgver=$(. PKGBUILD; echo "${pkgver}-${pkgrel}") popd >/dev/null - cp "${pkgdir}/${pkgbase}"/*.pkg.tar.* "${STAGING}"/${repo}/ + cp "${pkgdir}/${pkgbase}"/*-${pkgver}-${arch}.pkg.tar.* "${STAGING}"/${repo}/ } checkAnyPackage() { diff --git a/test/runTest b/test/runTest index 03f94c2..a16165d 100755 --- a/test/runTest +++ b/test/runTest @@ -81,6 +81,24 @@ testAddSplitPackages() { done } +testUpdateAnyPackage() { + releasePackage extra pkg-any-a any + ../db-update + + pushd "${TMP}/svn-packages-copy/pkg-any-a/trunk/" >/dev/null + sed 's/pkgrel=1/pkgrel=2/g' -i PKGBUILD + svn commit -q -m"update pkg to pkgrel=2" >/dev/null + makepkg -cf --config ${curdir}/lib/makepkg-i686.conf >/dev/null 2>&1 + mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/" + popd >/dev/null + + releasePackage extra pkg-any-a any + ../db-update + + checkAnyPackage extra pkg-any-a-1-2-any.pkg.tar.xz any + + rm "${pkgdir}/pkg-any-a/pkg-any-a-1-2-any.pkg.tar.xz" +} # # db-remove -- cgit v1.2.3-24-g4f1b