summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lib/common.inc36
-rwxr-xr-xtest/test.d/db-repo-add.sh16
-rwxr-xr-xtest/test.d/ftpdir-cleanup.sh8
-rwxr-xr-xtest/test.d/pool-transition.sh10
-rwxr-xr-xtest/test.d/sourceballs.sh10
5 files changed, 40 insertions, 40 deletions
diff --git a/test/lib/common.inc b/test/lib/common.inc
index f43d531..9ccf1c8 100644
--- a/test/lib/common.inc
+++ b/test/lib/common.inc
@@ -60,7 +60,7 @@ setUp() {
#msg "Using ${temporary_directory}"
repositories=('core' 'extra' 'testing')
- packages_pool='pool/packages'
+ native_packages_pool='pool/packages'
mkdir -p "${temporary_directory}/"{ftp,tmp,staging,{package,source}-cleanup,svn-packages-{copy,repo}}
for r in ${repositories[@]}; do
@@ -69,8 +69,8 @@ setUp() {
mkdir -p "${temporary_directory}/ftp/${r}/os/${a}"
done
done
- mkdir -p "${temporary_directory}/ftp/${packages_pool}"
- mkdir -p "${temporary_directory}/ftp/${sources_pool}"
+ mkdir -p "${temporary_directory}/ftp/${native_packages_pool}"
+ mkdir -p "${temporary_directory}/ftp/${native_sources_pool}"
msg 'Creating svn repository...'
svnadmin create "${temporary_directory}/svn-packages-repo"
@@ -88,7 +88,7 @@ setUp() {
root_dir="${temporary_directory}/ftp"
SVN_repository="file://${temporary_directory}/svn-packages-repo"
repositories=(${repositories[@]})
- packages_pool="${packages_pool}"
+ native_packages_pool="${native_packages_pool}"
cleanup_destination_directory="${temporary_directory}/package-cleanup"
source_cleanup_destination_directory="${temporary_directory}/source-cleanup"
staging_directory="${temporary_directory}/staging"
@@ -131,20 +131,20 @@ checkAnyPackageDB() {
local arch
local db
- [ -r "${root_dir}/${packages_pool}/${pkg}" ] || fail "${packages_pool}/${pkg} not found"
+ [ -r "${root_dir}/${native_packages_pool}/${pkg}" ] || fail "${native_packages_pool}/${pkg} not found"
if ${require_signature}; then
- [ -r "${root_dir}/${packages_pool}/${pkg}.sig" ] || fail "${packages_pool}/${pkg}.sig not found"
+ [ -r "${root_dir}/${native_packages_pool}/${pkg}.sig" ] || fail "${native_packages_pool}/${pkg}.sig not found"
fi
for arch in i686 x86_64; do
[ -L "${root_dir}/${repo}/os/${arch}/${pkg}" ] || fail "${repo}/os/${arch}/${pkg} is not a symlink"
- [ "$(readlink -e "${root_dir}/${repo}/os/${arch}/${pkg}")" == "${root_dir}/${packages_pool}/${pkg}" ] \
- || fail "${repo}/os/${arch}/${pkg} does not link to ${packages_pool}/${pkg}"
+ [ "$(readlink -e "${root_dir}/${repo}/os/${arch}/${pkg}")" == "${root_dir}/${native_packages_pool}/${pkg}" ] \
+ || fail "${repo}/os/${arch}/${pkg} does not link to ${native_packages_pool}/${pkg}"
if ${require_signature}; then
[ -L "${root_dir}/${repo}/os/${arch}/${pkg}.sig" ] || fail "${repo}/os/${arch}/${pkg}.sig is not a symlink"
- [ "$(readlink -e "${root_dir}/${repo}/os/${arch}/${pkg}.sig")" == "${root_dir}/${packages_pool}/${pkg}.sig" ] \
- || fail "${repo}/os/${arch}/${pkg}.sig does not link to ${packages_pool}/${pkg}.sig"
+ [ "$(readlink -e "${root_dir}/${repo}/os/${arch}/${pkg}.sig")" == "${root_dir}/${native_packages_pool}/${pkg}.sig" ] \
+ || fail "${repo}/os/${arch}/${pkg}.sig does not link to ${native_packages_pool}/${pkg}.sig"
fi
done
[ -r "${staging_directory}"/${repo}/${pkg} ] && fail "${repo}/${pkg} found in staging directory"
@@ -166,7 +166,7 @@ checkAnyPackage() {
checkAnyPackageDB $repo $pkg
- local pkgbase=$(getpkgbase "${root_dir}/${packages_pool}/${pkg}")
+ local pkgbase=$(getpkgbase "${root_dir}/${native_packages_pool}/${pkg}")
svn up -q "${temporary_directory}/svn-packages-copy/${pkgbase}"
[ -d "${temporary_directory}/svn-packages-copy/${pkgbase}/repos/${repo}-any" ] \
|| fail "svn-packages-copy/${pkgbase}/repos/${repo}-any does not exist"
@@ -178,20 +178,20 @@ checkPackageDB() {
local arch=$3
local db
- [ -r "${root_dir}/${packages_pool}/${pkg}" ] || fail "${packages_pool}/${pkg} not found"
+ [ -r "${root_dir}/${native_packages_pool}/${pkg}" ] || fail "${native_packages_pool}/${pkg} not found"
[ -L "${root_dir}/${repo}/os/${arch}/${pkg}" ] || fail "${repo}/os/${arch}/${pkg} not a symlink"
[ -r "${staging_directory}"/${repo}/${pkg} ] && fail "${repo}/${pkg} found in staging directory"
- [ "$(readlink -e "${root_dir}/${repo}/os/${arch}/${pkg}")" == "${root_dir}/${packages_pool}/${pkg}" ] \
- || fail "${repo}/os/${arch}/${pkg} does not link to ${packages_pool}/${pkg}"
+ [ "$(readlink -e "${root_dir}/${repo}/os/${arch}/${pkg}")" == "${root_dir}/${native_packages_pool}/${pkg}" ] \
+ || fail "${repo}/os/${arch}/${pkg} does not link to ${native_packages_pool}/${pkg}"
if ${require_signature}; then
- [ -r "${root_dir}/${packages_pool}/${pkg}.sig" ] || fail "${packages_pool}/${pkg}.sig not found"
+ [ -r "${root_dir}/${native_packages_pool}/${pkg}.sig" ] || fail "${native_packages_pool}/${pkg}.sig not found"
[ -L "${root_dir}/${repo}/os/${arch}/${pkg}.sig" ] || fail "${repo}/os/${arch}/${pkg}.sig is not a symlink"
[ -r "${staging_directory}"/${repo}/${pkg}.sig ] && fail "${repo}/${pkg}.sig found in staging directory"
- [ "$(readlink -e "${root_dir}/${repo}/os/${arch}/${pkg}.sig")" == "${root_dir}/${packages_pool}/${pkg}.sig" ] \
- || fail "${repo}/os/${arch}/${pkg}.sig does not link to ${packages_pool}/${pkg}.sig"
+ [ "$(readlink -e "${root_dir}/${repo}/os/${arch}/${pkg}.sig")" == "${root_dir}/${native_packages_pool}/${pkg}.sig" ] \
+ || fail "${repo}/os/${arch}/${pkg}.sig does not link to ${native_packages_pool}/${pkg}.sig"
fi
for db in ${database_extension_suffixfile} ${files_extension_suffixfile}; do
@@ -208,7 +208,7 @@ checkPackage() {
checkPackageDB $repo $pkg $arch
- local pkgbase=$(getpkgbase "${root_dir}/${packages_pool}/${pkg}")
+ local pkgbase=$(getpkgbase "${root_dir}/${native_packages_pool}/${pkg}")
svn up -q "${temporary_directory}/svn-packages-copy/${pkgbase}"
[ -d "${temporary_directory}/svn-packages-copy/${pkgbase}/repos/${repo}-${arch}" ] \
|| fail "svn-packages-copy/${pkgbase}/repos/${repo}-${arch} does not exist"
diff --git a/test/test.d/db-repo-add.sh b/test/test.d/db-repo-add.sh
index 3542dae..54dd704 100755
--- a/test/test.d/db-repo-add.sh
+++ b/test/test.d/db-repo-add.sh
@@ -11,10 +11,10 @@ testAddSimplePackages() {
for pkgbase in ${pkgs[@]}; do
for arch in ${arches[@]}; do
- cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/${packages_pool}/"
- touch "${root_dir}/${packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig"
- ln -s "${root_dir}/${packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/extra/os/${arch}/"
- ln -s "${root_dir}/${packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" "${root_dir}/extra/os/${arch}/"
+ cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/${native_packages_pool}/"
+ touch "${root_dir}/${native_packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig"
+ ln -s "${root_dir}/${native_packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/extra/os/${arch}/"
+ ln -s "${root_dir}/${native_packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" "${root_dir}/extra/os/${arch}/"
../db-repo-add extra ${arch} ${pkgbase}-1-1-${arch}.pkg.tar.xz
done
done
@@ -35,10 +35,10 @@ testAddMultiplePackages() {
for arch in ${arches[@]}; do
add_pkgs=()
for pkgbase in ${pkgs[@]}; do
- cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/${packages_pool}/"
- touch "${root_dir}/${packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig"
- ln -s "${root_dir}/${packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/extra/os/${arch}/"
- ln -s "${root_dir}/${packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" "${root_dir}/extra/os/${arch}/"
+ cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/${native_packages_pool}/"
+ touch "${root_dir}/${native_packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig"
+ ln -s "${root_dir}/${native_packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/extra/os/${arch}/"
+ ln -s "${root_dir}/${native_packages_pool}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" "${root_dir}/extra/os/${arch}/"
add_pkgs[${#add_pkgs[*]}]=${pkgbase}-1-1-${arch}.pkg.tar.xz
done
../db-repo-add extra ${arch} ${add_pkgs[@]}
diff --git a/test/test.d/ftpdir-cleanup.sh b/test/test.d/ftpdir-cleanup.sh
index 3210fee..61f5758 100755
--- a/test/test.d/ftpdir-cleanup.sh
+++ b/test/test.d/ftpdir-cleanup.sh
@@ -26,7 +26,7 @@ testCleanupSimplePackages() {
for arch in ${arches[@]}; do
local pkg1="pkg-simple-a-1-1-${arch}.pkg.tar.xz"
checkRemovedPackage extra 'pkg-simple-a' ${arch}
- [ -f "${root_dir}/${packages_pool}/${pkg1}" ] && fail "${packages_pool}/${pkg1} found"
+ [ -f "${root_dir}/${native_packages_pool}/${pkg1}" ] && fail "${native_packages_pool}/${pkg1} found"
[ -f "${root_dir}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found"
local pkg2="pkg-simple-b-1-1-${arch}.pkg.tar.xz"
@@ -57,7 +57,7 @@ testCleanupEpochPackages() {
for arch in ${arches[@]}; do
local pkg1="pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz"
checkRemovedPackage extra 'pkg-simple-epoch' ${arch}
- [ -f "${root_dir}/${packages_pool}/${pkg1}" ] && fail "${packages_pool}/${pkg1} found"
+ [ -f "${root_dir}/${native_packages_pool}/${pkg1}" ] && fail "${native_packages_pool}/${pkg1} found"
[ -f "${root_dir}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found"
done
}
@@ -77,7 +77,7 @@ testCleanupAnyPackages() {
local pkg1='pkg-any-a-1-1-any.pkg.tar.xz'
checkRemovedAnyPackage extra 'pkg-any-a'
- [ -f "${root_dir}/${packages_pool}/${pkg1}" ] && fail "${packages_pool}/${pkg1} found"
+ [ -f "${root_dir}/${native_packages_pool}/${pkg1}" ] && fail "${native_packages_pool}/${pkg1} found"
[ -f "${root_dir}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found"
local pkg2="pkg-any-b-1-1-${arch}.pkg.tar.xz"
@@ -108,7 +108,7 @@ testCleanupSplitPackages() {
for arch in ${arches[@]}; do
for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}${package_extension_suffixfile}; do
checkRemovedPackage extra ${pkgs[0]} ${arch}
- [ -f "${root_dir}/${packages_pool}/${pkg}" ] && fail "${packages_pool}/${pkg} found"
+ [ -f "${root_dir}/${native_packages_pool}/${pkg}" ] && fail "${native_packages_pool}/${pkg} found"
[ -f "${root_dir}/${repo}/os/${arch}/${pkg}" ] && fail "${repo}/os/${arch}/${pkg} found"
done
diff --git a/test/test.d/pool-transition.sh b/test/test.d/pool-transition.sh
index 1d00ee7..390d097 100755
--- a/test/test.d/pool-transition.sh
+++ b/test/test.d/pool-transition.sh
@@ -24,7 +24,7 @@ testMovePackagesWithoutPool() {
for old in 0 2; do
for pkg in "${pkgdir}/${pkgs[${old}]}"/*-${arch}${package_extension_suffixfile}; do
pkg=$(basename $pkg)
- mv -f "${root_dir}/${packages_pool}/${pkg}" "${root_dir}/testing/os/${arch}/${pkg}"
+ mv -f "${root_dir}/${native_packages_pool}/${pkg}" "${root_dir}/testing/os/${arch}/${pkg}"
done
done
done
@@ -55,7 +55,7 @@ testUpdateAnyPackageWithoutPool() {
releasePackage extra pkg-any-a any
../db-update
# transform two packages to old style layout
- mv -f "${root_dir}/${packages_pool}/${pkg1}" "${root_dir}/extra/os/any"
+ mv -f "${root_dir}/${native_packages_pool}/${pkg1}" "${root_dir}/extra/os/any"
for arch in i686 x86_64; do
ln -sf "../any/${pkg1}" "${root_dir}/extra/os/${arch}"
done
@@ -75,7 +75,7 @@ testUpdateAnyPackageWithoutPool() {
checkAnyPackage extra "${pkg2}"
- [ -f "${root_dir}/${packages_pool}/${pkg1}" ] && fail "${packages_pool}/${pkg1} found"
+ [ -f "${root_dir}/${native_packages_pool}/${pkg1}" ] && fail "${native_packages_pool}/${pkg1} found"
for arch in any i686 x86_64; do
[ -f "${root_dir}/extra/os/${arch}/${pkg1}" ] && fail "extra/os/${arch}/${pkg1} found"
done
@@ -96,7 +96,7 @@ testMoveAnyPackagesWithoutPool() {
# transform a package to old style layout
for pkg in "${pkgdir}/${pkgs[0]}"/*-any${package_extension_suffixfile}; do
pkg=$(basename $pkg)
- mv -f "${root_dir}/${packages_pool}/${pkg}" "${root_dir}/testing/os/any/${pkg}"
+ mv -f "${root_dir}/${native_packages_pool}/${pkg}" "${root_dir}/testing/os/any/${pkg}"
for arch in i686 x86_64; do
ln -sf "../any/${pkg}" "${root_dir}/testing/os/${arch}/${pkg}"
done
@@ -133,7 +133,7 @@ testUpdateSameAnyPackageToDifferentRepositoriesWithoutPool() {
# transform a package to old style layout
for pkg in "${pkgdir}/pkg-any-a"/*-any${package_extension_suffixfile}; do
pkg=$(basename $pkg)
- mv -f "${root_dir}/${packages_pool}/${pkg}" "${root_dir}/extra/os/any/${pkg}"
+ mv -f "${root_dir}/${native_packages_pool}/${pkg}" "${root_dir}/extra/os/any/${pkg}"
for arch in i686 x86_64; do
ln -sf "../any/${pkg}" "${root_dir}/extra/os/${arch}/${pkg}"
done
diff --git a/test/test.d/sourceballs.sh b/test/test.d/sourceballs.sh
index 40debb6..314f2e5 100755
--- a/test/test.d/sourceballs.sh
+++ b/test/test.d/sourceballs.sh
@@ -18,7 +18,7 @@ testSourceballs() {
../cron-jobs/sourceballs
for pkgbase in ${pkgs[@]}; do
- [ ! -r ${root_dir}/${sources_pool}/${pkgbase}-*${source_extension_suffixfile} ] && fail "source package not found!"
+ [ ! -r ${root_dir}/${native_sources_pool}/${pkgbase}-*${source_extension_suffixfile} ] && fail "source package not found!"
done
}
@@ -33,7 +33,7 @@ testAnySourceballs() {
../cron-jobs/sourceballs
for pkgbase in ${pkgs[@]}; do
- [ ! -r ${root_dir}/${sources_pool}/${pkgbase}-*${source_extension_suffixfile} ] && fail "source package not found!"
+ [ ! -r ${root_dir}/${native_sources_pool}/${pkgbase}-*${source_extension_suffixfile} ] && fail "source package not found!"
done
}
@@ -54,7 +54,7 @@ testSplitSourceballs() {
../cron-jobs/sourceballs
for pkgbase in ${pkgs[@]}; do
- [ ! -r ${root_dir}/${sources_pool}/${pkgbase}-*${source_extension_suffixfile} ] && fail "source package not found!"
+ [ ! -r ${root_dir}/${native_sources_pool}/${pkgbase}-*${source_extension_suffixfile} ] && fail "source package not found!"
done
}
@@ -77,8 +77,8 @@ testSourceballsCleanup() {
done
../cron-jobs/sourceballs
- [ -r ${root_dir}/${sources_pool}/pkg-simple-a-*${source_extension_suffixfile} ] && fail "source package was not removed!"
- [ ! -r ${root_dir}/${sources_pool}/pkg-simple-b-*${source_extension_suffixfile} ] && fail "source package not found!"
+ [ -r ${root_dir}/${native_sources_pool}/pkg-simple-a-*${source_extension_suffixfile} ] && fail "source package was not removed!"
+ [ ! -r ${root_dir}/${native_sources_pool}/pkg-simple-b-*${source_extension_suffixfile} ] && fail "source package not found!"
}
source "${curdir}/../lib/shunit2"