diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-09-23 20:23:50 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-09-23 20:23:50 -0300 |
commit | dfcaa1e1423a59057eb84273b1982d69f31e9be8 (patch) | |
tree | 2657bf9a15aadd177c7f29c12536fce2c702b780 /test/lib/common.inc | |
parent | b1fbfc099cb91a094128ffd86d16b2206a181f65 (diff) |
fix variables
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 781737a..19caf80 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}" - PKGREPOS=('core' 'extra' 'testing') - PKGPOOL='pool/packages' + repositories=('core' 'extra' 'testing') + packages_pool='pool/packages' mkdir -p "${temporary_directory}/"{ftp,tmp,staging,{package,source}-cleanup,svn-packages-{copy,repo}} - for r in ${PKGREPOS[@]}; do + for r in ${repositories[@]}; do mkdir -p "${temporary_directory}/staging/${r}" - for a in ${ARCHES[@]} any; do + for a in ${architectures[@]} any; do mkdir -p "${temporary_directory}/ftp/${r}/os/${a}" done done - mkdir -p "${temporary_directory}/ftp/${PKGPOOL}" - mkdir -p "${temporary_directory}/ftp/${SRCPOOL}" + mkdir -p "${temporary_directory}/ftp/${packages_pool}" + mkdir -p "${temporary_directory}/ftp/${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" - PKGREPOS=(${PKGREPOS[@]}) - PKGPOOL="${PKGPOOL}" + repositories=(${repositories[@]}) + packages_pool="${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}/${PKGPOOL}/${pkg}" ] || fail "${PKGPOOL}/${pkg} not found" + [ -r "${root_dir}/${packages_pool}/${pkg}" ] || fail "${packages_pool}/${pkg} not found" if ${require_signature}; then - [ -r "${root_dir}/${PKGPOOL}/${pkg}.sig" ] || fail "${PKGPOOL}/${pkg}.sig not found" + [ -r "${root_dir}/${packages_pool}/${pkg}.sig" ] || fail "${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}/${PKGPOOL}/${pkg}" ] \ - || fail "${repo}/os/${arch}/${pkg} does not link to ${PKGPOOL}/${pkg}" + [ "$(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}" 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}/${PKGPOOL}/${pkg}.sig" ] \ - || fail "${repo}/os/${arch}/${pkg}.sig does not link to ${PKGPOOL}/${pkg}.sig" + [ "$(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" 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}/${PKGPOOL}/${pkg}") + local pkgbase=$(getpkgbase "${root_dir}/${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}/${PKGPOOL}/${pkg}" ] || fail "${PKGPOOL}/${pkg} not found" + [ -r "${root_dir}/${packages_pool}/${pkg}" ] || fail "${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}/${PKGPOOL}/${pkg}" ] \ - || fail "${repo}/os/${arch}/${pkg} does not link to ${PKGPOOL}/${pkg}" + [ "$(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}" if ${require_signature}; then - [ -r "${root_dir}/${PKGPOOL}/${pkg}.sig" ] || fail "${PKGPOOL}/${pkg}.sig not found" + [ -r "${root_dir}/${packages_pool}/${pkg}.sig" ] || fail "${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}/${PKGPOOL}/${pkg}.sig" ] \ - || fail "${repo}/os/${arch}/${pkg}.sig does not link to ${PKGPOOL}/${pkg}.sig" + [ "$(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" 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}/${PKGPOOL}/${pkg}") + local pkgbase=$(getpkgbase "${root_dir}/${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" |