summaryrefslogtreecommitdiff
path: root/test/test.d
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.d')
-rwxr-xr-xtest/test.d/create-filelists.sh10
-rwxr-xr-xtest/test.d/db-repo-add.sh16
-rwxr-xr-xtest/test.d/db-update.sh8
-rwxr-xr-xtest/test.d/ftpdir-cleanup.sh16
-rwxr-xr-xtest/test.d/pool-transition.sh24
-rwxr-xr-xtest/test.d/sourceballs.sh10
6 files changed, 42 insertions, 42 deletions
diff --git a/test/test.d/create-filelists.sh b/test/test.d/create-filelists.sh
index 49734c4..3e27d64 100755
--- a/test/test.d/create-filelists.sh
+++ b/test/test.d/create-filelists.sh
@@ -18,7 +18,7 @@ testCreateSimpleFileLists() {
for pkgbase in ${pkgs[@]}; do
for arch in ${arches[@]}; do
- if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/${pkgbase}"; then
+ 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}"
fi
done
@@ -38,7 +38,7 @@ testCreateAnyFileLists() {
for pkgbase in ${pkgs[@]}; do
for arch in ${arches[@]}; do
- if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/share/${pkgbase}/test"; then
+ 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}"
fi
done
@@ -65,7 +65,7 @@ testCreateSplitFileLists() {
pkgnames=($(source "${TMP}/svn-packages-copy/${pkgbase}/trunk/PKGBUILD"; echo ${pkgname[@]}))
for pkgname in ${pkgnames[@]}; do
for arch in ${arches[@]}; do
- if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/${pkgname}"; then
+ 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}"
fi
done
@@ -92,10 +92,10 @@ testCleanupFileLists() {
done
for arch in ${arches[@]}; do
- if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/pkg-simple-b"; then
+ 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}"
fi
- if bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/pkg-simple-a"; then
+ 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}"
fi
done
diff --git a/test/test.d/db-repo-add.sh b/test/test.d/db-repo-add.sh
index 8603104..7a201f9 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" "${FTP_BASE}/${PKGPOOL}/"
- touch "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig"
- ln -s "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${FTP_BASE}/extra/os/${arch}/"
- ln -s "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" "${FTP_BASE}/extra/os/${arch}/"
+ cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/${PKGPOOL}/"
+ touch "${root_dir}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig"
+ ln -s "${root_dir}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/extra/os/${arch}/"
+ ln -s "${root_dir}/${PKGPOOL}/${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" "${FTP_BASE}/${PKGPOOL}/"
- touch "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig"
- ln -s "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${FTP_BASE}/extra/os/${arch}/"
- ln -s "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" "${FTP_BASE}/extra/os/${arch}/"
+ cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/${PKGPOOL}/"
+ touch "${root_dir}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig"
+ ln -s "${root_dir}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${root_dir}/extra/os/${arch}/"
+ ln -s "${root_dir}/${PKGPOOL}/${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/db-update.sh b/test/test.d/db-update.sh
index e38c328..c0b7501 100755
--- a/test/test.d/db-update.sh
+++ b/test/test.d/db-update.sh
@@ -133,8 +133,8 @@ testUpdateSameAnyPackageToDifferentRepositories() {
local arch
for arch in i686 x86_64; do
- ( [ -r "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" ] \
- && bsdtar -xf "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" -O | grep -q ${pkgbase}) \
+ ( [ -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.*}"
done
}
@@ -156,8 +156,8 @@ testAddIncompleteSplitPackage() {
../db-update >/dev/null 2>&1 && fail "db-update should fail when a split package is missing!"
for arch in ${arches[@]}; do
- ( [ -r "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" ] \
- && bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" -O | grep -q ${pkgbase}) \
+ ( [ -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.*}"
done
}
diff --git a/test/test.d/ftpdir-cleanup.sh b/test/test.d/ftpdir-cleanup.sh
index 20026b4..ad88484 100755
--- a/test/test.d/ftpdir-cleanup.sh
+++ b/test/test.d/ftpdir-cleanup.sh
@@ -26,8 +26,8 @@ testCleanupSimplePackages() {
for arch in ${arches[@]}; do
local pkg1="pkg-simple-a-1-1-${arch}.pkg.tar.xz"
checkRemovedPackage extra 'pkg-simple-a' ${arch}
- [ -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found"
- [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found"
+ [ -f "${root_dir}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${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"
checkPackage extra ${pkg2} ${arch}
@@ -57,8 +57,8 @@ 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 "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found"
- [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found"
+ [ -f "${root_dir}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found"
+ [ -f "${root_dir}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found"
done
}
@@ -77,8 +77,8 @@ testCleanupAnyPackages() {
local pkg1='pkg-any-a-1-1-any.pkg.tar.xz'
checkRemovedAnyPackage extra 'pkg-any-a'
- [ -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found"
- [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found"
+ [ -f "${root_dir}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${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"
checkAnyPackage extra ${pkg2}
@@ -108,8 +108,8 @@ testCleanupSplitPackages() {
for arch in ${arches[@]}; do
for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}${PKGEXT}; do
checkRemovedPackage extra ${pkgs[0]} ${arch}
- [ -f "${FTP_BASE}/${PKGPOOL}/${pkg}" ] && fail "${PKGPOOL}/${pkg} found"
- [ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg}" ] && fail "${repo}/os/${arch}/${pkg} found"
+ [ -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
diff --git a/test/test.d/pool-transition.sh b/test/test.d/pool-transition.sh
index 5873f00..e91eed3 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}${PKGEXT}; do
pkg=$(basename $pkg)
- mv -f "${FTP_BASE}/${PKGPOOL}/${pkg}" "${FTP_BASE}/testing/os/${arch}/${pkg}"
+ mv -f "${root_dir}/${PKGPOOL}/${pkg}" "${root_dir}/testing/os/${arch}/${pkg}"
done
done
done
@@ -55,9 +55,9 @@ testUpdateAnyPackageWithoutPool() {
releasePackage extra pkg-any-a any
../db-update
# transform two packages to old style layout
- mv -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" "${FTP_BASE}/extra/os/any"
+ mv -f "${root_dir}/${PKGPOOL}/${pkg1}" "${root_dir}/extra/os/any"
for arch in i686 x86_64; do
- ln -sf "../any/${pkg1}" "${FTP_BASE}/extra/os/${arch}"
+ ln -sf "../any/${pkg1}" "${root_dir}/extra/os/${arch}"
done
pushd "${TMP}/svn-packages-copy/${pkgname}/trunk/" >/dev/null
@@ -75,9 +75,9 @@ testUpdateAnyPackageWithoutPool() {
checkAnyPackage extra "${pkg2}"
- [ -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found"
+ [ -f "${root_dir}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found"
for arch in any i686 x86_64; do
- [ -f "${FTP_BASE}/extra/os/${arch}/${pkg1}" ] && fail "extra/os/${arch}/${pkg1} found"
+ [ -f "${root_dir}/extra/os/${arch}/${pkg1}" ] && fail "extra/os/${arch}/${pkg1} found"
done
}
@@ -96,9 +96,9 @@ testMoveAnyPackagesWithoutPool() {
# transform a package to old style layout
for pkg in "${pkgdir}/${pkgs[0]}"/*-any${PKGEXT}; do
pkg=$(basename $pkg)
- mv -f "${FTP_BASE}/${PKGPOOL}/${pkg}" "${FTP_BASE}/testing/os/any/${pkg}"
+ mv -f "${root_dir}/${PKGPOOL}/${pkg}" "${root_dir}/testing/os/any/${pkg}"
for arch in i686 x86_64; do
- ln -sf "../any/${pkg}" "${FTP_BASE}/testing/os/${arch}/${pkg}"
+ ln -sf "../any/${pkg}" "${root_dir}/testing/os/${arch}/${pkg}"
done
done
@@ -118,7 +118,7 @@ testMoveAnyPackagesWithoutPool() {
for pkg in "${pkgdir}/${pkgs[0]}"/*-any${PKGEXT}; do
pkg=$(basename $pkg)
for arch in any i686 x86_64; do
- [ -f "${FTP_BASE}/testing/os/${arch}/${pkg}" ] && fail "testing/os/${arch}/${pkg} found"
+ [ -f "${root_dir}/testing/os/${arch}/${pkg}" ] && fail "testing/os/${arch}/${pkg} found"
done
done
}
@@ -133,9 +133,9 @@ testUpdateSameAnyPackageToDifferentRepositoriesWithoutPool() {
# transform a package to old style layout
for pkg in "${pkgdir}/pkg-any-a"/*-any${PKGEXT}; do
pkg=$(basename $pkg)
- mv -f "${FTP_BASE}/${PKGPOOL}/${pkg}" "${FTP_BASE}/extra/os/any/${pkg}"
+ mv -f "${root_dir}/${PKGPOOL}/${pkg}" "${root_dir}/extra/os/any/${pkg}"
for arch in i686 x86_64; do
- ln -sf "../any/${pkg}" "${FTP_BASE}/extra/os/${arch}/${pkg}"
+ ln -sf "../any/${pkg}" "${root_dir}/extra/os/${arch}/${pkg}"
done
done
@@ -143,8 +143,8 @@ 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 "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" ] \
- && bsdtar -xf "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" -O | grep -q pkg-any-a) \
+ ( [ -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.*}"
done
}
diff --git a/test/test.d/sourceballs.sh b/test/test.d/sourceballs.sh
index fdcf08c..9e8cb26 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 ${FTP_BASE}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
+ [ ! -r ${root_dir}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
done
}
@@ -33,7 +33,7 @@ testAnySourceballs() {
../cron-jobs/sourceballs
for pkgbase in ${pkgs[@]}; do
- [ ! -r ${FTP_BASE}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
+ [ ! -r ${root_dir}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
done
}
@@ -54,7 +54,7 @@ testSplitSourceballs() {
../cron-jobs/sourceballs
for pkgbase in ${pkgs[@]}; do
- [ ! -r ${FTP_BASE}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
+ [ ! -r ${root_dir}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
done
}
@@ -77,8 +77,8 @@ testSourceballsCleanup() {
done
../cron-jobs/sourceballs
- [ -r ${FTP_BASE}/${SRCPOOL}/pkg-simple-a-*${SRCEXT} ] && fail "source package was not removed!"
- [ ! -r ${FTP_BASE}/${SRCPOOL}/pkg-simple-b-*${SRCEXT} ] && fail "source package not found!"
+ [ -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!"
}
. "${curdir}/../lib/shunit2"