summaryrefslogtreecommitdiff
path: root/test/test.d
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.d')
-rwxr-xr-xtest/test.d/create-filelists.sh22
-rwxr-xr-xtest/test.d/db-move.sh4
-rwxr-xr-xtest/test.d/db-update.sh20
-rwxr-xr-xtest/test.d/ftpdir-cleanup.sh4
-rwxr-xr-xtest/test.d/packages.sh2
-rwxr-xr-xtest/test.d/pool-transition.sh20
-rwxr-xr-xtest/test.d/signed-packages.sh2
-rwxr-xr-xtest/test.d/sourceballs.sh10
-rwxr-xr-xtest/test.d/testing2x.sh2
9 files changed, 43 insertions, 43 deletions
diff --git a/test/test.d/create-filelists.sh b/test/test.d/create-filelists.sh
index 3e27d64..c1f43e9 100755
--- a/test/test.d/create-filelists.sh
+++ b/test/test.d/create-filelists.sh
@@ -18,8 +18,8 @@ testCreateSimpleFileLists() {
for pkgbase in ${pkgs[@]}; do
for arch in ${arches[@]}; do
- if ! bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/${pkgbase}"; then
- fail "usr/bin/${pkgbase} not found in ${arch}/extra${FILESEXT}"
+ if ! bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${files_extension_suffixfile}" | grep -q "usr/bin/${pkgbase}"; then
+ fail "usr/bin/${pkgbase} not found in ${arch}/extra${files_extension_suffixfile}"
fi
done
done
@@ -38,8 +38,8 @@ testCreateAnyFileLists() {
for pkgbase in ${pkgs[@]}; do
for arch in ${arches[@]}; do
- if ! bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/share/${pkgbase}/test"; then
- fail "usr/share/${pkgbase}/test not found in ${arch}/extra${FILESEXT}"
+ if ! bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${files_extension_suffixfile}" | grep -q "usr/share/${pkgbase}/test"; then
+ fail "usr/share/${pkgbase}/test not found in ${arch}/extra${files_extension_suffixfile}"
fi
done
done
@@ -62,11 +62,11 @@ testCreateSplitFileLists() {
../db-update
for pkgbase in ${pkgs[@]}; do
- pkgnames=($(source "${TMP}/svn-packages-copy/${pkgbase}/trunk/PKGBUILD"; echo ${pkgname[@]}))
+ pkgnames=($(source "${temporary_directory}/svn-packages-copy/${pkgbase}/trunk/PKGBUILD"; echo ${pkgname[@]}))
for pkgname in ${pkgnames[@]}; do
for arch in ${arches[@]}; do
- if ! bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/${pkgname}"; then
- fail "usr/bin/${pkgname} not found in ${arch}/extra${FILESEXT}"
+ if ! bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${files_extension_suffixfile}" | grep -q "usr/bin/${pkgname}"; then
+ fail "usr/bin/${pkgname} not found in ${arch}/extra${files_extension_suffixfile}"
fi
done
done
@@ -92,11 +92,11 @@ testCleanupFileLists() {
done
for arch in ${arches[@]}; do
- if ! bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/pkg-simple-b"; then
- fail "usr/bin/pkg-simple-b not found in ${arch}/extra${FILESEXT}"
+ if ! bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${files_extension_suffixfile}" | grep -q "usr/bin/pkg-simple-b"; then
+ fail "usr/bin/pkg-simple-b not found in ${arch}/extra${files_extension_suffixfile}"
fi
- if bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/pkg-simple-a"; then
- fail "usr/bin/pkg-simple-a still found in ${arch}/extra${FILESEXT}"
+ if bsdtar -xOf "${root_dir}/extra/os/${arch}/extra${files_extension_suffixfile}" | grep -q "usr/bin/pkg-simple-a"; then
+ fail "usr/bin/pkg-simple-a still found in ${arch}/extra${files_extension_suffixfile}"
fi
done
diff --git a/test/test.d/db-move.sh b/test/test.d/db-move.sh
index 9d7c1f6..04c8113 100755
--- a/test/test.d/db-move.sh
+++ b/test/test.d/db-move.sh
@@ -106,12 +106,12 @@ testMoveSplitPackages() {
../db-move testing extra pkg-split-a
for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/pkg-split-a"/*-${arch}${PKGEXT}; do
+ for pkg in "${pkgdir}/pkg-split-a"/*-${arch}${package_extension_suffixfile}; do
checkPackage extra $(basename ${pkg}) ${arch}
done
done
for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/pkg-split-b"/*-${arch}${PKGEXT}; do
+ for pkg in "${pkgdir}/pkg-split-b"/*-${arch}${package_extension_suffixfile}; 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 c0b7501..3ce9037 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}${PKGEXT}; do
+ for pkg in "${pkgdir}/${pkgbase}"/*-${arch}${package_extension_suffixfile}; do
checkPackage extra $(basename ${pkg}) ${arch}
done
done
@@ -79,7 +79,7 @@ testUpdateAnyPackage() {
releasePackage extra pkg-any-a any
../db-update
- pushd "${TMP}/svn-packages-copy/pkg-any-a/trunk/" >/dev/null
+ pushd "${temporary_directory}/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
sudo extra-i686-build >/dev/null 2>&1
@@ -97,7 +97,7 @@ testUpdateAnyPackage() {
testUpdateAnyPackageToDifferentRepositoriesAtOnce() {
releasePackage extra pkg-any-a any
- pushd "${TMP}/svn-packages-copy/pkg-any-a/trunk/" >/dev/null
+ pushd "${temporary_directory}/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
sudo extra-i686-build >/dev/null 2>&1
@@ -133,9 +133,9 @@ testUpdateSameAnyPackageToDifferentRepositories() {
local arch
for arch in i686 x86_64; do
- ( [ -r "${root_dir}/testing/os/${arch}/testing${DBEXT%.tar.*}" ] \
- && bsdtar -xf "${root_dir}/testing/os/${arch}/testing${DBEXT%.tar.*}" -O | grep -q ${pkgbase}) \
- && fail "${pkgbase} should not be in testing/os/${arch}/testing${DBEXT%.tar.*}"
+ ( [ -r "${root_dir}/testing/os/${arch}/testing${database_extension_suffixfile%.tar.*}" ] \
+ && bsdtar -xf "${root_dir}/testing/os/${arch}/testing${database_extension_suffixfile%.tar.*}" -O | grep -q ${pkgbase}) \
+ && fail "${pkgbase} should not be in testing/os/${arch}/testing${database_extension_suffixfile%.tar.*}"
done
}
@@ -151,14 +151,14 @@ testAddIncompleteSplitPackage() {
done
# remove a split package to make db-update fail
- rm "${STAGING}"/extra/${pkgbase}1-*
+ rm "${staging_directory}"/extra/${pkgbase}1-*
../db-update >/dev/null 2>&1 && fail "db-update should fail when a split package is missing!"
for arch in ${arches[@]}; do
- ( [ -r "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" ] \
- && bsdtar -xf "${root_dir}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" -O | grep -q ${pkgbase}) \
- && fail "${pkgbase} should not be in ${repo}/os/${arch}/${repo}${DBEXT%.tar.*}"
+ ( [ -r "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile%.tar.*}" ] \
+ && bsdtar -xf "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile%.tar.*}" -O | grep -q ${pkgbase}) \
+ && fail "${pkgbase} should not be in ${repo}/os/${arch}/${repo}${database_extension_suffixfile%.tar.*}"
done
}
diff --git a/test/test.d/ftpdir-cleanup.sh b/test/test.d/ftpdir-cleanup.sh
index ad88484..4e7e1f5 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}${PKGEXT}; do
+ for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}${package_extension_suffixfile}; do
checkRemovedPackage extra ${pkgs[0]} ${arch}
[ -f "${root_dir}/${PKGPOOL}/${pkg}" ] && fail "${PKGPOOL}/${pkg} found"
[ -f "${root_dir}/${repo}/os/${arch}/${pkg}" ] && fail "${repo}/os/${arch}/${pkg} found"
done
- for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}${PKGEXT}; do
+ for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}${package_extension_suffixfile}; do
checkPackage extra $(basename ${pkg}) ${arch}
done
done
diff --git a/test/test.d/packages.sh b/test/test.d/packages.sh
index 488cb15..5028448 100755
--- a/test/test.d/packages.sh
+++ b/test/test.d/packages.sh
@@ -5,7 +5,7 @@ curdir=$(readlink -e $(dirname $0))
testPackages() {
# TODO: namcap -r sodepends fails with i686 packages
- find "${pkgdir}" -name "*${PKGEXT}" -exec namcap -e sodepends,pkgnameindesc {} + || fail 'namcap failed'
+ find "${pkgdir}" -name "*${package_extension_suffixfile}" -exec namcap -e sodepends,pkgnameindesc {} + || fail 'namcap failed'
}
. "${curdir}/../lib/shunit2"
diff --git a/test/test.d/pool-transition.sh b/test/test.d/pool-transition.sh
index e91eed3..9f13d83 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}${PKGEXT}; do
+ for pkg in "${pkgdir}/${pkgs[${old}]}"/*-${arch}${package_extension_suffixfile}; do
pkg=$(basename $pkg)
mv -f "${root_dir}/${PKGPOOL}/${pkg}" "${root_dir}/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}${PKGEXT}; do
+ for pkg in "${pkgdir}/${pkgbase}"/*-${arch}${package_extension_suffixfile}; do
checkPackage extra $(basename ${pkg}) ${arch}
done
checkRemovedPackage testing ${pkgbase} ${arch}
@@ -60,7 +60,7 @@ testUpdateAnyPackageWithoutPool() {
ln -sf "../any/${pkg1}" "${root_dir}/extra/os/${arch}"
done
- pushd "${TMP}/svn-packages-copy/${pkgname}/trunk/" >/dev/null
+ pushd "${temporary_directory}/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
sudo extra-i686-build >/dev/null 2>&1
@@ -94,7 +94,7 @@ testMoveAnyPackagesWithoutPool() {
../db-update
# transform a package to old style layout
- for pkg in "${pkgdir}/${pkgs[0]}"/*-any${PKGEXT}; do
+ for pkg in "${pkgdir}/${pkgs[0]}"/*-any${package_extension_suffixfile}; do
pkg=$(basename $pkg)
mv -f "${root_dir}/${PKGPOOL}/${pkg}" "${root_dir}/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${PKGEXT}; do
+ for pkg in "${pkgdir}/${pkgbase}"/*-any${package_extension_suffixfile}; do
checkAnyPackage extra $(basename ${pkg})
done
checkRemovedAnyPackage testing ${pkgbase}
done
- for pkg in "${pkgdir}/${pkgs[0]}"/*-any${PKGEXT}; do
+ for pkg in "${pkgdir}/${pkgs[0]}"/*-any${package_extension_suffixfile}; do
pkg=$(basename $pkg)
for arch in any i686 x86_64; do
[ -f "${root_dir}/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${PKGEXT}; do
+ for pkg in "${pkgdir}/pkg-any-a"/*-any${package_extension_suffixfile}; do
pkg=$(basename $pkg)
mv -f "${root_dir}/${PKGPOOL}/${pkg}" "${root_dir}/extra/os/any/${pkg}"
for arch in i686 x86_64; do
@@ -143,9 +143,9 @@ testUpdateSameAnyPackageToDifferentRepositoriesWithoutPool() {
../db-update >/dev/null 2>&1 && (fail 'Adding an existing package to another repository should fail'; return 1)
for arch in i686 x86_64; do
- ( [ -r "${root_dir}/testing/os/${arch}/testing${DBEXT%.tar.*}" ] \
- && bsdtar -xf "${root_dir}/testing/os/${arch}/testing${DBEXT%.tar.*}" -O | grep -q pkg-any-a) \
- && fail "pkg-any-a should not be in testing/os/${arch}/testing${DBEXT%.tar.*}"
+ ( [ -r "${root_dir}/testing/os/${arch}/testing${database_extension_suffixfile%.tar.*}" ] \
+ && bsdtar -xf "${root_dir}/testing/os/${arch}/testing${database_extension_suffixfile%.tar.*}" -O | grep -q pkg-any-a) \
+ && fail "pkg-any-a should not be in testing/os/${arch}/testing${database_extension_suffixfile%.tar.*}"
done
}
diff --git a/test/test.d/signed-packages.sh b/test/test.d/signed-packages.sh
index 5d6f4ff..d7c5e57 100755
--- a/test/test.d/signed-packages.sh
+++ b/test/test.d/signed-packages.sh
@@ -6,7 +6,7 @@ curdir=$(readlink -e $(dirname $0))
testAddUnsignedPackage() {
releasePackage extra 'pkg-simple-a' 'i686'
# remove any signature
- rm "${STAGING}"/extra/*.sig
+ rm "${staging_directory}"/extra/*.sig
../db-update >/dev/null 2>&1 && fail "db-update should fail when a signature is missing!"
}
diff --git a/test/test.d/sourceballs.sh b/test/test.d/sourceballs.sh
index 9e8cb26..a34093a 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}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
+ [ ! -r ${root_dir}/${SRCPOOL}/${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}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
+ [ ! -r ${root_dir}/${SRCPOOL}/${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}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
+ [ ! -r ${root_dir}/${SRCPOOL}/${pkgbase}-*${source_extension_suffixfile} ] && fail "source package not found!"
done
}
@@ -77,8 +77,8 @@ testSourceballsCleanup() {
done
../cron-jobs/sourceballs
- [ -r ${root_dir}/${SRCPOOL}/pkg-simple-a-*${SRCEXT} ] && fail "source package was not removed!"
- [ ! -r ${root_dir}/${SRCPOOL}/pkg-simple-b-*${SRCEXT} ] && fail "source package not found!"
+ [ -r ${root_dir}/${SRCPOOL}/pkg-simple-a-*${source_extension_suffixfile} ] && fail "source package was not removed!"
+ [ ! -r ${root_dir}/${SRCPOOL}/pkg-simple-b-*${source_extension_suffixfile} ] && fail "source package not found!"
}
. "${curdir}/../lib/shunit2"
diff --git a/test/test.d/testing2x.sh b/test/test.d/testing2x.sh
index eda6cd6..d0d08d5 100755
--- a/test/test.d/testing2x.sh
+++ b/test/test.d/testing2x.sh
@@ -7,7 +7,7 @@ testTesting2xAnyPackage() {
releasePackage core pkg-any-a any
../db-update
- pushd "${TMP}/svn-packages-copy/pkg-any-a/trunk/" >/dev/null
+ pushd "${temporary_directory}/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
sudo extra-i686-build >/dev/null 2>&1