From b2952784db9995ecc21d3a770530a19394234d3b Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Oct 2012 14:32:39 +0200 Subject: Add the possibility to run all svn commands with a different user * A SVNUSER can be configured in the config file * This user needs to be able to call svn without a password --- test/lib/common.inc | 14 +++++++------- test/test.d/db-update.sh | 4 ++-- test/test.d/testing2x.sh | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/lib/common.inc b/test/lib/common.inc index 35cdaee..aeceece 100644 --- a/test/lib/common.inc +++ b/test/lib/common.inc @@ -91,14 +91,14 @@ setUp() { msg 'Creating svn repository...' svnadmin create "${TMP}/svn-packages-repo" - svn checkout -q "file://${TMP}/svn-packages-repo" "${TMP}/svn-packages-copy" + arch_svn checkout -q "file://${TMP}/svn-packages-repo" "${TMP}/svn-packages-copy" for p in "${pkgdir}"/*; do pkg=${p##*/} mkdir -p "${TMP}/svn-packages-copy/${pkg}"/{trunk,repos} cp "${p}"/* "${TMP}/svn-packages-copy"/${pkg}/trunk/ - svn add -q "${TMP}/svn-packages-copy"/${pkg} - svn commit -q -m"initial commit of ${pkg}" "${TMP}/svn-packages-copy" + arch_svn add -q "${TMP}/svn-packages-copy"/${pkg} + arch_svn commit -q -m"initial commit of ${pkg}" "${TMP}/svn-packages-copy" done cat < "$(dirname ${BASH_SOURCE[0]})/../../config.local" @@ -189,7 +189,7 @@ checkAnyPackage() { checkAnyPackageDB $repo $pkg local pkgbase=$(getpkgbase "${FTP_BASE}/${PKGPOOL}/${pkg}") - svn up -q "${TMP}/svn-packages-copy/${pkgbase}" + arch_svn up -q "${TMP}/svn-packages-copy/${pkgbase}" [ -d "${TMP}/svn-packages-copy/${pkgbase}/repos/${repo}-any" ] \ || fail "svn-packages-copy/${pkgbase}/repos/${repo}-any does not exist" } @@ -231,7 +231,7 @@ checkPackage() { checkPackageDB $repo $pkg $arch local pkgbase=$(getpkgbase "${FTP_BASE}/${PKGPOOL}/${pkg}") - svn up -q "${TMP}/svn-packages-copy/${pkgbase}" + arch_svn up -q "${TMP}/svn-packages-copy/${pkgbase}" [ -d "${TMP}/svn-packages-copy/${pkgbase}/repos/${repo}-${arch}" ] \ || fail "svn-packages-copy/${pkgbase}/repos/${repo}-${arch} does not exist" } @@ -256,7 +256,7 @@ checkRemovedPackage() { checkRemovedPackageDB $repo $pkgbase $arch - svn up -q "${TMP}/svn-packages-copy/${pkgbase}" + arch_svn up -q "${TMP}/svn-packages-copy/${pkgbase}" [ -d "${TMP}/svn-packages-copy/${pkgbase}/repos/${repo}-${arch}" ] \ && fail "svn-packages-copy/${pkgbase}/repos/${repo}-${arch} should not exist" } @@ -282,7 +282,7 @@ checkRemovedAnyPackage() { checkRemovedAnyPackageDB $repo $pkgbase - svn up -q "${TMP}/svn-packages-copy/${pkgbase}" + arch_svn up -q "${TMP}/svn-packages-copy/${pkgbase}" [ -d "${TMP}/svn-packages-copy/${pkgbase}/repos/${repo}-any" ] \ && fail "svn-packages-copy/${pkgbase}/repos/${repo}-any should not exist" } diff --git a/test/test.d/db-update.sh b/test/test.d/db-update.sh index 67bca9f..ea1e130 100755 --- a/test/test.d/db-update.sh +++ b/test/test.d/db-update.sh @@ -81,7 +81,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 + arch_svn commit -q -m"update pkg to pkgrel=2" >/dev/null sudo extra-i686-build mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/" popd >/dev/null @@ -99,7 +99,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 + arch_svn commit -q -m"update pkg to pkgrel=2" >/dev/null sudo extra-i686-build mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/" popd >/dev/null diff --git a/test/test.d/testing2x.sh b/test/test.d/testing2x.sh index 357f3c2..31d85b4 100755 --- a/test/test.d/testing2x.sh +++ b/test/test.d/testing2x.sh @@ -9,7 +9,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 + arch_svn commit -q -m"update pkg to pkgrel=2" >/dev/null sudo extra-i686-build mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/" popd >/dev/null -- cgit v1.2.3-54-g00ecf