summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-03-26 13:35:59 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-03-26 13:35:59 +0100
commit575ba47d34870f8d7e83bc05f274f40a2d52d8fe (patch)
tree88316fc256f1c380f401872a47feb9323f906f0b
parentd568b8aeb0be95d6a1da7da0434de23e6b2260e2 (diff)
downloaddbscripts-575ba47d34870f8d7e83bc05f274f40a2d52d8fe.tar.gz
dbscripts-575ba47d34870f8d7e83bc05f274f40a2d52d8fe.tar.xz
Adjust test for latest devtools; Be less generic with package extension
-rw-r--r--.gitignore2
-rw-r--r--config2
-rw-r--r--test/lib/common.inc6
-rwxr-xr-xtest/test.d/db-move.sh4
-rwxr-xr-xtest/test.d/db-update.sh6
-rwxr-xr-xtest/test.d/ftpdir-cleanup.sh4
-rwxr-xr-xtest/test.d/pool-transition.sh14
-rwxr-xr-xtest/test.d/testing2x.sh2
8 files changed, 20 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore
index de95927..f47d96a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
*~
/config.local
-test/packages/*/*.pkg.tar.*
+test/packages/*/*.pkg.tar.?z
diff --git a/config b/config
index 53191e0..b595636 100644
--- a/config
+++ b/config
@@ -22,7 +22,7 @@ TMPDIR="/srv/tmp"
ARCHES=(i686 x86_64)
DBEXT=".db.tar.gz"
FILESEXT=".files.tar.gz"
-PKGEXT=".pkg.tar.*"
+PKGEXT=".pkg.tar.?z"
SRCEXT=".src.tar.gz"
# Allowed licenses: get sourceballs only for licenses in this array
diff --git a/test/lib/common.inc b/test/lib/common.inc
index 46747ff..8a53768 100644
--- a/test/lib/common.inc
+++ b/test/lib/common.inc
@@ -29,10 +29,10 @@ oneTimeSetUp() {
if ! ${build}; then
if [ "${pkgarch[0]}" == 'any' ]; then
- extra-x86_64-build || die 'extra-x86_64-build failed'
+ sudo extra-x86_64-build || die 'extra-x86_64-build failed'
else
for a in ${pkgarch[@]}; do
- extra-${a}-build || die "extra-${a}-build failed"
+ sudo extra-${a}-build || die "extra-${a}-build failed"
done
fi
for a in ${pkgarch[@]}; do
@@ -114,7 +114,7 @@ releasePackage() {
archrelease ${repo}-${arch} >/dev/null 2&>1
pkgver=$(. PKGBUILD; echo $(get_full_version ${epoch:-0} ${pkgver} ${pkgrel}))
popd >/dev/null
- cp "${pkgdir}/${pkgbase}"/*-${pkgver}-${arch}.pkg.tar.* "${STAGING}"/${repo}/
+ cp "${pkgdir}/${pkgbase}"/*-${pkgver}-${arch}${PKGEXT} "${STAGING}"/${repo}/
}
checkAnyPackage() {
diff --git a/test/test.d/db-move.sh b/test/test.d/db-move.sh
index 6da25c4..40b40de 100755
--- a/test/test.d/db-move.sh
+++ b/test/test.d/db-move.sh
@@ -82,12 +82,12 @@ testMoveSplitPackages() {
../db-move testing extra pkg-split-a
for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/pkg-split-a"/*-${arch}.pkg.tar.*; do
+ for pkg in "${pkgdir}/pkg-split-a"/*-${arch}${PKGEXT}; do
checkPackage extra $(basename ${pkg}) ${arch}
done
done
for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/pkg-split-b"/*-${arch}.pkg.tar.*; do
+ for pkg in "${pkgdir}/pkg-split-b"/*-${arch}${PKGEXT}; do
checkPackage testing $(basename ${pkg}) ${arch}
done
done
diff --git a/test/test.d/db-update.sh b/test/test.d/db-update.sh
index 8acfbeb..e38c328 100755
--- a/test/test.d/db-update.sh
+++ b/test/test.d/db-update.sh
@@ -68,7 +68,7 @@ testAddSplitPackages() {
for pkgbase in ${pkgs[@]}; do
for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/${pkgbase}"/*-${arch}.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgbase}"/*-${arch}${PKGEXT}; do
checkPackage extra $(basename ${pkg}) ${arch}
done
done
@@ -82,7 +82,7 @@ testUpdateAnyPackage() {
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
- extra-i686-build >/dev/null 2>&1
+ sudo extra-i686-build >/dev/null 2>&1
mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/"
popd >/dev/null
@@ -100,7 +100,7 @@ testUpdateAnyPackageToDifferentRepositoriesAtOnce() {
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
- extra-i686-build >/dev/null 2>&1
+ sudo extra-i686-build >/dev/null 2>&1
mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/"
popd >/dev/null
diff --git a/test/test.d/ftpdir-cleanup.sh b/test/test.d/ftpdir-cleanup.sh
index 17287f5..77b02b8 100755
--- a/test/test.d/ftpdir-cleanup.sh
+++ b/test/test.d/ftpdir-cleanup.sh
@@ -106,13 +106,13 @@ testCleanupSplitPackages() {
../cron-jobs/ftpdir-cleanup >/dev/null
for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}${PKGEXT}; do
checkRemovedPackage extra ${pkgs[0]} ${arch}
[ -f "${FTP_BASE}/${PKGPOOL}/${pkg}" ] && fail "${PKGPOOL}/${pkg} found"
[ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg}" ] && fail "${repo}/os/${arch}/${pkg} found"
done
- for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}${PKGEXT}; do
checkPackage extra $(basename ${pkg}) ${arch}
done
done
diff --git a/test/test.d/pool-transition.sh b/test/test.d/pool-transition.sh
index 6d82e00..5873f00 100755
--- a/test/test.d/pool-transition.sh
+++ b/test/test.d/pool-transition.sh
@@ -22,7 +22,7 @@ testMovePackagesWithoutPool() {
# transform two packages to old style layout
for arch in ${arches[@]}; do
for old in 0 2; do
- for pkg in "${pkgdir}/${pkgs[${old}]}"/*-${arch}.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgs[${old}]}"/*-${arch}${PKGEXT}; do
pkg=$(basename $pkg)
mv -f "${FTP_BASE}/${PKGPOOL}/${pkg}" "${FTP_BASE}/testing/os/${arch}/${pkg}"
done
@@ -37,7 +37,7 @@ testMovePackagesWithoutPool() {
for pkgbase in ${pkgs[@]}; do
for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/${pkgbase}"/*-${arch}.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgbase}"/*-${arch}${PKGEXT}; do
checkPackage extra $(basename ${pkg}) ${arch}
done
checkRemovedPackage testing ${pkgbase} ${arch}
@@ -63,7 +63,7 @@ testUpdateAnyPackageWithoutPool() {
pushd "${TMP}/svn-packages-copy/${pkgname}/trunk/" >/dev/null
sed 's/pkgrel=1/pkgrel=2/g' -i PKGBUILD
svn commit -q -m"update pkg to pkgrel=2" >/dev/null
- extra-i686-build >/dev/null 2>&1
+ sudo extra-i686-build >/dev/null 2>&1
mv "${pkg2}" "${pkgdir}/${pkgname}/"
popd >/dev/null
@@ -94,7 +94,7 @@ testMoveAnyPackagesWithoutPool() {
../db-update
# transform a package to old style layout
- for pkg in "${pkgdir}/${pkgs[0]}"/*-any.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgs[0]}"/*-any${PKGEXT}; do
pkg=$(basename $pkg)
mv -f "${FTP_BASE}/${PKGPOOL}/${pkg}" "${FTP_BASE}/testing/os/any/${pkg}"
for arch in i686 x86_64; do
@@ -109,13 +109,13 @@ testMoveAnyPackagesWithoutPool() {
../cron-jobs/ftpdir-cleanup >/dev/null
for pkgbase in ${pkgs[@]}; do
- for pkg in "${pkgdir}/${pkgbase}"/*-any.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgbase}"/*-any${PKGEXT}; do
checkAnyPackage extra $(basename ${pkg})
done
checkRemovedAnyPackage testing ${pkgbase}
done
- for pkg in "${pkgdir}/${pkgs[0]}"/*-any.pkg.tar.*; do
+ for pkg in "${pkgdir}/${pkgs[0]}"/*-any${PKGEXT}; do
pkg=$(basename $pkg)
for arch in any i686 x86_64; do
[ -f "${FTP_BASE}/testing/os/${arch}/${pkg}" ] && fail "testing/os/${arch}/${pkg} found"
@@ -131,7 +131,7 @@ testUpdateSameAnyPackageToDifferentRepositoriesWithoutPool() {
../db-update
# transform a package to old style layout
- for pkg in "${pkgdir}/pkg-any-a"/*-any.pkg.tar.*; do
+ for pkg in "${pkgdir}/pkg-any-a"/*-any${PKGEXT}; do
pkg=$(basename $pkg)
mv -f "${FTP_BASE}/${PKGPOOL}/${pkg}" "${FTP_BASE}/extra/os/any/${pkg}"
for arch in i686 x86_64; do
diff --git a/test/test.d/testing2x.sh b/test/test.d/testing2x.sh
index 436716d..eda6cd6 100755
--- a/test/test.d/testing2x.sh
+++ b/test/test.d/testing2x.sh
@@ -10,7 +10,7 @@ testTesting2xAnyPackage() {
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
- extra-i686-build >/dev/null 2>&1
+ sudo extra-i686-build >/dev/null 2>&1
mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/"
popd >/dev/null