summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lib/common.inc12
-rwxr-xr-xtest/test.d/create-filelists.sh34
2 files changed, 23 insertions, 23 deletions
diff --git a/test/lib/common.inc b/test/lib/common.inc
index 2f308dd..a241615 100644
--- a/test/lib/common.inc
+++ b/test/lib/common.inc
@@ -52,8 +52,8 @@ oneTimeSetUp() {
msg 'Building packages...'
for d in "${pkgdir}"/*; do
pushd $d >/dev/null
- pkgname=($(. PKGBUILD; echo ${pkgname[@]}))
- pkgarch=($(. PKGBUILD; echo ${arch[@]}))
+ eval "pkgname=($(. PKGBUILD; printf '%q ' "${pkgname[@]}"))"
+ eval "pkgarch=($(. PKGBUILD; printf '%q ' "${arch[@]}"))"
pkgversion=$(. PKGBUILD; get_full_version)
build=true
@@ -170,13 +170,13 @@ releasePackage() {
pushd "${TMP}/svn-packages-copy"/${pkgbase}/trunk/ >/dev/null
xbs release ${repo} ${arch} >/dev/null 2>&1
pkgver=$(. PKGBUILD; get_full_version)
- pkgname=($(. PKGBUILD; echo ${pkgname[@]}))
+ eval "pkgname=($(. PKGBUILD; printf '%q ' "${pkgname[@]}"))"
popd >/dev/null
cp "${pkgdir}/${pkgbase}"/*-${pkgver}-${arch}${PKGEXT} "${STAGING}"/${repo}/
- if ${REQUIRE_SIGNATURE}; then
- for a in ${arch[@]}; do
- for p in ${pkgname[@]}; do
+ if "${REQUIRE_SIGNATURE}"; then
+ for a in "${arch[@]}"; do
+ for p in "${pkgname[@]}"; do
signpkg "${STAGING}"/${repo}/${p}-${pkgver}-${a}${PKGEXT}
done
done
diff --git a/test/test.d/create-filelists.sh b/test/test.d/create-filelists.sh
index e78bde8..1126972 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 "usr/bin/${pkgbase}" &>/dev/null; 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 "usr/share/${pkgbase}/test" &>/dev/null; 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
- pkgnames=($(source "${TMP}/svn-packages-copy/${pkgbase}/trunk/PKGBUILD"; echo ${pkgname[@]}))
- for pkgname in ${pkgnames[@]}; do
- for arch in ${arches[@]}; do
+ for pkgbase in "${pkgs[@]}"; do
+ eval "pkgnames=($(source "${TMP}/svn-packages-copy/${pkgbase}/trunk/PKGBUILD"; printf '%q ' "${pkgname[@]}"))"
+ for pkgname in "${pkgnames[@]}"; do
+ for arch in "${arches[@]}"; do
if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/bin/${pkgname}" &>/dev/null; then
fail "usr/bin/${pkgname} not found in ${arch}/extra${FILESEXT}"
fi