summaryrefslogtreecommitdiff
path: root/test/test.d
diff options
context:
space:
mode:
Diffstat (limited to 'test/test.d')
-rwxr-xr-xtest/test.d/create-filelists.sh44
-rwxr-xr-xtest/test.d/db-move.sh64
-rwxr-xr-xtest/test.d/db-remove.sh48
-rwxr-xr-xtest/test.d/db-repo-add.sh28
-rwxr-xr-xtest/test.d/db-repo-remove.sh36
-rwxr-xr-xtest/test.d/db-update.sh48
-rwxr-xr-xtest/test.d/ftpdir-cleanup.sh58
-rwxr-xr-xtest/test.d/packages.sh2
-rwxr-xr-xtest/test.d/signed-packages.sh8
-rwxr-xr-xtest/test.d/sourceballs.sh44
-rwxr-xr-xtest/test.d/testing2x.sh2
11 files changed, 191 insertions, 191 deletions
diff --git a/test/test.d/create-filelists.sh b/test/test.d/create-filelists.sh
index 49734c4..e3a30d1 100755
--- a/test/test.d/create-filelists.sh
+++ b/test/test.d/create-filelists.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testCreateSimpleFileLists() {
@@ -9,15 +9,15 @@ testCreateSimpleFileLists() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
+ 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
fail "usr/bin/${pkgbase} not found in ${arch}/extra${FILESEXT}"
fi
@@ -31,13 +31,13 @@ testCreateAnyFileLists() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- releasePackage extra ${pkgbase} any
+ for pkgbase in "${pkgs[@]}"; do
+ releasePackage extra "${pkgbase}" any
done
../db-update
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
+ 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
fail "usr/share/${pkgbase}/test not found in ${arch}/extra${FILESEXT}"
fi
@@ -54,17 +54,17 @@ testCreateSplitFileLists() {
local pkgnames
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for pkgbase in ${pkgs[@]}; do
+ for pkgbase in "${pkgs[@]}"; do
pkgnames=($(source "${TMP}/svn-packages-copy/${pkgbase}/trunk/PKGBUILD"; echo ${pkgname[@]}))
- for pkgname in ${pkgnames[@]}; do
- for arch in ${arches[@]}; do
+ 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
fail "usr/bin/${pkgname} not found in ${arch}/extra${FILESEXT}"
fi
@@ -80,18 +80,18 @@ testCleanupFileLists() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for arch in ${arches[@]}; do
- ../db-remove extra ${arch} pkg-simple-a
+ for arch in "${arches[@]}"; do
+ ../db-remove extra "${arch}" pkg-simple-a
done
- for arch in ${arches[@]}; do
+ for arch in "${arches[@]}"; do
if ! bsdtar -xOf "${FTP_BASE}/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
diff --git a/test/test.d/db-move.sh b/test/test.d/db-move.sh
index 890ffc4..e3207b6 100755
--- a/test/test.d/db-move.sh
+++ b/test/test.d/db-move.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testMoveSimplePackages() {
@@ -9,9 +9,9 @@ testMoveSimplePackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage testing ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage testing "${pkgbase}" "${arch}"
done
done
@@ -19,11 +19,11 @@ testMoveSimplePackages() {
../db-move testing extra pkg-simple-a
- for arch in ${arches[@]}; do
- checkPackage extra pkg-simple-a-1-1-${arch}.pkg.tar.xz ${arch}
- checkRemovedPackage testing pkg-simple-a-1-1-${arch}.pkg.tar.xz ${arch}
+ for arch in "${arches[@]}"; do
+ checkPackage extra "pkg-simple-a-1-1-${arch}.pkg.tar.xz" "${arch}"
+ checkRemovedPackage testing "pkg-simple-a-1-1-${arch}.pkg.tar.xz" "${arch}"
- checkPackage testing pkg-simple-b-1-1-${arch}.pkg.tar.xz ${arch}
+ checkPackage testing "pkg-simple-b-1-1-${arch}.pkg.tar.xz" "${arch}"
done
}
@@ -33,9 +33,9 @@ testMoveMultiplePackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage testing ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage testing "${pkgbase}" "${arch}"
done
done
@@ -43,10 +43,10 @@ testMoveMultiplePackages() {
../db-move testing extra pkg-simple-a pkg-simple-b
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- checkPackage extra ${pkgbase}-1-1-${arch}.pkg.tar.xz ${arch}
- checkRemovedPackage testing ${pkgbase}-1-1-${arch}.pkg.tar.xz ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ checkPackage extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}"
+ checkRemovedPackage testing "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}"
done
done
}
@@ -57,9 +57,9 @@ testMoveEpochPackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage testing ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage testing "${pkgbase}" "${arch}"
done
done
@@ -67,9 +67,9 @@ testMoveEpochPackages() {
../db-move testing extra pkg-simple-epoch
- for arch in ${arches[@]}; do
- checkPackage extra pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz ${arch}
- checkRemovedPackage testing pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz ${arch}
+ for arch in "${arches[@]}"; do
+ checkPackage extra "pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz" "${arch}"
+ checkRemovedPackage testing "pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz" "${arch}"
done
}
@@ -77,8 +77,8 @@ testMoveAnyPackages() {
local pkgs=('pkg-any-a' 'pkg-any-b')
local pkgbase
- for pkgbase in ${pkgs[@]}; do
- releasePackage testing ${pkgbase} any
+ for pkgbase in "${pkgs[@]}"; do
+ releasePackage testing "${pkgbase}" any
done
../db-update
@@ -96,23 +96,23 @@ testMoveSplitPackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage testing ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage testing "${pkgbase}" "${arch}"
done
done
../db-update
../db-move testing extra pkg-split-a
- for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/pkg-split-a"/*-${arch}${PKGEXT}; do
- checkPackage extra ${pkg##*/} ${arch}
+ for arch in "${arches[@]}"; do
+ for pkg in "${pkgdir}/pkg-split-a"/*-"${arch}"${PKGEXT}; do
+ checkPackage extra "${pkg##*/}" "${arch}"
done
done
- for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/pkg-split-b"/*-${arch}${PKGEXT}; do
- checkPackage testing ${pkg##*/} ${arch}
+ for arch in "${arches[@]}"; do
+ for pkg in "${pkgdir}/pkg-split-b"/*-"${arch}"${PKGEXT}; do
+ checkPackage testing "${pkg##*/}" "${arch}"
done
done
diff --git a/test/test.d/db-remove.sh b/test/test.d/db-remove.sh
index 416e693..fca480c 100755
--- a/test/test.d/db-remove.sh
+++ b/test/test.d/db-remove.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testRemovePackages() {
@@ -9,23 +9,23 @@ testRemovePackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- ../db-remove extra ${arch} ${pkgbase}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ ../db-remove extra "${arch}" "${pkgbase}"
done
done
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- checkRemovedPackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ checkRemovedPackage extra "${pkgbase}" "${arch}"
done
done
}
@@ -36,21 +36,21 @@ testRemoveMultiplePackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for arch in ${arches[@]}; do
- ../db-remove extra ${arch} ${pkgs[@]}
+ for arch in "${arches[@]}"; do
+ ../db-remove extra "${arch}" "${pkgs[@]}"
done
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- checkRemovedPackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ checkRemovedPackage extra "${pkgbase}" "${arch}"
done
done
}
@@ -59,18 +59,18 @@ testRemoveAnyPackages() {
local pkgs=('pkg-any-a' 'pkg-any-b')
local pkgbase
- for pkgbase in ${pkgs[@]}; do
- releasePackage extra ${pkgbase} any
+ for pkgbase in "${pkgs[@]}"; do
+ releasePackage extra "${pkgbase}" any
done
../db-update
- for pkgbase in ${pkgs[@]}; do
- ../db-remove extra any ${pkgbase}
+ for pkgbase in "${pkgs[@]}"; do
+ ../db-remove extra any "${pkgbase}"
done
- for pkgbase in ${pkgs[@]}; do
- checkRemovedAnyPackage extra ${pkgbase}
+ for pkgbase in "${pkgs[@]}"; do
+ checkRemovedAnyPackage extra "${pkgbase}"
done
}
diff --git a/test/test.d/db-repo-add.sh b/test/test.d/db-repo-add.sh
index 8603104..3d83007 100755
--- a/test/test.d/db-repo-add.sh
+++ b/test/test.d/db-repo-add.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testAddSimplePackages() {
@@ -9,19 +9,19 @@ testAddSimplePackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
+ 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}/"
- ../db-repo-add extra ${arch} ${pkgbase}-1-1-${arch}.pkg.tar.xz
+ ../db-repo-add extra "${arch}" "${pkgbase}-1-1-${arch}.pkg.tar.xz"
done
done
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- checkPackageDB extra ${pkgbase}-1-1-${arch}.pkg.tar.xz ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ checkPackageDB extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}"
done
done
}
@@ -32,21 +32,21 @@ testAddMultiplePackages() {
local pkgbase
local arch
- for arch in ${arches[@]}; do
+ for arch in "${arches[@]}"; do
add_pkgs=()
- for pkgbase in ${pkgs[@]}; do
+ 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}/"
- add_pkgs[${#add_pkgs[*]}]=${pkgbase}-1-1-${arch}.pkg.tar.xz
+ add_pkgs+=("${pkgbase}-1-1-${arch}.pkg.tar.xz")
done
- ../db-repo-add extra ${arch} ${add_pkgs[@]}
+ ../db-repo-add extra "${arch}" "${add_pkgs[@]}"
done
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- checkPackageDB extra ${pkgbase}-1-1-${arch}.pkg.tar.xz ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ checkPackageDB extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}"
done
done
}
diff --git a/test/test.d/db-repo-remove.sh b/test/test.d/db-repo-remove.sh
index 315d63d..ce13280 100755
--- a/test/test.d/db-repo-remove.sh
+++ b/test/test.d/db-repo-remove.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testRemovePackages() {
@@ -9,23 +9,23 @@ testRemovePackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- ../db-repo-remove extra ${arch} ${pkgbase}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ ../db-repo-remove extra "${arch}" "${pkgbase}"
done
done
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- checkRemovedPackageDB extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ checkRemovedPackageDB extra "${pkgbase}" "${arch}"
done
done
}
@@ -36,21 +36,21 @@ testRemoveMultiplePackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for arch in ${arches[@]}; do
- ../db-repo-remove extra ${arch} ${pkgs[@]}
+ for arch in "${arches[@]}"; do
+ ../db-repo-remove extra "${arch}" "${pkgs[@]}"
done
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- checkRemovedPackageDB extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ checkRemovedPackageDB extra "${pkgbase}" "${arch}"
done
done
}
diff --git a/test/test.d/db-update.sh b/test/test.d/db-update.sh
index 7a5ce4c..c83d51b 100755
--- a/test/test.d/db-update.sh
+++ b/test/test.d/db-update.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testAddSimplePackages() {
@@ -9,17 +9,17 @@ testAddSimplePackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- checkPackage extra ${pkgbase}-1-1-${arch}.pkg.tar.xz ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ checkPackage extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}"
done
done
}
@@ -40,14 +40,14 @@ testAddAnyPackages() {
local pkgs=('pkg-any-a' 'pkg-any-b')
local pkgbase
- for pkgbase in ${pkgs[@]}; do
- releasePackage extra ${pkgbase} any
+ for pkgbase in "${pkgs[@]}"; do
+ releasePackage extra "${pkgbase}" any
done
../db-update
- for pkgbase in ${pkgs[@]}; do
- checkAnyPackage extra ${pkgbase}-1-1-any.pkg.tar.xz
+ for pkgbase in "${pkgs[@]}"; do
+ checkAnyPackage extra "${pkgbase}-1-1-any.pkg.tar.xz"
done
}
@@ -58,18 +58,18 @@ testAddSplitPackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/${pkgbase}"/*-${arch}${PKGEXT}; do
- checkPackage extra ${pkg##*/} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ for pkg in "${pkgdir}/${pkgbase}"/*-"${arch}"${PKGEXT}; do
+ checkPackage extra "${pkg##*/}" "${arch}"
done
done
done
@@ -134,7 +134,7 @@ 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}) \
+ && bsdtar -xf "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" -O | grep -q "${pkgbase}") \
&& fail "${pkgbase} should not be in testing/os/${arch}/testing${DBEXT%.tar.*}"
done
}
@@ -146,18 +146,18 @@ testAddIncompleteSplitPackage() {
local pkgbase='pkg-split-a'
local arch
- for arch in ${arches[@]}; do
- releasePackage ${repo} ${pkgbase} ${arch}
+ for arch in "${arches[@]}"; do
+ releasePackage "${repo}" "${pkgbase}" "${arch}"
done
# remove a split package to make db-update fail
- rm "${STAGING}"/extra/${pkgbase}1-*
+ rm "${STAGING}/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
+ 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}) \
+ && bsdtar -xf "${FTP_BASE}/${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 bfea7ea..1b075da 100755
--- a/test/test.d/ftpdir-cleanup.sh
+++ b/test/test.d/ftpdir-cleanup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testCleanupSimplePackages() {
@@ -9,28 +9,28 @@ testCleanupSimplePackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for arch in ${arches[@]}; do
- ../db-remove extra ${arch} pkg-simple-a
+ for arch in "${arches[@]}"; do
+ ../db-remove extra "${arch}" pkg-simple-a
done
../cron-jobs/ftpdir-cleanup >/dev/null
- for arch in ${arches[@]}; do
+ for arch in "${arches[@]}"; do
local pkg1="pkg-simple-a-1-1-${arch}.pkg.tar.xz"
- checkRemovedPackage extra 'pkg-simple-a' ${arch}
+ 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"
local pkg2="pkg-simple-b-1-1-${arch}.pkg.tar.xz"
- checkPackage extra ${pkg2} ${arch}
+ checkPackage extra "${pkg2}" "${arch}"
done
}
@@ -40,23 +40,23 @@ testCleanupEpochPackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for arch in ${arches[@]}; do
- ../db-remove extra ${arch} pkg-simple-epoch
+ for arch in "${arches[@]}"; do
+ ../db-remove extra "${arch}" pkg-simple-epoch
done
../cron-jobs/ftpdir-cleanup >/dev/null
- for arch in ${arches[@]}; do
+ for arch in "${arches[@]}"; do
local pkg1="pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz"
- checkRemovedPackage extra 'pkg-simple-epoch' ${arch}
+ 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"
done
@@ -67,8 +67,8 @@ testCleanupAnyPackages() {
local pkgbase
local arch='any'
- for pkgbase in ${pkgs[@]}; do
- releasePackage extra ${pkgbase} any
+ for pkgbase in "${pkgs[@]}"; do
+ releasePackage extra "${pkgbase}" any
done
../db-update
@@ -81,7 +81,7 @@ testCleanupAnyPackages() {
[ -f "${FTP_BASE}/${repo}/os/${arch}/${pkg1}" ] && fail "${repo}/os/${arch}/${pkg1} found"
local pkg2="pkg-any-b-1-1-${arch}.pkg.tar.xz"
- checkAnyPackage extra ${pkg2}
+ checkAnyPackage extra "${pkg2}"
}
testCleanupSplitPackages() {
@@ -91,29 +91,29 @@ testCleanupSplitPackages() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
- for arch in ${arches[@]}; do
- ../db-remove extra ${arch} ${pkgs[0]}
+ for arch in "${arches[@]}"; do
+ ../db-remove extra "${arch}" "${pkgs[0]}"
done
../cron-jobs/ftpdir-cleanup >/dev/null
- for arch in ${arches[@]}; do
- for pkg in "${pkgdir}/${pkgs[0]}"/*-${arch}${PKGEXT}; do
- checkRemovedPackage extra ${pkgs[0]} ${arch}
+ 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"
done
- for pkg in "${pkgdir}/${pkgs[1]}"/*-${arch}${PKGEXT}; do
- checkPackage extra ${pkg##*/} ${arch}
+ for pkg in "${pkgdir}/${pkgs[1]}"/*-"${arch}"${PKGEXT}; do
+ checkPackage extra "${pkg##*/}" "${arch}"
done
done
}
diff --git a/test/test.d/packages.sh b/test/test.d/packages.sh
index 488cb15..1a31a41 100755
--- a/test/test.d/packages.sh
+++ b/test/test.d/packages.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testPackages() {
diff --git a/test/test.d/signed-packages.sh b/test/test.d/signed-packages.sh
index 03566ef..4eccb41 100755
--- a/test/test.d/signed-packages.sh
+++ b/test/test.d/signed-packages.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testAddSignedPackage() {
@@ -18,8 +18,8 @@ testAddInvalidSignedPackage() {
local p
releasePackage extra 'pkg-simple-a' 'i686'
for p in "${STAGING}"/extra/*${PKGEXT}; do
- unxz $p
- xz -0 ${p%%.xz}
+ unxz "$p"
+ xz -0 "${p%%.xz}"
done
../db-update >/dev/null 2>&1 && fail "db-update should fail when a signature is invalid!"
}
@@ -28,7 +28,7 @@ testAddBrokenSignature() {
local s
releasePackage extra 'pkg-simple-a' 'i686'
for s in "${STAGING}"/extra/*.sig; do
- echo 0 > $s
+ echo 0 > "$s"
done
../db-update >/dev/null 2>&1 && fail "db-update should fail when a signature is broken!"
}
diff --git a/test/test.d/sourceballs.sh b/test/test.d/sourceballs.sh
index fdcf08c..1097ae0 100755
--- a/test/test.d/sourceballs.sh
+++ b/test/test.d/sourceballs.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testSourceballs() {
@@ -9,16 +9,16 @@ testSourceballs() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
../cron-jobs/sourceballs
- for pkgbase in ${pkgs[@]}; do
- [ ! -r ${FTP_BASE}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
+ for pkgbase in "${pkgs[@]}"; do
+ [ ! -r "${FTP_BASE}/${SRCPOOL}/${pkgbase}"-*"${SRCEXT}" ] && fail "source package not found!"
done
}
@@ -26,14 +26,14 @@ testAnySourceballs() {
local pkgs=('pkg-any-a' 'pkg-any-b')
local pkgbase
- for pkgbase in ${pkgs[@]}; do
- releasePackage extra ${pkgbase} any
+ for pkgbase in "${pkgs[@]}"; do
+ releasePackage extra "${pkgbase}" any
done
../db-update
../cron-jobs/sourceballs
- for pkgbase in ${pkgs[@]}; do
- [ ! -r ${FTP_BASE}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
+ for pkgbase in "${pkgs[@]}"; do
+ [ ! -r "${FTP_BASE}/${SRCPOOL}/${pkgbase}"-*"${SRCEXT}" ] && fail "source package not found!"
done
}
@@ -44,17 +44,17 @@ testSplitSourceballs() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
../cron-jobs/sourceballs
- for pkgbase in ${pkgs[@]}; do
- [ ! -r ${FTP_BASE}/${SRCPOOL}/${pkgbase}-*${SRCEXT} ] && fail "source package not found!"
+ for pkgbase in "${pkgs[@]}"; do
+ [ ! -r "${FTP_BASE}/${SRCPOOL}/${pkgbase}"-*"${SRCEXT}" ] && fail "source package not found!"
done
}
@@ -64,21 +64,21 @@ testSourceballsCleanup() {
local pkgbase
local arch
- for pkgbase in ${pkgs[@]}; do
- for arch in ${arches[@]}; do
- releasePackage extra ${pkgbase} ${arch}
+ for pkgbase in "${pkgs[@]}"; do
+ for arch in "${arches[@]}"; do
+ releasePackage extra "${pkgbase}" "${arch}"
done
done
../db-update
../cron-jobs/sourceballs
- for arch in ${arches[@]}; do
- ../db-remove extra ${arch} pkg-simple-a
+ for arch in "${arches[@]}"; do
+ ../db-remove extra "${arch}" pkg-simple-a
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 "${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!"
}
. "${curdir}/../lib/shunit2"
diff --git a/test/test.d/testing2x.sh b/test/test.d/testing2x.sh
index 31d85b4..3bbd353 100755
--- a/test/test.d/testing2x.sh
+++ b/test/test.d/testing2x.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-curdir=$(readlink -e $(dirname $0))
+curdir=$(readlink -e "$(dirname "$0")")
. "${curdir}/../lib/common.inc"
testTesting2xAnyPackage() {