diff options
Diffstat (limited to 'test/lib/common.inc')
-rw-r--r-- | test/lib/common.inc | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/test/lib/common.inc b/test/lib/common.inc index dbfe988..846dfba 100644 --- a/test/lib/common.inc +++ b/test/lib/common.inc @@ -59,18 +59,18 @@ setUp() { temporary_directory="$(mktemp -d /dev/shm/$(basename $0).XXXXXXXXXX)" #msg "Using ${temporary_directory}" - native_repositories=('core' 'extra' 'testing') - main_packages_pool='pool/packages' + main_repositories=('core' 'extra' 'testing') + native_packages_pool='pool/packages' mkdir -p "${temporary_directory}/"{ftp,tmp,staging,{package,source}-cleanup,svn-packages-{copy,repo}} - for r in ${native_repositories[@]}; do + for r in ${main_repositories[@]}; do mkdir -p "${temporary_directory}/staging/${r}" - for a in ${native_architectures[@]} any; do + for a in ${main_architectures[@]} any; do mkdir -p "${temporary_directory}/ftp/${r}/os/${a}" done done - mkdir -p "${temporary_directory}/ftp/${main_packages_pool}" - mkdir -p "${temporary_directory}/ftp/${main_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" @@ -87,8 +87,8 @@ setUp() { cat <<eot > "$(dirname ${BASH_SOURCE[0]})/../../etc/dbscripts.local.cfg" root_dir="${temporary_directory}/ftp" SVN_repository="file://${temporary_directory}/svn-packages-repo" - native_repositories=(${native_repositories[@]}) - main_packages_pool="${main_packages_pool}" + main_repositories=(${main_repositories[@]}) + 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}/${main_packages_pool}/${pkg}" ] || fail "${main_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}/${main_packages_pool}/${pkg}.sig" ] || fail "${main_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}/${main_packages_pool}/${pkg}" ] \ - || fail "${repo}/os/${arch}/${pkg} does not link to ${main_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}/${main_packages_pool}/${pkg}.sig" ] \ - || fail "${repo}/os/${arch}/${pkg}.sig does not link to ${main_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}/${main_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}/${main_packages_pool}/${pkg}" ] || fail "${main_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}/${main_packages_pool}/${pkg}" ] \ - || fail "${repo}/os/${arch}/${pkg} does not link to ${main_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}/${main_packages_pool}/${pkg}.sig" ] || fail "${main_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}/${main_packages_pool}/${pkg}.sig" ] \ - || fail "${repo}/os/${arch}/${pkg}.sig does not link to ${main_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}/${main_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" |