summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-12-15 17:20:26 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-12-19 23:04:34 +0100
commit3abb6a6a1e485b3bc899b64b0a1b7dc2db25a9c2 (patch)
tree9be704b4ba97242990c1380f53c6b44ecce2f6af
parent85a67355c0340596630a47f85507d61c68dcbd0e (diff)
downloadapt-3abb6a6a1e485b3bc899b64b0a1b7dc2db25a9c2.tar.gz
tests: support spaces in path and TMPDIR
This doesn't allow all tests to run cleanly, but it at least allows to write tests which could run successfully in such environments. Git-Dch: Ignore
-rwxr-xr-xtest/integration/create-test-data4
-rw-r--r--test/integration/framework26
-rwxr-xr-xtest/integration/header-compilation4
-rwxr-xr-xtest/integration/run-tests3
-rwxr-xr-xtest/integration/skip-avoid-avoiding-breaks-predepends4
-rwxr-xr-xtest/integration/skip-bug-601016-description-translation4
-rwxr-xr-xtest/integration/skip-bug-711456-apt-cdrom-multiple-cds-multiarch4
-rwxr-xr-xtest/integration/test-00-commands-have-help4
-rwxr-xr-xtest/integration/test-acquire-binary-all4
-rwxr-xr-xtest/integration/test-acquire-same-file-multiple-times2
-rwxr-xr-xtest/integration/test-acquire-same-repository-multiple-times8
-rwxr-xr-xtest/integration/test-allow2
-rwxr-xr-xtest/integration/test-allow-scores-for-all-dependency-types4
-rwxr-xr-xtest/integration/test-apt-acquire-additional-files4
-rwxr-xr-xtest/integration/test-apt-acquire-additional-files-duplicates4
-rwxr-xr-xtest/integration/test-apt-by-hash-update4
-rwxr-xr-xtest/integration/test-apt-cache4
-rwxr-xr-xtest/integration/test-apt-cache-showsrc4
-rwxr-xr-xtest/integration/test-apt-cdrom4
-rwxr-xr-xtest/integration/test-apt-cli-list4
-rwxr-xr-xtest/integration/test-apt-cli-search12
-rwxr-xr-xtest/integration/test-apt-cli-show4
-rwxr-xr-xtest/integration/test-apt-cli-update4
-rwxr-xr-xtest/integration/test-apt-cli-upgrade13
-rwxr-xr-xtest/integration/test-apt-config4
-rwxr-xr-xtest/integration/test-apt-download-progress4
-rwxr-xr-xtest/integration/test-apt-extracttemplates4
-rwxr-xr-xtest/integration/test-apt-ftparchive-by-hash4
-rwxr-xr-xtest/integration/test-apt-ftparchive-cachedb4
-rwxr-xr-xtest/integration/test-apt-ftparchive-cachedb-lp12744668
-rwxr-xr-xtest/integration/test-apt-ftparchive-src-cachedb4
-rwxr-xr-xtest/integration/test-apt-get-autoremove4
-rwxr-xr-xtest/integration/test-apt-get-build-dep4
-rwxr-xr-xtest/integration/test-apt-get-changelog4
-rwxr-xr-xtest/integration/test-apt-get-clean4
-rwxr-xr-xtest/integration/test-apt-get-download4
-rwxr-xr-xtest/integration/test-apt-get-install-deb4
-rwxr-xr-xtest/integration/test-apt-get-install-virtual-pkgs4
-rwxr-xr-xtest/integration/test-apt-get-source4
-rwxr-xr-xtest/integration/test-apt-get-source-arch4
-rwxr-xr-xtest/integration/test-apt-get-source-authenticated4
-rwxr-xr-xtest/integration/test-apt-get-source-multisources4
-rwxr-xr-xtest/integration/test-apt-get-update-unauth-warning4
-rwxr-xr-xtest/integration/test-apt-get-upgrade4
-rwxr-xr-xtest/integration/test-apt-helper4
-rwxr-xr-xtest/integration/test-apt-https-no-redirect4
-rwxr-xr-xtest/integration/test-apt-key4
-rwxr-xr-xtest/integration/test-apt-key-net-update4
-rwxr-xr-xtest/integration/test-apt-mark4
-rwxr-xr-xtest/integration/test-apt-move-and-forget-manual-sections4
-rwxr-xr-xtest/integration/test-apt-never-markauto-sections4
-rwxr-xr-xtest/integration/test-apt-progress-fd4
-rwxr-xr-xtest/integration/test-apt-progress-fd-conffile2
-rwxr-xr-xtest/integration/test-apt-progress-fd-deb8224
-rwxr-xr-xtest/integration/test-apt-progress-fd-error4
-rwxr-xr-xtest/integration/test-apt-showlist-orgroup-in-recommends4
-rwxr-xr-xtest/integration/test-apt-sources-deb8224
-rwxr-xr-xtest/integration/test-apt-tagfile-fields-order12
-rwxr-xr-xtest/integration/test-apt-translation-has-no-packages10
-rwxr-xr-xtest/integration/test-apt-update-expected-size4
-rwxr-xr-xtest/integration/test-apt-update-file4
-rwxr-xr-xtest/integration/test-apt-update-filesize-mismatch4
-rwxr-xr-xtest/integration/test-apt-update-hashsum-mismatch4
-rwxr-xr-xtest/integration/test-apt-update-ims4
-rwxr-xr-xtest/integration/test-apt-update-nofallback4
-rwxr-xr-xtest/integration/test-apt-update-not-modified4
-rwxr-xr-xtest/integration/test-apt-update-rollback4
-rwxr-xr-xtest/integration/test-apt-update-simple4
-rwxr-xr-xtest/integration/test-apt-update-stale4
-rwxr-xr-xtest/integration/test-apt-update-transactions4
-rwxr-xr-xtest/integration/test-apt-update-unauth4
-rwxr-xr-xtest/integration/test-architecture-specification-parsing4
-rwxr-xr-xtest/integration/test-authentication-basic4
-rwxr-xr-xtest/integration/test-bug-254770-segfault-if-cache-not-buildable4
-rwxr-xr-xtest/integration/test-bug-330162-encoded-tar-header8
-rwxr-xr-xtest/integration/test-bug-407511-fail-invalid-default-release4
-rwxr-xr-xtest/integration/test-bug-470115-new-and-tighten-recommends4
-rwxr-xr-xtest/integration/test-bug-507998-dist-upgrade-recommends4
-rwxr-xr-xtest/integration/test-bug-543966-downgrade-below-1000-pin4
-rwxr-xr-xtest/integration/test-bug-549968-install-depends-of-not-installed4
-rwxr-xr-xtest/integration/test-bug-590041-prefer-non-virtual-packages3
-rwxr-xr-xtest/integration/test-bug-590438-broken-provides-thanks-to-remove-order8
-rwxr-xr-xtest/integration/test-bug-591882-conkeror4
-rwxr-xr-xtest/integration/test-bug-593360-modifiers-in-names4
-rwxr-xr-xtest/integration/test-bug-595691-empty-and-broken-archive-files4
-rwxr-xr-xtest/integration/test-bug-596498-trusted-unsigned-repo4
-rwxr-xr-xtest/integration/test-bug-598669-install-postfix-gets-exim-heavy4
-rwxr-xr-xtest/integration/test-bug-601961-install-info4
-rwxr-xr-xtest/integration/test-bug-602412-dequote-redirect4
-rwxr-xr-xtest/integration/test-bug-604222-new-and-autoremove4
-rwxr-xr-xtest/integration/test-bug-604401-files-are-directories4
-rwxr-xr-xtest/integration/test-bug-605394-versioned-or-groups4
-rwxr-xr-xtest/integration/test-bug-611729-mark-as-manual4
-rwxr-xr-xtest/integration/test-bug-612099-multiarch-conflicts4
-rwxr-xr-xtest/integration/test-bug-612557-garbage-upgrade4
-rwxr-xr-xtest/integration/test-bug-612958-use-dpkg-multiarch-config4
-rwxr-xr-xtest/integration/test-bug-613420-new-garbage-dependency4
-rwxr-xr-xtest/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted4
-rwxr-xr-xtest/integration/test-bug-618288-multiarch-same-lockstep4
-rwxr-xr-xtest/integration/test-bug-618848-always-respect-user-requests4
-rwxr-xr-xtest/integration/test-bug-624218-Translation-file-handling4
-rwxr-xr-xtest/integration/test-bug-632221-cross-dependency-satisfaction4
-rwxr-xr-xtest/integration/test-bug-633350-do-not-kill-last-char-in-Release4
-rwxr-xr-xtest/integration/test-bug-64141-install-dependencies-for-on-hold4
-rwxr-xr-xtest/integration/test-bug-657695-resolver-breaks-on-virtuals4
-rwxr-xr-xtest/integration/test-bug-661537-build-profiles-support4
-rwxr-xr-xtest/integration/test-bug-673536-pre-depends-breaks-loop4
-rwxr-xr-xtest/integration/test-bug-675449-essential-are-protected4
-rwxr-xr-xtest/integration/test-bug-679371-apt-get-autoclean-multiarch4
-rwxr-xr-xtest/integration/test-bug-680041-apt-mark-holds-correctly4
-rwxr-xr-xtest/integration/test-bug-683786-build-dep-on-virtual-packages4
-rwxr-xr-xtest/integration/test-bug-686346-package-missing-architecture4
-rwxr-xr-xtest/integration/test-bug-689582-100-char-long-path-names4
-rwxr-xr-xtest/integration/test-bug-691453-apt-cache-search-multi-pattern4
-rwxr-xr-xtest/integration/test-bug-709560-set-candidate-release4
-rwxr-xr-xtest/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch4
-rwxr-xr-xtest/integration/test-bug-712435-missing-descriptions4
-rwxr-xr-xtest/integration/test-bug-717891-abolute-uris-for-proxies4
-rwxr-xr-xtest/integration/test-bug-718329-support-data.tar-uncompressed4
-rwxr-xr-xtest/integration/test-bug-719263-print-uris-removes-authentication4
-rwxr-xr-xtest/integration/test-bug-720597-build-dep-purge4
-rwxr-xr-xtest/integration/test-bug-722207-print-uris-even-if-very-quiet4
-rwxr-xr-xtest/integration/test-bug-723586-any-stripped-in-single-arch4
-rwxr-xr-xtest/integration/test-bug-723705-tagfile-truncates-fields4
-rwxr-xr-xtest/integration/test-bug-728500-tempdir6
-rwxr-xr-xtest/integration/test-bug-732746-preferences4
-rwxr-xr-xtest/integration/test-bug-733028-gpg-resource-limit4
-rwxr-xr-xtest/integration/test-bug-735967-lib32-to-i386-unavailable4
-rwxr-xr-xtest/integration/test-bug-737130-multicompress-file-modes4
-rwxr-xr-xtest/integration/test-bug-738785-switch-protocol4
-rwxr-xr-xtest/integration/test-bug-740843-versioned-up-down-breaks4
-rwxr-xr-xtest/integration/test-bug-745036-new-foreign-invalidates-cache4
-rwxr-xr-xtest/integration/test-bug-745046-candidate-propagation-fails4
-rwxr-xr-xtest/integration/test-bug-747261-arch-specific-conflicts4
-rwxr-xr-xtest/integration/test-bug-753297-upgradable4
-rwxr-xr-xtest/integration/test-bug-758153-versioned-provides-support4
-rwxr-xr-xtest/integration/test-bug-762160-relpath4
-rwxr-xr-xtest/integration/test-bug-769609-triggers-still-pending-after-run4
-rwxr-xr-xtest/integration/test-bug-770291-reinstall4
-rwxr-xr-xtest/integration/test-bug-778375-server-has-no-reason-phrase4
-rwxr-xr-xtest/integration/test-bug-782777-single-arch-weirdness4
-rwxr-xr-xtest/integration/test-bug-796070-downgrade-realpkg4
-rwxr-xr-xtest/integration/test-bug-796070-downgrade-simulate4
-rwxr-xr-xtest/integration/test-bug-807012-mixed-case-package-names4
-rwxr-xr-xtest/integration/test-bug-lp1347721-dpkg-ordering4
-rwxr-xr-xtest/integration/test-bug-lp1445239-download-loop4
-rwxr-xr-xtest/integration/test-bug-multiarch-upgrade4
-rwxr-xr-xtest/integration/test-cachecontainer-architecture-specification4
-rwxr-xr-xtest/integration/test-compressed-indexes4
-rwxr-xr-xtest/integration/test-conflicts-loop4
-rwxr-xr-xtest/integration/test-conflicts-real-multiarch-same4
-rwxr-xr-xtest/integration/test-cve-2013-1051-InRelease-parsing4
-rwxr-xr-xtest/integration/test-dpkg-assert-multi-arch4
-rwxr-xr-xtest/integration/test-essential-force-loopbreak4
-rwxr-xr-xtest/integration/test-external-dependency-solver-protocol4
-rwxr-xr-xtest/integration/test-failing-maintainer-scripts4
-rwxr-xr-xtest/integration/test-handle-redirect-as-used-mirror-change4
-rwxr-xr-xtest/integration/test-handling-broken-orgroups4
-rwxr-xr-xtest/integration/test-hashsum-verification10
-rwxr-xr-xtest/integration/test-http-pipeline-messup4
-rwxr-xr-xtest/integration/test-ignore-provides-if-versioned-breaks4
-rwxr-xr-xtest/integration/test-ignore-provides-if-versioned-conflicts4
-rwxr-xr-xtest/integration/test-implicit-conflicts-real-not-virtual4
-rwxr-xr-xtest/integration/test-kernel-helper-autoremove4
-rwxr-xr-xtest/integration/test-method-rred4
-rwxr-xr-xtest/integration/test-multiarch-allowed4
-rwxr-xr-xtest/integration/test-multiarch-foreign4
-rwxr-xr-xtest/integration/test-no-fds-leaked-to-maintainer-scripts6
-rwxr-xr-xtest/integration/test-package-reinstallation4
-rwxr-xr-xtest/integration/test-parse-all-archs-into-cache4
-rwxr-xr-xtest/integration/test-partial-file-support8
-rwxr-xr-xtest/integration/test-pdiff-usage114
-rwxr-xr-xtest/integration/test-pin-non-existent-package4
-rwxr-xr-xtest/integration/test-policy-pinning4
-rwxr-xr-xtest/integration/test-prefer-higher-priority-providers4
-rwxr-xr-xtest/integration/test-prefer-native-architecture-over-higher-priority4
-rwxr-xr-xtest/integration/test-prevent-markinstall-multiarch-same-versionscrew4
-rwxr-xr-xtest/integration/test-provides-gone-with-upgrade4
-rwxr-xr-xtest/integration/test-release-candidate-switching4
-rwxr-xr-xtest/integration/test-releasefile-date-older4
-rwxr-xr-xtest/integration/test-releasefile-valid-until4
-rwxr-xr-xtest/integration/test-releasefile-verification4
-rwxr-xr-xtest/integration/test-resolve-by-keep-new-recommends4
-rwxr-xr-xtest/integration/test-security-no-remote-status4
-rwxr-xr-xtest/integration/test-sourceslist-arch-plusminus-options4
-rwxr-xr-xtest/integration/test-sourceslist-lang-plusminus-options4
-rwxr-xr-xtest/integration/test-sourceslist-target-plusminus-options4
-rwxr-xr-xtest/integration/test-sourceslist-trusted-options4
-rwxr-xr-xtest/integration/test-specific-architecture-dependencies4
-rwxr-xr-xtest/integration/test-suggest-installed-multiarch-silbing4
-rwxr-xr-xtest/integration/test-ubuntu-bug-1078697-missing-source-hashes4
-rwxr-xr-xtest/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum4
-rwxr-xr-xtest/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings4
-rwxr-xr-xtest/integration/test-ubuntu-bug-1304403-obsolete-priority-standard4
-rwxr-xr-xtest/integration/test-ubuntu-bug-346386-apt-get-update-paywall4
-rwxr-xr-xtest/integration/test-ubuntu-bug-365611-long-package-names4
-rwxr-xr-xtest/integration/test-ubuntu-bug-6149934
-rwxr-xr-xtest/integration/test-ubuntu-bug-761175-remove-purge4
-rwxr-xr-xtest/integration/test-ubuntu-bug-784473-InRelease-one-message-only4
-rwxr-xr-xtest/integration/test-ubuntu-bug-802901-multiarch-early-remove4
-rwxr-xr-xtest/integration/test-ubuntu-bug-806274-install-suggests4
-rwxr-xr-xtest/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first4
-rwxr-xr-xtest/integration/test-ubuntu-bug-859188-multiarch-reinstall4
-rwxr-xr-xtest/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering4
-rwxr-xr-xtest/integration/test-unpack-different-version-unpacked4
-rwxr-xr-xtest/integration/test-very-tight-loop-configure-with-unpacking-new-packages4
-rwxr-xr-xtest/integration/test-xorg-break-providers4
207 files changed, 495 insertions, 518 deletions
diff --git a/test/integration/create-test-data b/test/integration/create-test-data
index effbe1ea3..7040aaed7 100755
--- a/test/integration/create-test-data
+++ b/test/integration/create-test-data
@@ -6,8 +6,8 @@ if [ -z "$1" -o -z "$2" ]; then
exit 1
fi
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
BUILDDIRECTORY="${TESTDIR}/../../build/bin"
GENERATE=$1
diff --git a/test/integration/framework b/test/integration/framework
index d52fcdf87..07b1f3236 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -169,11 +169,11 @@ runapt() {
msgdebug "Executing: ${CCMD}$*${CDEBUG} "
local CMD="$1"
shift
- case $CMD in
+ case "$CMD" in
sh|aptitude|*/*|command) ;;
*) CMD="${BUILDDIRECTORY}/$CMD";;
esac
- MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG="$(getaptconfig)" LD_LIBRARY_PATH=${LIBRARYPATH} $CMD "$@"
+ MALLOC_PERTURB_=21 MALLOC_CHECK_=2 APT_CONFIG="$(getaptconfig)" LD_LIBRARY_PATH=${LIBRARYPATH} "$CMD" "$@"
}
aptconfig() { runapt apt-config "$@"; }
aptcache() { runapt apt-cache "$@"; }
@@ -307,10 +307,8 @@ setupenvironment() {
if [ -f "${TESTDIRECTORY}/${SOURCESSFILE}" ]; then
cp "${TESTDIRECTORY}/${SOURCESSFILE}" aptarchive/Sources
fi
- for key in $(find "$TESTDIRECTORY" -name '*.pub' -o -name '*.sec'); do
- cp "$key" keys/
- chmod 644 "$key"
- done
+ find "$TESTDIRECTORY" \( -name '*.pub' -o -name '*.sec' \) -exec cp '{}' keys/ \;
+ chmod 644 keys/*
ln -s "${TMPWORKINGDIRECTORY}/keys/joesixpack.pub" rootdir/etc/apt/trusted.gpg.d/joesixpack.gpg
echo "Dir \"${TMPWORKINGDIRECTORY}/rootdir\";" > aptconfig.conf
@@ -330,11 +328,11 @@ setupenvironment() {
cat > "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" <<EOF
#!/bin/sh
set -e
-if [ -r "${TMPWORKINGDIRECTORY}/noopchroot.so" ]; then
+if [ -r '${TMPWORKINGDIRECTORY}/noopchroot.so' ]; then
if [ -n "\$LD_LIBRARY_PATH" ]; then
- export LD_LIBRARY_PATH="${TMPWORKINGDIRECTORY}:${LD_LIBRARY_PATH}"
+ export LD_LIBRARY_PATH='${TMPWORKINGDIRECTORY}:'"\${LD_LIBRARY_PATH}"
else
- export LD_LIBRARY_PATH="${TMPWORKINGDIRECTORY}"
+ export LD_LIBRARY_PATH='${TMPWORKINGDIRECTORY}'
fi
if [ -n "\$LD_PRELOAD" ]; then
export LD_PRELOAD="noopchroot.so \${LD_PRELOAD}"
@@ -345,13 +343,13 @@ fi
EOF
cp "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/gdb-dpkg"
cat >> "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" <<EOF
-exec fakeroot "${DPKG:-dpkg}" --root="${TMPWORKINGDIRECTORY}/rootdir" \\
- --log="${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log" \\
+exec fakeroot '${DPKG:-dpkg}' --root='${TMPWORKINGDIRECTORY}/rootdir' \\
+ --log='${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log' \\
--force-not-root --force-bad-path "\$@"
EOF
cat >> "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/gdb-dpkg" <<EOF
-exec fakeroot gdb --quiet -ex run "${DPKG:-dpkg}" --args "${DPKG:-dpkg}" --root="${TMPWORKINGDIRECTORY}/rootdir" \\
- --log="${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log" \\
+exec fakeroot gdb --quiet -ex run '${DPKG:-dpkg}' --args '${DPKG:-dpkg}' --root='${TMPWORKINGDIRECTORY}/rootdir' \\
+ --log='${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log' \\
--force-not-root --force-bad-path "\$@"
EOF
chmod +x "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/dpkg" "${TMPWORKINGDIRECTORY}/rootdir/usr/bin/gdb-dpkg"
@@ -1186,7 +1184,7 @@ changetowebserver() {
cd aptarchive
local LOG="webserver.log"
if ! aptwebserver --port 0 -o aptwebserver::fork=1 -o aptwebserver::portfile='aptwebserver.port' "$@" >$LOG 2>&1 ; then
- cat $LOG
+ cat "$LOG"
false
fi
waitforpidfile aptwebserver.pid
diff --git a/test/integration/header-compilation b/test/integration/header-compilation
index 634504b71..33e0a5ce6 100755
--- a/test/integration/header-compilation
+++ b/test/integration/header-compilation
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
(for i in $TESTDIR/../../build/include/apt-pkg/*.h; do echo "#include \"$i\""; done) > include.h
diff --git a/test/integration/run-tests b/test/integration/run-tests
index 89c3a10e7..7a250d2c5 100755
--- a/test/integration/run-tests
+++ b/test/integration/run-tests
@@ -83,7 +83,8 @@ PASS=0
ALL=0
FAILED_TESTS=""
DIR="$(readlink -f "$(dirname "$0")")"
-TESTLIST="$(find "$DIR" -mindepth 1 -maxdepth 1 -regex '^.*/test-[^/]*$' | sort)"
+cd "$DIR"
+TESTLIST="$(find . -mindepth 1 -maxdepth 1 -regex '^\./test-[^/]*$' | sort)"
if [ -n "$APT_TEST_JOBS" ]; then
if [ "$MSGCOLOR" != 'NO' ]; then
export MSGCOLOR='ALWAYS'
diff --git a/test/integration/skip-avoid-avoiding-breaks-predepends b/test/integration/skip-avoid-avoiding-breaks-predepends
index ed231bc3f..0697ff4bd 100755
--- a/test/integration/skip-avoid-avoiding-breaks-predepends
+++ b/test/integration/skip-avoid-avoiding-breaks-predepends
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/skip-bug-601016-description-translation b/test/integration/skip-bug-601016-description-translation
index 33c209e9d..fd0465acd 100755
--- a/test/integration/skip-bug-601016-description-translation
+++ b/test/integration/skip-bug-601016-description-translation
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386' 'amd64'
diff --git a/test/integration/skip-bug-711456-apt-cdrom-multiple-cds-multiarch b/test/integration/skip-bug-711456-apt-cdrom-multiple-cds-multiarch
index 9e683b5b9..9abaee1f1 100755
--- a/test/integration/skip-bug-711456-apt-cdrom-multiple-cds-multiarch
+++ b/test/integration/skip-bug-711456-apt-cdrom-multiple-cds-multiarch
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-00-commands-have-help b/test/integration/test-00-commands-have-help
index f2317dbdf..9d66f9221 100755
--- a/test/integration/test-00-commands-have-help
+++ b/test/integration/test-00-commands-have-help
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-acquire-binary-all b/test/integration/test-acquire-binary-all
index c8f90f26d..49bbc714e 100755
--- a/test/integration/test-acquire-binary-all
+++ b/test/integration/test-acquire-binary-all
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-acquire-same-file-multiple-times b/test/integration/test-acquire-same-file-multiple-times
index 354c683f2..fda7bf630 100755
--- a/test/integration/test-acquire-same-file-multiple-times
+++ b/test/integration/test-acquire-same-file-multiple-times
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR="$(readlink -f "$(dirname "$0")")"
. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-acquire-same-repository-multiple-times b/test/integration/test-acquire-same-repository-multiple-times
index eea81fd69..c8372bd41 100755
--- a/test/integration/test-acquire-same-repository-multiple-times
+++ b/test/integration/test-acquire-same-repository-multiple-times
@@ -1,13 +1,13 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
TESTFILE="$TESTDIR/framework"
-cp $TESTFILE aptarchive/foo
+cp "$TESTFILE" aptarchive/foo
APTARCHIVE="$(readlink -f ./aptarchive)"
getcodenamefromsuite() { echo "jessie"; }
@@ -37,7 +37,7 @@ while read line; do
if [ -z "\$line" ]; then
sleep 0.5
fi
-done | "$OLDMETHODS/\${0##*/}"
+done | '$OLDMETHODS/'"\${0##*/}"
EOF
chmod +x "${NEWMETHODS}/file"
ln -s "${NEWMETHODS}/file" "${NEWMETHODS}/http"
diff --git a/test/integration/test-allow b/test/integration/test-allow
index 0275fbec8..2cc57bc1e 100755
--- a/test/integration/test-allow
+++ b/test/integration/test-allow
@@ -5,7 +5,7 @@
set -e
TESTDIR="$(readlink -f "$(dirname $0)")"
-. $TESTDIR/framework
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-allow-scores-for-all-dependency-types b/test/integration/test-allow-scores-for-all-dependency-types
index 30cc2fc93..1a08f2ed2 100755
--- a/test/integration/test-allow-scores-for-all-dependency-types
+++ b/test/integration/test-allow-scores-for-all-dependency-types
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-apt-acquire-additional-files b/test/integration/test-apt-acquire-additional-files
index 0a9653ce6..cd2f3c559 100755
--- a/test/integration/test-apt-acquire-additional-files
+++ b/test/integration/test-apt-acquire-additional-files
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-apt-acquire-additional-files-duplicates b/test/integration/test-apt-acquire-additional-files-duplicates
index c8d386cbe..8a919c01d 100755
--- a/test/integration/test-apt-acquire-additional-files-duplicates
+++ b/test/integration/test-apt-acquire-additional-files-duplicates
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-by-hash-update b/test/integration/test-apt-by-hash-update
index 67ece60d2..9701f97f9 100755
--- a/test/integration/test-apt-by-hash-update
+++ b/test/integration/test-apt-by-hash-update
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-apt-cache b/test/integration/test-apt-cache
index f5bdf187a..9ff8ea724 100755
--- a/test/integration/test-apt-cache
+++ b/test/integration/test-apt-cache
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-cache-showsrc b/test/integration/test-apt-cache-showsrc
index 319b4f2f2..88de077fc 100755
--- a/test/integration/test-apt-cache-showsrc
+++ b/test/integration/test-apt-cache-showsrc
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-cdrom b/test/integration/test-apt-cdrom
index c5da17db2..a3c3b5ba0 100755
--- a/test/integration/test-apt-cdrom
+++ b/test/integration/test-apt-cdrom
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-cli-list b/test/integration/test-apt-cli-list
index 1e9ef871c..ca6f86661 100755
--- a/test/integration/test-apt-cli-list
+++ b/test/integration/test-apt-cli-list
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-cli-search b/test/integration/test-apt-cli-search
index e86661dcb..6457ece6c 100755
--- a/test/integration/test-apt-cli-search
+++ b/test/integration/test-apt-cli-search
@@ -1,18 +1,12 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
-if [ ! -x ${BUILDDIRECTORY}/apt ]; then
- msgmsg "No ${BUILDDIRECTORY}/apt"
- msgskip
- exit 0
-fi
-
DESCR='Some description that has a unusual word xxyyzz and aabbcc and a UPPERCASE'
DESCR2='Some other description with the unusual aabbcc only'
insertpackage 'unstable' 'foo' 'all' '1.0' '' '' "$DESCR
@@ -23,7 +17,7 @@ insertpackage 'testing' 'bar' 'i386' '2.0' '' '' "$DESCR2"
setupaptarchive
-APTARCHIVE=$(readlink -f ./aptarchive)
+APTARCHIVE="$(readlink -f ./aptarchive)"
testfailureequal 'E: You must give at least one search pattern' aptcache search
testfailureequal 'E: You must give at least one search pattern' apt search
diff --git a/test/integration/test-apt-cli-show b/test/integration/test-apt-cli-show
index 3718f0e9e..754b3aa5f 100755
--- a/test/integration/test-apt-cli-show
+++ b/test/integration/test-apt-cli-show
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386' 'amd64'
diff --git a/test/integration/test-apt-cli-update b/test/integration/test-apt-cli-update
index 5d8503404..b423072c3 100755
--- a/test/integration/test-apt-cli-update
+++ b/test/integration/test-apt-cli-update
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-cli-upgrade b/test/integration/test-apt-cli-upgrade
index 54f2ecd11..705c16386 100755
--- a/test/integration/test-apt-cli-upgrade
+++ b/test/integration/test-apt-cli-upgrade
@@ -1,26 +1,19 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
-if [ ! -x ${BUILDDIRECTORY}/apt ]; then
- msgmsg "No ${BUILDDIRECTORY}/apt"
- msgskip
- exit 0
-fi
-
-
insertpackage 'unstable' 'foo' 'all' '2.0' 'Depends: foo-new-dependency'
insertpackage 'unstable' 'foo-new-dependency' 'all' '2.0'
insertinstalledpackage 'foo' 'all' '1.0'
setupaptarchive
-APTARCHIVE=$(readlink -f ./aptarchive)
+APTARCHIVE="$(readlink -f ./aptarchive)"
# default is to allow new dependencies
testsuccessequal "The following NEW packages will be installed:
diff --git a/test/integration/test-apt-config b/test/integration/test-apt-config
index 2eea9a0f8..abae83ee6 100755
--- a/test/integration/test-apt-config
+++ b/test/integration/test-apt-config
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-apt-download-progress b/test/integration/test-apt-download-progress
index b316b93ef..ac8c7d15f 100755
--- a/test/integration/test-apt-download-progress
+++ b/test/integration/test-apt-download-progress
@@ -4,8 +4,8 @@
#
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
changetohttpswebserver
diff --git a/test/integration/test-apt-extracttemplates b/test/integration/test-apt-extracttemplates
index 8f335589e..b299d85f4 100755
--- a/test/integration/test-apt-extracttemplates
+++ b/test/integration/test-apt-extracttemplates
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-apt-ftparchive-by-hash b/test/integration/test-apt-ftparchive-by-hash
index ca881ed81..c7aeea0f9 100755
--- a/test/integration/test-apt-ftparchive-by-hash
+++ b/test/integration/test-apt-ftparchive-by-hash
@@ -13,8 +13,8 @@ verify_by_hash() {
#
# main()
#
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
configcompression 'gz' '.'
diff --git a/test/integration/test-apt-ftparchive-cachedb b/test/integration/test-apt-ftparchive-cachedb
index 889e45cbe..1a06ff343 100755
--- a/test/integration/test-apt-ftparchive-cachedb
+++ b/test/integration/test-apt-ftparchive-cachedb
@@ -22,8 +22,8 @@ usr/share/doc/foo/copyright others/foo"
#
# main()
#
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-apt-ftparchive-cachedb-lp1274466 b/test/integration/test-apt-ftparchive-cachedb-lp1274466
index 44bc85fea..c230e47dc 100755
--- a/test/integration/test-apt-ftparchive-cachedb-lp1274466
+++ b/test/integration/test-apt-ftparchive-cachedb-lp1274466
@@ -5,15 +5,15 @@ set -e
#
# main()
#
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
confighashes 'MD5' 'SHA1' 'SHA256' 'SHA512'
# gather the db and the deb, ensure mtime is not modfied as its saved in the DB
-cp -p $TESTDIR/deb-lp1274466-cachedb.deb foo_1_i386.deb
-cp -p $TESTDIR/cachedb-lp1274466-old-format.db old-format.db
+cp -p "$TESTDIR/deb-lp1274466-cachedb.deb" foo_1_i386.deb
+cp -p "$TESTDIR/cachedb-lp1274466-old-format.db" old-format.db
# verify that the format is different
testsuccess aptftparchive --db new-format.db packages .
diff --git a/test/integration/test-apt-ftparchive-src-cachedb b/test/integration/test-apt-ftparchive-src-cachedb
index 31af1e11e..8bab1fd5e 100755
--- a/test/integration/test-apt-ftparchive-src-cachedb
+++ b/test/integration/test-apt-ftparchive-src-cachedb
@@ -89,8 +89,8 @@ create_clearsigned_source_files() {
#
# main()
#
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
confighashes 'MD5' 'SHA1' 'SHA256' 'SHA512'
diff --git a/test/integration/test-apt-get-autoremove b/test/integration/test-apt-get-autoremove
index 8630815ab..8d4516582 100755
--- a/test/integration/test-apt-get-autoremove
+++ b/test/integration/test-apt-get-autoremove
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-apt-get-build-dep b/test/integration/test-apt-get-build-dep
index a8e6f6843..3d6550b60 100755
--- a/test/integration/test-apt-get-build-dep
+++ b/test/integration/test-apt-get-build-dep
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog
index 0a7cf662e..01b81c737 100755
--- a/test/integration/test-apt-get-changelog
+++ b/test/integration/test-apt-get-changelog
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-apt-get-clean b/test/integration/test-apt-get-clean
index 78cb95d74..9d15cd826 100755
--- a/test/integration/test-apt-get-clean
+++ b/test/integration/test-apt-get-clean
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download
index 78386aa7f..fc0e6cfa3 100755
--- a/test/integration/test-apt-get-download
+++ b/test/integration/test-apt-get-download
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-get-install-deb b/test/integration/test-apt-get-install-deb
index a3600b54b..1e9520fe6 100755
--- a/test/integration/test-apt-get-install-deb
+++ b/test/integration/test-apt-get-install-deb
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-get-install-virtual-pkgs b/test/integration/test-apt-get-install-virtual-pkgs
index c785205ee..b2fd7499c 100755
--- a/test/integration/test-apt-get-install-virtual-pkgs
+++ b/test/integration/test-apt-get-install-virtual-pkgs
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-get-source b/test/integration/test-apt-get-source
index 99777a530..27395ab3b 100755
--- a/test/integration/test-apt-get-source
+++ b/test/integration/test-apt-get-source
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-get-source-arch b/test/integration/test-apt-get-source-arch
index 348f35f0b..4958fda06 100755
--- a/test/integration/test-apt-get-source-arch
+++ b/test/integration/test-apt-get-source-arch
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386" "amd64"
diff --git a/test/integration/test-apt-get-source-authenticated b/test/integration/test-apt-get-source-authenticated
index 720d2a454..40710d5d6 100755
--- a/test/integration/test-apt-get-source-authenticated
+++ b/test/integration/test-apt-get-source-authenticated
@@ -6,8 +6,8 @@
#
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-get-source-multisources b/test/integration/test-apt-get-source-multisources
index ba370fea6..136867ead 100755
--- a/test/integration/test-apt-get-source-multisources
+++ b/test/integration/test-apt-get-source-multisources
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'armhf'
diff --git a/test/integration/test-apt-get-update-unauth-warning b/test/integration/test-apt-get-update-unauth-warning
index 6092ddb57..093478b9e 100755
--- a/test/integration/test-apt-get-update-unauth-warning
+++ b/test/integration/test-apt-get-update-unauth-warning
@@ -4,8 +4,8 @@
#
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-get-upgrade b/test/integration/test-apt-get-upgrade
index 09cbcdb7e..50a90ce66 100755
--- a/test/integration/test-apt-get-upgrade
+++ b/test/integration/test-apt-get-upgrade
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-helper b/test/integration/test-apt-helper
index a0454a5a2..b2347ddcf 100755
--- a/test/integration/test-apt-helper
+++ b/test/integration/test-apt-helper
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-apt-https-no-redirect b/test/integration/test-apt-https-no-redirect
index a29c0dacf..b437ac1e6 100755
--- a/test/integration/test-apt-https-no-redirect
+++ b/test/integration/test-apt-https-no-redirect
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-key b/test/integration/test-apt-key
index dbe01c153..6a4e0d867 100755
--- a/test/integration/test-apt-key
+++ b/test/integration/test-apt-key
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-apt-key-net-update b/test/integration/test-apt-key-net-update
index 93c72dd5b..9702e0ca8 100755
--- a/test/integration/test-apt-key-net-update
+++ b/test/integration/test-apt-key-net-update
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-mark b/test/integration/test-apt-mark
index 6a5e11e3e..7a115b03f 100755
--- a/test/integration/test-apt-mark
+++ b/test/integration/test-apt-mark
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-move-and-forget-manual-sections b/test/integration/test-apt-move-and-forget-manual-sections
index af9143dda..4617abab3 100755
--- a/test/integration/test-apt-move-and-forget-manual-sections
+++ b/test/integration/test-apt-move-and-forget-manual-sections
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-apt-never-markauto-sections b/test/integration/test-apt-never-markauto-sections
index 9f490a1bd..aa145d217 100755
--- a/test/integration/test-apt-never-markauto-sections
+++ b/test/integration/test-apt-never-markauto-sections
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-progress-fd b/test/integration/test-apt-progress-fd
index e30d503cb..f0d208967 100755
--- a/test/integration/test-apt-progress-fd
+++ b/test/integration/test-apt-progress-fd
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-progress-fd-conffile b/test/integration/test-apt-progress-fd-conffile
index ec3ded85d..9fb6fbefc 100755
--- a/test/integration/test-apt-progress-fd-conffile
+++ b/test/integration/test-apt-progress-fd-conffile
@@ -34,8 +34,6 @@ echo 'meep' >> rootdir/etc/compiz.conf/compiz.conf
# FIXME: Is there really no way to see if dpkg actually prompts?
msgtest 'Test for successful execution of' 'apt-get install compiz-core=2.0'
-OUTPUT="$(mktemp)"
-addtrap "rm \"$OUTPUT\";"
exec 3> apt-progress.log
testsuccess --nomsg aptget install compiz-core=2.0 -o APT::Status-Fd=3 -o Dpkg::Use-Pty=false -o dpkg::options::='--force-confold'
diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822
index ca7f14cb9..58fd73275 100755
--- a/test/integration/test-apt-progress-fd-deb822
+++ b/test/integration/test-apt-progress-fd-deb822
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-progress-fd-error b/test/integration/test-apt-progress-fd-error
index ccbb000c7..131e50256 100755
--- a/test/integration/test-apt-progress-fd-error
+++ b/test/integration/test-apt-progress-fd-error
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-apt-showlist-orgroup-in-recommends b/test/integration/test-apt-showlist-orgroup-in-recommends
index fea54f1ce..a9d65e3bb 100755
--- a/test/integration/test-apt-showlist-orgroup-in-recommends
+++ b/test/integration/test-apt-showlist-orgroup-in-recommends
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-apt-sources-deb822 b/test/integration/test-apt-sources-deb822
index c29fde0c4..5b22eaa80 100755
--- a/test/integration/test-apt-sources-deb822
+++ b/test/integration/test-apt-sources-deb822
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-apt-tagfile-fields-order b/test/integration/test-apt-tagfile-fields-order
index 27d5c14ff..4af58aabb 100755
--- a/test/integration/test-apt-tagfile-fields-order
+++ b/test/integration/test-apt-tagfile-fields-order
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
dpkg_field_ordered_list() {
@@ -31,7 +31,7 @@ comparelsts() {
msgtest 'Check that apt knows all fields dpkg orders in' 'Packages'
dpkg_field_ordered_list 'CTRL_INDEX_PKG' > dpkg.lst
-sed -ne 's#^ "\(.*\)",.*$#\1#p' ${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c | sed -n '/^Package$/,/^Package$/ p' | head -n -1 | sort -u > apt.lst
+sed -ne 's#^ "\(.*\)",.*$#\1#p' "${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c" | sed -n '/^Package$/,/^Package$/ p' | head -n -1 | sort -u > apt.lst
comparelsts
msgtest 'Check that apt knows all fields dpkg orders in' 'status'
@@ -45,7 +45,7 @@ comparelsts
msgtest 'Check that apt knows all fields dpkg orders in' 'Sources'
dpkg_field_ordered_list 'CTRL_INDEX_SRC' > dpkg.lst
echo 'Package' > apt.tmp
-sed -ne 's#^ "\(.*\)",.*$#\1#p' ${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c | sed '/^Package$/,/^Package$/ d' >> apt.tmp
+sed -ne 's#^ "\(.*\)",.*$#\1#p' "${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c" | sed '/^Package$/,/^Package$/ d' >> apt.tmp
sort -u apt.tmp > apt.lst
comparelsts
@@ -63,7 +63,7 @@ if [ "$USER" = 'david' ]; then
msgpass
msgtest 'Check that apt knows about all fields' 'dpkg parses'
sed -n 's#^.*FIELD("\(.*\)").*$#\1#p' "${DPKGSOURCE}" | sort -u > dpkg.lst
- sed -ne 's#^ "\(.*\)",.*$#\1#p' ${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c | sed -n '/^Package$/,/^Package$/ p' | head -n -1 | sort -u > apt.lst
+ sed -ne 's#^ "\(.*\)",.*$#\1#p' "${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c" | sed -n '/^Package$/,/^Package$/ p' | head -n -1 | sort -u > apt.lst
comparelsts
fi
@@ -76,7 +76,7 @@ if [ "$USER" = 'david' ]; then
msgtest 'Check that apt knows about all fields' 'dak knows'
# dak mixes both, so we can only check with the mixed one as well
sed -ne "s#^.* VALUES ('\(.*\)', \(.*\)).*\$#\1 \2#p" "${DAKSOURCE}" | cut -d ' ' -f 1 | sort -u > dpkg.lst
- sed -ne 's#^ "\(.*\)",.*$#\1#p' ${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c | sort -u > apt.lst
+ sed -ne 's#^ "\(.*\)",.*$#\1#p' "${SOURCEDIRECTORY}/apt-pkg/tagfile-order.c" | sort -u > apt.lst
comparelsts
fi
fi
diff --git a/test/integration/test-apt-translation-has-no-packages b/test/integration/test-apt-translation-has-no-packages
index 329e529ce..3c07af3b5 100755
--- a/test/integration/test-apt-translation-has-no-packages
+++ b/test/integration/test-apt-translation-has-no-packages
@@ -9,18 +9,12 @@
#
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "amd64"
-if [ ! -x ${BUILDDIRECTORY}/apt ]; then
- msgmsg "No ${BUILDDIRECTORY}/apt"
- msgskip
- exit 0
-fi
-
buildsimplenativepackage 'foo' 'all' '1.0'
setupaptarchive
diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size
index 825500b8e..079e94802 100755
--- a/test/integration/test-apt-update-expected-size
+++ b/test/integration/test-apt-update-expected-size
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-update-file b/test/integration/test-apt-update-file
index c5b237257..369b40f2f 100755
--- a/test/integration/test-apt-update-file
+++ b/test/integration/test-apt-update-file
@@ -5,8 +5,8 @@
#
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "amd64"
diff --git a/test/integration/test-apt-update-filesize-mismatch b/test/integration/test-apt-update-filesize-mismatch
index a23c03c3f..9f95906b5 100755
--- a/test/integration/test-apt-update-filesize-mismatch
+++ b/test/integration/test-apt-update-filesize-mismatch
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
configcompression 'gz'
diff --git a/test/integration/test-apt-update-hashsum-mismatch b/test/integration/test-apt-update-hashsum-mismatch
index 4627f7afd..f3f6a4236 100755
--- a/test/integration/test-apt-update-hashsum-mismatch
+++ b/test/integration/test-apt-update-hashsum-mismatch
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
configcompression 'gz'
diff --git a/test/integration/test-apt-update-ims b/test/integration/test-apt-update-ims
index 553ae92df..f175ca355 100755
--- a/test/integration/test-apt-update-ims
+++ b/test/integration/test-apt-update-ims
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-apt-update-nofallback b/test/integration/test-apt-update-nofallback
index 92daa5512..b18bd4b62 100755
--- a/test/integration/test-apt-update-nofallback
+++ b/test/integration/test-apt-update-nofallback
@@ -200,8 +200,8 @@ W: Some index files failed to download. They have been ignored, or old ones used
}
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-update-not-modified b/test/integration/test-apt-update-not-modified
index f6dea81e2..82e69d5d5 100755
--- a/test/integration/test-apt-update-not-modified
+++ b/test/integration/test-apt-update-not-modified
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-apt-update-rollback b/test/integration/test-apt-update-rollback
index e19240206..255d361e3 100755
--- a/test/integration/test-apt-update-rollback
+++ b/test/integration/test-apt-update-rollback
@@ -169,8 +169,8 @@ test_inrelease_to_broken_gzip() {
testfileequal lists.before "$(listcurrentlistsdirectory)"
}
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-update-simple b/test/integration/test-apt-update-simple
index 2ec8cef0c..ca969e61b 100755
--- a/test/integration/test-apt-update-simple
+++ b/test/integration/test-apt-update-simple
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-apt-update-stale b/test/integration/test-apt-update-stale
index c01a2a1d4..4c3b1a790 100755
--- a/test/integration/test-apt-update-stale
+++ b/test/integration/test-apt-update-stale
@@ -6,8 +6,8 @@
#
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-apt-update-transactions b/test/integration/test-apt-update-transactions
index 8651d3a15..884838038 100755
--- a/test/integration/test-apt-update-transactions
+++ b/test/integration/test-apt-update-transactions
@@ -3,8 +3,8 @@ set -e
# ensure that an update will only succeed entirely or not at all
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-apt-update-unauth b/test/integration/test-apt-update-unauth
index 17e62db22..2ececc4f6 100755
--- a/test/integration/test-apt-update-unauth
+++ b/test/integration/test-apt-update-unauth
@@ -5,8 +5,8 @@
#
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
umask 022
diff --git a/test/integration/test-architecture-specification-parsing b/test/integration/test-architecture-specification-parsing
index 739741db0..5db05e9a0 100755
--- a/test/integration/test-architecture-specification-parsing
+++ b/test/integration/test-architecture-specification-parsing
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
# we need this construct here as it isn't really possible to fake native arch for dpkg-* tools
diff --git a/test/integration/test-authentication-basic b/test/integration/test-authentication-basic
index b27c80e90..95211ac0e 100755
--- a/test/integration/test-authentication-basic
+++ b/test/integration/test-authentication-basic
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-254770-segfault-if-cache-not-buildable b/test/integration/test-bug-254770-segfault-if-cache-not-buildable
index 6ae8944b2..6f6e1abc0 100755
--- a/test/integration/test-bug-254770-segfault-if-cache-not-buildable
+++ b/test/integration/test-bug-254770-segfault-if-cache-not-buildable
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
msgtest 'Test run as' 'non-root'
if [ "$(id -u)" = '0' ]; then
diff --git a/test/integration/test-bug-330162-encoded-tar-header b/test/integration/test-bug-330162-encoded-tar-header
index b3fae6bac..b779bbc65 100755
--- a/test/integration/test-bug-330162-encoded-tar-header
+++ b/test/integration/test-bug-330162-encoded-tar-header
@@ -1,11 +1,11 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
msgtest 'Test apt-ftparchive with encoded tar header package'
-cp $TESTDIR/deb-bug-330162-encoded-tar-header.deb aptarchive/
-test -z "$(aptftparchive packages aptarchive/ 2>&1 | grep 'E:')" && msgpass || msgfail
+cp "$TESTDIR/deb-bug-330162-encoded-tar-header.deb" aptarchive/
+testsuccess aptftparchive packages aptarchive/
diff --git a/test/integration/test-bug-407511-fail-invalid-default-release b/test/integration/test-bug-407511-fail-invalid-default-release
index 3d3b0ada3..0e1b5ef83 100755
--- a/test/integration/test-bug-407511-fail-invalid-default-release
+++ b/test/integration/test-bug-407511-fail-invalid-default-release
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-470115-new-and-tighten-recommends b/test/integration/test-bug-470115-new-and-tighten-recommends
index 3c159811d..f27990e3e 100755
--- a/test/integration/test-bug-470115-new-and-tighten-recommends
+++ b/test/integration/test-bug-470115-new-and-tighten-recommends
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-507998-dist-upgrade-recommends b/test/integration/test-bug-507998-dist-upgrade-recommends
index 70c6fb496..b546874ba 100755
--- a/test/integration/test-bug-507998-dist-upgrade-recommends
+++ b/test/integration/test-bug-507998-dist-upgrade-recommends
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-543966-downgrade-below-1000-pin b/test/integration/test-bug-543966-downgrade-below-1000-pin
index 1aa37740b..db81b7c7a 100755
--- a/test/integration/test-bug-543966-downgrade-below-1000-pin
+++ b/test/integration/test-bug-543966-downgrade-below-1000-pin
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed
index 1d969fea2..a189f9c93 100755
--- a/test/integration/test-bug-549968-install-depends-of-not-installed
+++ b/test/integration/test-bug-549968-install-depends-of-not-installed
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-590041-prefer-non-virtual-packages b/test/integration/test-bug-590041-prefer-non-virtual-packages
index b05ef5539..1b1e3aa4f 100755
--- a/test/integration/test-bug-590041-prefer-non-virtual-packages
+++ b/test/integration/test-bug-590041-prefer-non-virtual-packages
@@ -1,7 +1,8 @@
#!/bin/sh
set -e
-. $(readlink -f $(dirname $0))/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386' 'armel'
diff --git a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
index 37426ec11..76107520e 100755
--- a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
+++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
@@ -25,7 +25,7 @@ MD5sum: 8489687ce10e656babd467c9ee389349
Description-de: Verschiedene Dateien für das Basis-System von Debian"
predependsgawk() {
- cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status
+ cp "$TESTDIR/$(echo "$(basename "$0")" | sed 's/test-/status-/')" rootdir/var/lib/dpkg/status
echo "$pkgbasefile
Pre-Depends: $1
" >> rootdir/var/lib/dpkg/status
@@ -56,7 +56,7 @@ predependsgawk "awk | aawk"
predependsgawk "awk"
predependsgawk2() {
- cp $TESTDIR/$(echo "$(basename $0)" | sed 's/test-/status-/') rootdir/var/lib/dpkg/status
+ cp "$TESTDIR/$(echo "$(basename "$0")" | sed 's/test-/status-/')" rootdir/var/lib/dpkg/status
echo "$pkgbasefile
Pre-Depends: $1
" >> rootdir/var/lib/dpkg/status
diff --git a/test/integration/test-bug-591882-conkeror b/test/integration/test-bug-591882-conkeror
index b71d4d5fd..6b903431a 100755
--- a/test/integration/test-bug-591882-conkeror
+++ b/test/integration/test-bug-591882-conkeror
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
setupaptarchive
diff --git a/test/integration/test-bug-593360-modifiers-in-names b/test/integration/test-bug-593360-modifiers-in-names
index 57a24683e..dc9a15231 100755
--- a/test/integration/test-bug-593360-modifiers-in-names
+++ b/test/integration/test-bug-593360-modifiers-in-names
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
setupaptarchive
diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files
index 57e3c3dcf..e24ee6b44 100755
--- a/test/integration/test-bug-595691-empty-and-broken-archive-files
+++ b/test/integration/test-bug-595691-empty-and-broken-archive-files
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-596498-trusted-unsigned-repo b/test/integration/test-bug-596498-trusted-unsigned-repo
index a9e894bc9..4d0e3dc89 100755
--- a/test/integration/test-bug-596498-trusted-unsigned-repo
+++ b/test/integration/test-bug-596498-trusted-unsigned-repo
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-598669-install-postfix-gets-exim-heavy b/test/integration/test-bug-598669-install-postfix-gets-exim-heavy
index 2ec1d3d1c..e7e409391 100755
--- a/test/integration/test-bug-598669-install-postfix-gets-exim-heavy
+++ b/test/integration/test-bug-598669-install-postfix-gets-exim-heavy
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
setupaptarchive
diff --git a/test/integration/test-bug-601961-install-info b/test/integration/test-bug-601961-install-info
index 806d3f547..10944384a 100755
--- a/test/integration/test-bug-601961-install-info
+++ b/test/integration/test-bug-601961-install-info
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
setupaptarchive
diff --git a/test/integration/test-bug-602412-dequote-redirect b/test/integration/test-bug-602412-dequote-redirect
index e90fd240b..c5f0e1e64 100755
--- a/test/integration/test-bug-602412-dequote-redirect
+++ b/test/integration/test-bug-602412-dequote-redirect
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove
index da3bde5fd..48d79ea77 100755
--- a/test/integration/test-bug-604222-new-and-autoremove
+++ b/test/integration/test-bug-604222-new-and-autoremove
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
setupaptarchive
diff --git a/test/integration/test-bug-604401-files-are-directories b/test/integration/test-bug-604401-files-are-directories
index fe0ccc783..129a429c3 100755
--- a/test/integration/test-bug-604401-files-are-directories
+++ b/test/integration/test-bug-604401-files-are-directories
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
setupaptarchive
diff --git a/test/integration/test-bug-605394-versioned-or-groups b/test/integration/test-bug-605394-versioned-or-groups
index f938ba311..a362463d5 100755
--- a/test/integration/test-bug-605394-versioned-or-groups
+++ b/test/integration/test-bug-605394-versioned-or-groups
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
setupaptarchive
diff --git a/test/integration/test-bug-611729-mark-as-manual b/test/integration/test-bug-611729-mark-as-manual
index 31856b2c1..bd9af32b6 100755
--- a/test/integration/test-bug-611729-mark-as-manual
+++ b/test/integration/test-bug-611729-mark-as-manual
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts
index 11ec284c4..bc573951d 100755
--- a/test/integration/test-bug-612099-multiarch-conflicts
+++ b/test/integration/test-bug-612099-multiarch-conflicts
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386' 'amd64'
diff --git a/test/integration/test-bug-612557-garbage-upgrade b/test/integration/test-bug-612557-garbage-upgrade
index 1709af7f2..d232c4412 100755
--- a/test/integration/test-bug-612557-garbage-upgrade
+++ b/test/integration/test-bug-612557-garbage-upgrade
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-612958-use-dpkg-multiarch-config b/test/integration/test-bug-612958-use-dpkg-multiarch-config
index 9556a5aef..54200ff23 100755
--- a/test/integration/test-bug-612958-use-dpkg-multiarch-config
+++ b/test/integration/test-bug-612958-use-dpkg-multiarch-config
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-613420-new-garbage-dependency b/test/integration/test-bug-613420-new-garbage-dependency
index 8c6fd1f42..b225bd60e 100755
--- a/test/integration/test-bug-613420-new-garbage-dependency
+++ b/test/integration/test-bug-613420-new-garbage-dependency
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
index 582e1bf5e..6ea0345e1 100755
--- a/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
+++ b/test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep
index 536124c2c..d9582f6b6 100755
--- a/test/integration/test-bug-618288-multiarch-same-lockstep
+++ b/test/integration/test-bug-618288-multiarch-same-lockstep
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-bug-618848-always-respect-user-requests b/test/integration/test-bug-618848-always-respect-user-requests
index a7ffee6c1..7d2b35f9e 100755
--- a/test/integration/test-bug-618848-always-respect-user-requests
+++ b/test/integration/test-bug-618848-always-respect-user-requests
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-624218-Translation-file-handling b/test/integration/test-bug-624218-Translation-file-handling
index 9733b7026..b629dd665 100755
--- a/test/integration/test-bug-624218-Translation-file-handling
+++ b/test/integration/test-bug-624218-Translation-file-handling
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction
index 6444c6110..dad6e47fa 100755
--- a/test/integration/test-bug-632221-cross-dependency-satisfaction
+++ b/test/integration/test-bug-632221-cross-dependency-satisfaction
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'armel'
diff --git a/test/integration/test-bug-633350-do-not-kill-last-char-in-Release b/test/integration/test-bug-633350-do-not-kill-last-char-in-Release
index 988f8c9d0..c0802e8b5 100755
--- a/test/integration/test-bug-633350-do-not-kill-last-char-in-Release
+++ b/test/integration/test-bug-633350-do-not-kill-last-char-in-Release
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-64141-install-dependencies-for-on-hold b/test/integration/test-bug-64141-install-dependencies-for-on-hold
index ff8fa4523..7bbb9bf9b 100755
--- a/test/integration/test-bug-64141-install-dependencies-for-on-hold
+++ b/test/integration/test-bug-64141-install-dependencies-for-on-hold
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native' 'strange-arch'
diff --git a/test/integration/test-bug-657695-resolver-breaks-on-virtuals b/test/integration/test-bug-657695-resolver-breaks-on-virtuals
index 14c90b3b9..366113ade 100755
--- a/test/integration/test-bug-657695-resolver-breaks-on-virtuals
+++ b/test/integration/test-bug-657695-resolver-breaks-on-virtuals
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-661537-build-profiles-support b/test/integration/test-bug-661537-build-profiles-support
index b4f6fb916..707562df3 100755
--- a/test/integration/test-bug-661537-build-profiles-support
+++ b/test/integration/test-bug-661537-build-profiles-support
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386' 'armel'
diff --git a/test/integration/test-bug-673536-pre-depends-breaks-loop b/test/integration/test-bug-673536-pre-depends-breaks-loop
index eb47553dc..bf3d2e2eb 100755
--- a/test/integration/test-bug-673536-pre-depends-breaks-loop
+++ b/test/integration/test-bug-673536-pre-depends-breaks-loop
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-bug-675449-essential-are-protected b/test/integration/test-bug-675449-essential-are-protected
index e62add938..69f6c2a3b 100755
--- a/test/integration/test-bug-675449-essential-are-protected
+++ b/test/integration/test-bug-675449-essential-are-protected
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-bug-679371-apt-get-autoclean-multiarch b/test/integration/test-bug-679371-apt-get-autoclean-multiarch
index a9436fa11..47e5aa184 100755
--- a/test/integration/test-bug-679371-apt-get-autoclean-multiarch
+++ b/test/integration/test-bug-679371-apt-get-autoclean-multiarch
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-bug-680041-apt-mark-holds-correctly b/test/integration/test-bug-680041-apt-mark-holds-correctly
index a6fe76bc2..49bb21bc1 100755
--- a/test/integration/test-bug-680041-apt-mark-holds-correctly
+++ b/test/integration/test-bug-680041-apt-mark-holds-correctly
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-683786-build-dep-on-virtual-packages b/test/integration/test-bug-683786-build-dep-on-virtual-packages
index a73710259..dd599a0d0 100755
--- a/test/integration/test-bug-683786-build-dep-on-virtual-packages
+++ b/test/integration/test-bug-683786-build-dep-on-virtual-packages
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'armel'
diff --git a/test/integration/test-bug-686346-package-missing-architecture b/test/integration/test-bug-686346-package-missing-architecture
index d9bc0c3f2..8f9536a09 100755
--- a/test/integration/test-bug-686346-package-missing-architecture
+++ b/test/integration/test-bug-686346-package-missing-architecture
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-689582-100-char-long-path-names b/test/integration/test-bug-689582-100-char-long-path-names
index 58ece1d5a..290654b53 100755
--- a/test/integration/test-bug-689582-100-char-long-path-names
+++ b/test/integration/test-bug-689582-100-char-long-path-names
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-691453-apt-cache-search-multi-pattern b/test/integration/test-bug-691453-apt-cache-search-multi-pattern
index 15586b726..8aa6ca732 100755
--- a/test/integration/test-bug-691453-apt-cache-search-multi-pattern
+++ b/test/integration/test-bug-691453-apt-cache-search-multi-pattern
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-bug-709560-set-candidate-release b/test/integration/test-bug-709560-set-candidate-release
index 502ade92c..43eea36cc 100755
--- a/test/integration/test-bug-709560-set-candidate-release
+++ b/test/integration/test-bug-709560-set-candidate-release
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch b/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch
index 93a33d30f..a15ac06ed 100755
--- a/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch
+++ b/test/integration/test-bug-712116-dpkg-pre-install-pkgs-hook-multiarch
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-bug-712435-missing-descriptions b/test/integration/test-bug-712435-missing-descriptions
index 726134326..c23199305 100755
--- a/test/integration/test-bug-712435-missing-descriptions
+++ b/test/integration/test-bug-712435-missing-descriptions
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-717891-abolute-uris-for-proxies b/test/integration/test-bug-717891-abolute-uris-for-proxies
index d30dd5d4e..ed9b9a555 100755
--- a/test/integration/test-bug-717891-abolute-uris-for-proxies
+++ b/test/integration/test-bug-717891-abolute-uris-for-proxies
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-718329-support-data.tar-uncompressed b/test/integration/test-bug-718329-support-data.tar-uncompressed
index d2845f768..b1aa419a7 100755
--- a/test/integration/test-bug-718329-support-data.tar-uncompressed
+++ b/test/integration/test-bug-718329-support-data.tar-uncompressed
@@ -22,8 +22,8 @@ usr/share/doc/pkg/copyright pkg" aptftparchive contents incoming/
rm -rf incoming/*
}
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
test_process_package_with_compression "gzip" "data.tar.gz"
diff --git a/test/integration/test-bug-719263-print-uris-removes-authentication b/test/integration/test-bug-719263-print-uris-removes-authentication
index 207bf4611..e79e6912d 100755
--- a/test/integration/test-bug-719263-print-uris-removes-authentication
+++ b/test/integration/test-bug-719263-print-uris-removes-authentication
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-720597-build-dep-purge b/test/integration/test-bug-720597-build-dep-purge
index 6fa261fbd..8298d0f64 100755
--- a/test/integration/test-bug-720597-build-dep-purge
+++ b/test/integration/test-bug-720597-build-dep-purge
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-722207-print-uris-even-if-very-quiet b/test/integration/test-bug-722207-print-uris-even-if-very-quiet
index 07d76eaf0..d8d3c7218 100755
--- a/test/integration/test-bug-722207-print-uris-even-if-very-quiet
+++ b/test/integration/test-bug-722207-print-uris-even-if-very-quiet
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-723586-any-stripped-in-single-arch b/test/integration/test-bug-723586-any-stripped-in-single-arch
index 78c4eae64..38eb026ff 100755
--- a/test/integration/test-bug-723586-any-stripped-in-single-arch
+++ b/test/integration/test-bug-723586-any-stripped-in-single-arch
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-723705-tagfile-truncates-fields b/test/integration/test-bug-723705-tagfile-truncates-fields
index 21878ebf0..bfa3598ae 100755
--- a/test/integration/test-bug-723705-tagfile-truncates-fields
+++ b/test/integration/test-bug-723705-tagfile-truncates-fields
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-728500-tempdir b/test/integration/test-bug-728500-tempdir
index bff90c5f2..7497ffcf8 100755
--- a/test/integration/test-bug-728500-tempdir
+++ b/test/integration/test-bug-728500-tempdir
@@ -2,8 +2,8 @@
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
@@ -14,8 +14,6 @@ changetowebserver
msgtest 'Test apt-get update with incorrect' 'TMPDIR'
-OUTPUT="$(mktemp)"
-addtrap "rm \"$OUTPUT\";"
export TMPDIR=/does-not-exists
testsuccess aptget update -o Debug::Acquire::gpg=1
unset TMPDIR
diff --git a/test/integration/test-bug-732746-preferences b/test/integration/test-bug-732746-preferences
index ce73f1c17..d3bbdadfe 100755
--- a/test/integration/test-bug-732746-preferences
+++ b/test/integration/test-bug-732746-preferences
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-733028-gpg-resource-limit b/test/integration/test-bug-733028-gpg-resource-limit
index 7040856b3..430c8ad61 100755
--- a/test/integration/test-bug-733028-gpg-resource-limit
+++ b/test/integration/test-bug-733028-gpg-resource-limit
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-735967-lib32-to-i386-unavailable b/test/integration/test-bug-735967-lib32-to-i386-unavailable
index 1523b81e0..290df8a3f 100755
--- a/test/integration/test-bug-735967-lib32-to-i386-unavailable
+++ b/test/integration/test-bug-735967-lib32-to-i386-unavailable
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386' 'amd64'
diff --git a/test/integration/test-bug-737130-multicompress-file-modes b/test/integration/test-bug-737130-multicompress-file-modes
index 7df6339a2..2ae5166df 100755
--- a/test/integration/test-bug-737130-multicompress-file-modes
+++ b/test/integration/test-bug-737130-multicompress-file-modes
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-738785-switch-protocol b/test/integration/test-bug-738785-switch-protocol
index 0e84f55d9..e7d4a6744 100755
--- a/test/integration/test-bug-738785-switch-protocol
+++ b/test/integration/test-bug-738785-switch-protocol
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-740843-versioned-up-down-breaks b/test/integration/test-bug-740843-versioned-up-down-breaks
index 9426ffad1..143175cca 100755
--- a/test/integration/test-bug-740843-versioned-up-down-breaks
+++ b/test/integration/test-bug-740843-versioned-up-down-breaks
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-bug-745036-new-foreign-invalidates-cache b/test/integration/test-bug-745036-new-foreign-invalidates-cache
index bfa0f817c..6207badda 100755
--- a/test/integration/test-bug-745036-new-foreign-invalidates-cache
+++ b/test/integration/test-bug-745036-new-foreign-invalidates-cache
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-745046-candidate-propagation-fails b/test/integration/test-bug-745046-candidate-propagation-fails
index f54e1872e..64aaa6ac8 100755
--- a/test/integration/test-bug-745046-candidate-propagation-fails
+++ b/test/integration/test-bug-745046-candidate-propagation-fails
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-747261-arch-specific-conflicts b/test/integration/test-bug-747261-arch-specific-conflicts
index 08e66a7cd..e1370433f 100755
--- a/test/integration/test-bug-747261-arch-specific-conflicts
+++ b/test/integration/test-bug-747261-arch-specific-conflicts
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'sparc' 'armel'
diff --git a/test/integration/test-bug-753297-upgradable b/test/integration/test-bug-753297-upgradable
index ce2a48343..f33a6591d 100755
--- a/test/integration/test-bug-753297-upgradable
+++ b/test/integration/test-bug-753297-upgradable
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-758153-versioned-provides-support b/test/integration/test-bug-758153-versioned-provides-support
index d6e5ab643..9899f48d9 100755
--- a/test/integration/test-bug-758153-versioned-provides-support
+++ b/test/integration/test-bug-758153-versioned-provides-support
@@ -4,8 +4,8 @@ set -e
# dpkg implements versioned provides in commit 5bb02fe80e9f40dcad9703a72f67cf615ff217b5
# but previous versions seem to allow parsing, working and ignoring it.
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-bug-762160-relpath b/test/integration/test-bug-762160-relpath
index 204587727..1e66fbbc3 100755
--- a/test/integration/test-bug-762160-relpath
+++ b/test/integration/test-bug-762160-relpath
@@ -4,8 +4,8 @@
#
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-769609-triggers-still-pending-after-run b/test/integration/test-bug-769609-triggers-still-pending-after-run
index 665c4e2db..bd43578a5 100755
--- a/test/integration/test-bug-769609-triggers-still-pending-after-run
+++ b/test/integration/test-bug-769609-triggers-still-pending-after-run
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-770291-reinstall b/test/integration/test-bug-770291-reinstall
index e48505c9c..0dd8c89a9 100755
--- a/test/integration/test-bug-770291-reinstall
+++ b/test/integration/test-bug-770291-reinstall
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-778375-server-has-no-reason-phrase b/test/integration/test-bug-778375-server-has-no-reason-phrase
index a44920cbe..bce41235f 100755
--- a/test/integration/test-bug-778375-server-has-no-reason-phrase
+++ b/test/integration/test-bug-778375-server-has-no-reason-phrase
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-bug-782777-single-arch-weirdness b/test/integration/test-bug-782777-single-arch-weirdness
index 004903385..41be1e79c 100755
--- a/test/integration/test-bug-782777-single-arch-weirdness
+++ b/test/integration/test-bug-782777-single-arch-weirdness
@@ -3,8 +3,8 @@
# does not effect if they can be found or not
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-796070-downgrade-realpkg b/test/integration/test-bug-796070-downgrade-realpkg
index 3ad4fda3e..101324788 100755
--- a/test/integration/test-bug-796070-downgrade-realpkg
+++ b/test/integration/test-bug-796070-downgrade-realpkg
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-796070-downgrade-simulate b/test/integration/test-bug-796070-downgrade-simulate
index 0b4817d39..61ecc87d4 100755
--- a/test/integration/test-bug-796070-downgrade-simulate
+++ b/test/integration/test-bug-796070-downgrade-simulate
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-bug-807012-mixed-case-package-names b/test/integration/test-bug-807012-mixed-case-package-names
index 65da7b146..4f003abdf 100755
--- a/test/integration/test-bug-807012-mixed-case-package-names
+++ b/test/integration/test-bug-807012-mixed-case-package-names
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
TMPDIR=$(readlink -f .)
diff --git a/test/integration/test-bug-lp1347721-dpkg-ordering b/test/integration/test-bug-lp1347721-dpkg-ordering
index cfe7a4df2..3c31974f9 100755
--- a/test/integration/test-bug-lp1347721-dpkg-ordering
+++ b/test/integration/test-bug-lp1347721-dpkg-ordering
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
setupaptarchive
diff --git a/test/integration/test-bug-lp1445239-download-loop b/test/integration/test-bug-lp1445239-download-loop
index 6629e823d..a12d5252d 100755
--- a/test/integration/test-bug-lp1445239-download-loop
+++ b/test/integration/test-bug-lp1445239-download-loop
@@ -6,8 +6,8 @@
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-bug-multiarch-upgrade b/test/integration/test-bug-multiarch-upgrade
index b8821126f..cb5159c05 100755
--- a/test/integration/test-bug-multiarch-upgrade
+++ b/test/integration/test-bug-multiarch-upgrade
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-cachecontainer-architecture-specification b/test/integration/test-cachecontainer-architecture-specification
index 617379a79..65574685e 100755
--- a/test/integration/test-cachecontainer-architecture-specification
+++ b/test/integration/test-cachecontainer-architecture-specification
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'armel'
diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes
index 510166099..49ffc4a8a 100755
--- a/test/integration/test-compressed-indexes
+++ b/test/integration/test-compressed-indexes
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configcompression '.' 'xz' 'bz2' 'lzma' 'gz'
diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop
index 729a5e0f8..5b6e44626 100755
--- a/test/integration/test-conflicts-loop
+++ b/test/integration/test-conflicts-loop
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-conflicts-real-multiarch-same b/test/integration/test-conflicts-real-multiarch-same
index dd320aa8a..73f7b9a61 100755
--- a/test/integration/test-conflicts-real-multiarch-same
+++ b/test/integration/test-conflicts-real-multiarch-same
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-cve-2013-1051-InRelease-parsing b/test/integration/test-cve-2013-1051-InRelease-parsing
index 604599caa..3cc012e35 100755
--- a/test/integration/test-cve-2013-1051-InRelease-parsing
+++ b/test/integration/test-cve-2013-1051-InRelease-parsing
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-dpkg-assert-multi-arch b/test/integration/test-dpkg-assert-multi-arch
index b3fbbf0eb..f73c78935 100755
--- a/test/integration/test-dpkg-assert-multi-arch
+++ b/test/integration/test-dpkg-assert-multi-arch
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-essential-force-loopbreak b/test/integration/test-essential-force-loopbreak
index 86a852c32..6f7d99cb6 100755
--- a/test/integration/test-essential-force-loopbreak
+++ b/test/integration/test-essential-force-loopbreak
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol
index 995215009..54b58301f 100755
--- a/test/integration/test-external-dependency-solver-protocol
+++ b/test/integration/test-external-dependency-solver-protocol
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-failing-maintainer-scripts b/test/integration/test-failing-maintainer-scripts
index 0ea22b04d..781d06e5c 100755
--- a/test/integration/test-failing-maintainer-scripts
+++ b/test/integration/test-failing-maintainer-scripts
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-handle-redirect-as-used-mirror-change b/test/integration/test-handle-redirect-as-used-mirror-change
index 737df97f6..41dd0772e 100755
--- a/test/integration/test-handle-redirect-as-used-mirror-change
+++ b/test/integration/test-handle-redirect-as-used-mirror-change
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
configcompression '.' 'gz'
diff --git a/test/integration/test-handling-broken-orgroups b/test/integration/test-handling-broken-orgroups
index a465e5234..564ea8839 100755
--- a/test/integration/test-handling-broken-orgroups
+++ b/test/integration/test-handling-broken-orgroups
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-hashsum-verification b/test/integration/test-hashsum-verification
index 21ca87836..a31be6bcb 100755
--- a/test/integration/test-hashsum-verification
+++ b/test/integration/test-hashsum-verification
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
@@ -17,9 +17,9 @@ prepare() {
DATE='now + 6 days'
fi
for release in $(find rootdir/var/lib/apt/lists 2> /dev/null); do
- touch -d 'now - 6 hours' $release
+ touch -d 'now - 6 hours' "$release"
done
- cp $1 aptarchive/Packages
+ cp "$1" aptarchive/Packages
find aptarchive -name 'Release' -delete
compressfile aptarchive/Packages
# create Release file with incorret checksums
@@ -53,7 +53,7 @@ touch aptarchive/apt.deb
PKGFILE="${TESTDIR}/$(echo "$(basename $0)" | sed 's#^test-#Packages-#')"
runtest() {
- prepare ${PKGFILE}
+ prepare "${PKGFILE}"
rm -rf rootdir/var/lib/apt/lists
signreleasefiles 'Joe Sixpack'
find aptarchive/ -name "$DELETEFILE" -delete
diff --git a/test/integration/test-http-pipeline-messup b/test/integration/test-http-pipeline-messup
index a00182150..4069beb0d 100755
--- a/test/integration/test-http-pipeline-messup
+++ b/test/integration/test-http-pipeline-messup
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-ignore-provides-if-versioned-breaks b/test/integration/test-ignore-provides-if-versioned-breaks
index a7d9d4054..8c3750acf 100755
--- a/test/integration/test-ignore-provides-if-versioned-breaks
+++ b/test/integration/test-ignore-provides-if-versioned-breaks
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386' 'amd64'
diff --git a/test/integration/test-ignore-provides-if-versioned-conflicts b/test/integration/test-ignore-provides-if-versioned-conflicts
index f30789ea6..839609431 100755
--- a/test/integration/test-ignore-provides-if-versioned-conflicts
+++ b/test/integration/test-ignore-provides-if-versioned-conflicts
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386' 'amd64'
diff --git a/test/integration/test-implicit-conflicts-real-not-virtual b/test/integration/test-implicit-conflicts-real-not-virtual
index 7c1365bdd..02bd44208 100755
--- a/test/integration/test-implicit-conflicts-real-not-virtual
+++ b/test/integration/test-implicit-conflicts-real-not-virtual
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-kernel-helper-autoremove b/test/integration/test-kernel-helper-autoremove
index b4e37c46a..2e8da1c1e 100755
--- a/test/integration/test-kernel-helper-autoremove
+++ b/test/integration/test-kernel-helper-autoremove
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-method-rred b/test/integration/test-method-rred
index a8de3ea28..721aa5cdc 100755
--- a/test/integration/test-method-rred
+++ b/test/integration/test-method-rred
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-multiarch-allowed b/test/integration/test-multiarch-allowed
index ecdf39a86..4f3aeeaa5 100755
--- a/test/integration/test-multiarch-allowed
+++ b/test/integration/test-multiarch-allowed
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-multiarch-foreign b/test/integration/test-multiarch-foreign
index ad956dcdb..5daef4ad1 100755
--- a/test/integration/test-multiarch-foreign
+++ b/test/integration/test-multiarch-foreign
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386' 'armel'
diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts
index 41c057042..d86e638cd 100755
--- a/test/integration/test-no-fds-leaked-to-maintainer-scripts
+++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
@@ -13,7 +13,7 @@ BUILDDIR="incoming/fdleaks-1.0"
for script in 'preinst' 'postinst' 'prerm' 'postrm'; do
cat > ${BUILDDIR}/debian/$script << EOF
#!/bin/sh
-if [ -e "$(pwd)/rootdir/tmp/read_stdin" ]; then
+if [ -e '$(pwd)/rootdir/tmp/read_stdin' ]; then
read line;
echo "STDIN: -\$line-"
fi
diff --git a/test/integration/test-package-reinstallation b/test/integration/test-package-reinstallation
index f0412f98d..0b48c0a46 100755
--- a/test/integration/test-package-reinstallation
+++ b/test/integration/test-package-reinstallation
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-parse-all-archs-into-cache b/test/integration/test-parse-all-archs-into-cache
index f2a349b5d..65222f0fe 100755
--- a/test/integration/test-parse-all-archs-into-cache
+++ b/test/integration/test-parse-all-archs-into-cache
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-partial-file-support b/test/integration/test-partial-file-support
index 5b05b277e..8cfc3f2d3 100755
--- a/test/integration/test-partial-file-support
+++ b/test/integration/test-partial-file-support
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
@@ -68,8 +68,8 @@ testdownloadfile() {
}
TESTFILE='aptarchive/testfile'
-cp -a ${TESTDIR}/framework $TESTFILE
-cp -a ${TESTDIR}/framework "${TESTFILE}2"
+cp -a "${TESTDIR}/framework" "$TESTFILE"
+cp -a "${TESTDIR}/framework" "${TESTFILE}2"
followuprequest() {
local DOWN='./downloaded/testfile'
diff --git a/test/integration/test-pdiff-usage b/test/integration/test-pdiff-usage
index d60a81b21..f451e0558 100755
--- a/test/integration/test-pdiff-usage
+++ b/test/integration/test-pdiff-usage
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
@@ -46,7 +46,7 @@ testrun() {
local DOWNLOADHASH=true
if [ "$1" = 'nohash' ]; then DOWNLOADHASH=false; shift; fi
find aptarchive -name 'Packages*' -type f -delete
- cp ${PKGFILE} aptarchive/Packages
+ cp "${PKGFILE}" aptarchive/Packages
compressfile 'aptarchive/Packages'
generatereleasefiles
signreleasefiles
@@ -54,38 +54,38 @@ testrun() {
testsuccess aptget update "$@"
cp -a rootdir/var/lib/apt/lists rootdir/var/lib/apt/lists-bak
testnopackage newstuff
- testsuccessequal "$(cat ${PKGFILE})
+ testsuccessequal "$(cat "${PKGFILE}")
" aptcache show apt oldstuff
msgmsg "Testcase: apply with one patch: $*"
- cp ${PKGFILE}-new aptarchive/Packages
+ cp "${PKGFILE}-new" aptarchive/Packages
compressfile 'aptarchive/Packages'
mkdir -p aptarchive/Packages.diff
PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)"
- diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true
- cat $PATCHFILE | gzip > ${PATCHFILE}.gz
+ diff -e "${PKGFILE}" "${PKGFILE}-new" > "${PATCHFILE}" || true
+ cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz"
PATCHINDEX='aptarchive/Packages.diff/Index'
- echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
+ echo "SHA1-Current: $(sha1sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new")
SHA1-History:
9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28
- $(sha1sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
+ $(sha1sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE")
SHA1-Patches:
7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-2013.28
- $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)
-SHA256-Current: $(sha256sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
+ $(sha1sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE")
+SHA256-Current: $(sha256sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new")
SHA256-History:
01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 33053002 2010-08-18-2013.28
- $(sha256sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
+ $(sha256sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE")
SHA256-Patches:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28
- $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX
+ $(sha256sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE")" > "$PATCHINDEX"
if $DOWNLOADHASH; then
echo "SHA1-Download:
2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz
- $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)
+ $(sha1sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz")
SHA256-Download:
d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz
- $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)" >> $PATCHINDEX
+ $(sha256sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz")" >> "$PATCHINDEX"
fi
generatereleasefiles '+1hour'
@@ -93,11 +93,11 @@ SHA256-Download:
find aptarchive -name 'Packages*' -type f -delete
wasmergeused "$@"
testnopackage oldstuff
- testsuccessequal "$(cat ${PKGFILE}-new)
+ testsuccessequal "$(cat "${PKGFILE}-new")
" aptcache show apt newstuff
msgmsg "Testcase: apply with two patches: $*"
- cp ${PKGFILE}-new aptarchive/Packages
+ cp "${PKGFILE}-new" aptarchive/Packages
echo '
Package: futurestuff
Version: 1.0
@@ -115,35 +115,35 @@ Description-md5: d5f89fbbc2ce34c455dfee9b67d82b6b' >> aptarchive/Packages
compressfile 'aptarchive/Packages'
PATCHFILE2="aptarchive/Packages.diff/$(date -d 'now + 1hour' '+%Y-%m-%d-%H%M.%S')"
- diff -e ${PKGFILE}-new aptarchive/Packages > ${PATCHFILE2} || true
- cat $PATCHFILE2 | gzip > ${PATCHFILE2}.gz
+ diff -e "${PKGFILE}-new" aptarchive/Packages > "${PATCHFILE2}" || true
+ cat "$PATCHFILE2" | gzip > "${PATCHFILE2}.gz"
echo "SHA1-Current: $(sha1sum aptarchive/Packages | cut -d' ' -f 1) $(stat -c%s aptarchive/Packages)
SHA1-History:
9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28
- $(sha1sum ${PKGFILE} | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}) $(basename ${PATCHFILE})
- $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new) $(basename ${PATCHFILE2})
+ $(sha1sum "${PKGFILE}" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}") $(basename "${PATCHFILE}")
+ $(sha1sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") $(basename "${PATCHFILE2}")
SHA1-Patches:
7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-2013.28
- $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)
- $(sha1sum ${PATCHFILE2} | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}) $(basename ${PATCHFILE2})
+ $(sha1sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE")
+ $(sha1sum "${PATCHFILE2}" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE2}") $(basename "${PATCHFILE2}")
SHA256-Current: $(sha256sum aptarchive/Packages | cut -d' ' -f 1) $(stat -c%s aptarchive/Packages)
SHA256-History:
01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 33053002 2010-08-18-2013.28
- $(sha256sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
- $(sha256sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new) $(basename ${PATCHFILE2})
+ $(sha256sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE")
+ $(sha256sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new") $(basename "${PATCHFILE2}")
SHA256-Patches:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28
- $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)
- $(sha256sum ${PATCHFILE2} | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}) $(basename ${PATCHFILE2})" > $PATCHINDEX
+ $(sha256sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE")
+ $(sha256sum "${PATCHFILE2}" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE2}") $(basename "${PATCHFILE2}")" > "$PATCHINDEX"
if $DOWNLOADHASH; then
echo "SHA1-Download:
2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz
- $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)
- $(sha1sum ${PATCHFILE2}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}.gz) $(basename ${PATCHFILE2}.gz)
+ $(sha1sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz")
+ $(sha1sum "${PATCHFILE2}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE2}.gz") $(basename "${PATCHFILE2}.gz")
SHA256-Download:
d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz
- $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)
- $(sha256sum ${PATCHFILE2}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE2}.gz) $(basename ${PATCHFILE2}.gz)" >> $PATCHINDEX
+ $(sha256sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz")
+ $(sha256sum "${PATCHFILE2}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE2}.gz") $(basename "${PATCHFILE2}.gz")" >> "$PATCHINDEX"
fi
generatereleasefiles '+2hour'
@@ -160,78 +160,78 @@ SHA256-Download:
msgmsg "Testcase: patch applying fails, but successful fallback: $*"
rm -rf rootdir/var/lib/apt/lists
cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists
- cp ${PKGFILE}-new aptarchive/Packages
+ cp "${PKGFILE}-new" aptarchive/Packages
compressfile 'aptarchive/Packages'
mkdir -p aptarchive/Packages.diff
PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)"
- diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true
- cat $PATCHFILE | gzip > ${PATCHFILE}.gz
+ diff -e "${PKGFILE}" "${PKGFILE}-new" > "${PATCHFILE}" || true
+ cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz"
PATCHINDEX='aptarchive/Packages.diff/Index'
- echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
+ echo "SHA1-Current: $(sha1sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new")
SHA1-History:
9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28
- $(sha1sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
+ $(sha1sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE")
SHA1-Patches:
7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-2013.28
- $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)
-SHA256-Current: $(sha256sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
+ $(sha1sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE")
+SHA256-Current: $(sha256sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new")
SHA256-History:
01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 33053002 2010-08-18-2013.28
- $(sha256sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
+ $(sha256sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE")
SHA256-Patches:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28
- $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE) $(basename $PATCHFILE)" > $PATCHINDEX
+ $(sha256sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE") $(basename "$PATCHFILE")" > $PATCHINDEX
if $DOWNLOADHASH; then
echo "SHA1-Download:
2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz
- $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)
+ $(sha1sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz")
SHA256-Download:
d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz
- $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz) $(basename ${PATCHFILE}.gz)" >> $PATCHINDEX
+ $(sha256sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz") $(basename "${PATCHFILE}.gz")" >> $PATCHINDEX
fi
# needs to look like a valid command, otherwise the parser will fail before hashes are checked
- echo '1d' > $PATCHFILE
- cat $PATCHFILE | gzip > ${PATCHFILE}.gz
+ echo '1d' > "$PATCHFILE"
+ cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz"
generatereleasefiles '+1hour'
signreleasefiles
testsuccess aptget update "$@"
cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output
testsuccess grep 'Hash Sum mismatch' rootdir/tmp/aptgetupdate.output
testnopackage oldstuff
- testsuccessequal "$(cat ${PKGFILE}-new)
+ testsuccessequal "$(cat "${PKGFILE}-new")
" aptcache show apt newstuff
msgmsg "Testcase: pdiff patch bigger than index itself: $*"
rm -rf rootdir/var/lib/apt/lists
cp -a rootdir/var/lib/apt/lists-bak rootdir/var/lib/apt/lists
- cp ${PKGFILE}-new aptarchive/Packages
+ cp "${PKGFILE}-new" aptarchive/Packages
compressfile 'aptarchive/Packages'
mkdir -p aptarchive/Packages.diff
PATCHFILE="aptarchive/Packages.diff/$(date +%Y-%m-%d-%H%M.%S)"
- diff -e ${PKGFILE} ${PKGFILE}-new > ${PATCHFILE} || true
- cat $PATCHFILE | gzip > ${PATCHFILE}.gz
+ diff -e "${PKGFILE}" "${PKGFILE}-new" > "${PATCHFILE}" || true
+ cat "$PATCHFILE" | gzip > "${PATCHFILE}.gz"
PATCHINDEX='aptarchive/Packages.diff/Index'
- echo "SHA1-Current: $(sha1sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
+ echo "SHA1-Current: $(sha1sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new")
SHA1-History:
9f4148e06d7faa37062994ff10d0c842d7017513 33053002 2010-08-18-2013.28
- $(sha1sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
+ $(sha1sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE")
SHA1-Patches:
7651fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-2013.28
- $(sha1sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE)000 $(basename $PATCHFILE)
-SHA256-Current: $(sha256sum ${PKGFILE}-new | cut -d' ' -f 1) $(stat -c%s ${PKGFILE}-new)
+ $(sha1sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE")000 $(basename "$PATCHFILE")
+SHA256-Current: $(sha256sum "${PKGFILE}-new" | cut -d' ' -f 1) $(stat -c%s "${PKGFILE}-new")
SHA256-History:
01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b 33053002 2010-08-18-2013.28
- $(sha256sum $PKGFILE | cut -d' ' -f 1) $(stat -c%s $PKGFILE) $(basename $PATCHFILE)
+ $(sha256sum "$PKGFILE" | cut -d' ' -f 1) $(stat -c%s "$PKGFILE") $(basename "$PATCHFILE")
SHA256-Patches:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 19722 2010-08-18-2013.28
- $(sha256sum $PATCHFILE | cut -d' ' -f 1) $(stat -c%s $PATCHFILE)000 $(basename $PATCHFILE)" > $PATCHINDEX
+ $(sha256sum "$PATCHFILE" | cut -d' ' -f 1) $(stat -c%s "$PATCHFILE")000 $(basename "$PATCHFILE")" > "$PATCHINDEX"
if $DOWNLOADHASH; then
echo "SHA1-Download:
2365ac0ac57cde3d43c63145e8251a3bd5410213 197 2010-08-18-2013.28.gz
- $(sha1sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz)000 $(basename ${PATCHFILE}.gz)
+ $(sha1sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz")000 $(basename "${PATCHFILE}.gz")
SHA256-Download:
d2a1b33187ed2d248eeae3b1223ea71791ea35f2138a713ed371332a6421f467 197 2010-08-18-2013.28.gz
- $(sha256sum ${PATCHFILE}.gz | cut -d' ' -f 1) $(stat -c%s ${PATCHFILE}.gz)000 $(basename ${PATCHFILE}.gz)" >> $PATCHINDEX
+ $(sha256sum "${PATCHFILE}.gz" | cut -d' ' -f 1) $(stat -c%s "${PATCHFILE}.gz")000 $(basename "${PATCHFILE}.gz")" >> "$PATCHINDEX"
fi
generatereleasefiles '+1hour'
signreleasefiles
@@ -240,7 +240,7 @@ SHA256-Download:
cp -f rootdir/tmp/testsuccess.output rootdir/tmp/aptgetupdate.output
testsuccess grep 'bytes (Limit is' rootdir/tmp/aptgetupdate.output
testnopackage oldstuff
- testsuccessequal "$(cat ${PKGFILE}-new)
+ testsuccessequal "$(cat "${PKGFILE}-new")
" aptcache show apt newstuff
}
echo 'Debug::pkgAcquire::Diffs "true";
diff --git a/test/integration/test-pin-non-existent-package b/test/integration/test-pin-non-existent-package
index bcbe103d7..06103fd38 100755
--- a/test/integration/test-pin-non-existent-package
+++ b/test/integration/test-pin-non-existent-package
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning
index 3d09cb7ce..635dcb874 100755
--- a/test/integration/test-policy-pinning
+++ b/test/integration/test-policy-pinning
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-prefer-higher-priority-providers b/test/integration/test-prefer-higher-priority-providers
index e6da2e151..7c3f32374 100755
--- a/test/integration/test-prefer-higher-priority-providers
+++ b/test/integration/test-prefer-higher-priority-providers
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-prefer-native-architecture-over-higher-priority b/test/integration/test-prefer-native-architecture-over-higher-priority
index e7f8c28e7..d21836b85 100755
--- a/test/integration/test-prefer-native-architecture-over-higher-priority
+++ b/test/integration/test-prefer-native-architecture-over-higher-priority
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'arm64'
diff --git a/test/integration/test-prevent-markinstall-multiarch-same-versionscrew b/test/integration/test-prevent-markinstall-multiarch-same-versionscrew
index 11c120c53..a362c881a 100755
--- a/test/integration/test-prevent-markinstall-multiarch-same-versionscrew
+++ b/test/integration/test-prevent-markinstall-multiarch-same-versionscrew
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386' 'armel'
diff --git a/test/integration/test-provides-gone-with-upgrade b/test/integration/test-provides-gone-with-upgrade
index 61d34fa57..5249ea0c9 100755
--- a/test/integration/test-provides-gone-with-upgrade
+++ b/test/integration/test-provides-gone-with-upgrade
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching
index 15b9344ef..1d1b4a774 100755
--- a/test/integration/test-release-candidate-switching
+++ b/test/integration/test-release-candidate-switching
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-releasefile-date-older b/test/integration/test-releasefile-date-older
index 5cdc34fac..b6530be08 100755
--- a/test/integration/test-releasefile-date-older
+++ b/test/integration/test-releasefile-date-older
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-releasefile-valid-until b/test/integration/test-releasefile-valid-until
index 43574ec3e..f64c6329d 100755
--- a/test/integration/test-releasefile-valid-until
+++ b/test/integration/test-releasefile-valid-until
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-releasefile-verification b/test/integration/test-releasefile-verification
index ba1df1a01..41661f88d 100755
--- a/test/integration/test-releasefile-verification
+++ b/test/integration/test-releasefile-verification
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-resolve-by-keep-new-recommends b/test/integration/test-resolve-by-keep-new-recommends
index a8ab9057c..3591ed84d 100755
--- a/test/integration/test-resolve-by-keep-new-recommends
+++ b/test/integration/test-resolve-by-keep-new-recommends
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-security-no-remote-status b/test/integration/test-security-no-remote-status
index 2badb30a4..7db979e09 100755
--- a/test/integration/test-security-no-remote-status
+++ b/test/integration/test-security-no-remote-status
@@ -4,8 +4,8 @@
#
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-sourceslist-arch-plusminus-options b/test/integration/test-sourceslist-arch-plusminus-options
index d487cce60..dbefff87b 100755
--- a/test/integration/test-sourceslist-arch-plusminus-options
+++ b/test/integration/test-sourceslist-arch-plusminus-options
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-sourceslist-lang-plusminus-options b/test/integration/test-sourceslist-lang-plusminus-options
index d1ab4e666..3f4ea953a 100755
--- a/test/integration/test-sourceslist-lang-plusminus-options
+++ b/test/integration/test-sourceslist-lang-plusminus-options
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-sourceslist-target-plusminus-options b/test/integration/test-sourceslist-target-plusminus-options
index 6f8d05560..8197f068d 100755
--- a/test/integration/test-sourceslist-target-plusminus-options
+++ b/test/integration/test-sourceslist-target-plusminus-options
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options
index 26de76807..94de11ef7 100755
--- a/test/integration/test-sourceslist-trusted-options
+++ b/test/integration/test-sourceslist-trusted-options
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-specific-architecture-dependencies b/test/integration/test-specific-architecture-dependencies
index b5fcdd6ac..746ecb351 100755
--- a/test/integration/test-specific-architecture-dependencies
+++ b/test/integration/test-specific-architecture-dependencies
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-suggest-installed-multiarch-silbing b/test/integration/test-suggest-installed-multiarch-silbing
index f2b1db5eb..49182178e 100755
--- a/test/integration/test-suggest-installed-multiarch-silbing
+++ b/test/integration/test-suggest-installed-multiarch-silbing
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386' 'armel'
diff --git a/test/integration/test-ubuntu-bug-1078697-missing-source-hashes b/test/integration/test-ubuntu-bug-1078697-missing-source-hashes
index badc097b3..0b9103f53 100755
--- a/test/integration/test-ubuntu-bug-1078697-missing-source-hashes
+++ b/test/integration/test-ubuntu-bug-1078697-missing-source-hashes
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
confighashes 'MD5' 'SHA1' 'SHA256' 'SHA512'
diff --git a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum
index f32d74ad7..f030a03dc 100755
--- a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum
+++ b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
index 2fc67096e..4ac5e9060 100755
--- a/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
+++ b/test/integration/test-ubuntu-bug-1130419-prefer-installed-ma-same-siblings
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard b/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard
index b4f705d8b..82e1d61e8 100755
--- a/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard
+++ b/test/integration/test-ubuntu-bug-1304403-obsolete-priority-standard
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall b/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
index 983889f92..bb595f785 100755
--- a/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
+++ b/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'native'
diff --git a/test/integration/test-ubuntu-bug-365611-long-package-names b/test/integration/test-ubuntu-bug-365611-long-package-names
index f22986e21..53e3ea831 100755
--- a/test/integration/test-ubuntu-bug-365611-long-package-names
+++ b/test/integration/test-ubuntu-bug-365611-long-package-names
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
setupaptarchive
diff --git a/test/integration/test-ubuntu-bug-614993 b/test/integration/test-ubuntu-bug-614993
index 6e0a53025..e7357bc67 100755
--- a/test/integration/test-ubuntu-bug-614993
+++ b/test/integration/test-ubuntu-bug-614993
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "amd64"
setupaptarchive
diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge
index d5dfa2acf..00f289b53 100755
--- a/test/integration/test-ubuntu-bug-761175-remove-purge
+++ b/test/integration/test-ubuntu-bug-761175-remove-purge
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only b/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
index dbcb49a41..782798e1b 100755
--- a/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
+++ b/test/integration/test-ubuntu-bug-784473-InRelease-one-message-only
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'i386'
diff --git a/test/integration/test-ubuntu-bug-802901-multiarch-early-remove b/test/integration/test-ubuntu-bug-802901-multiarch-early-remove
index f56ff020c..d9587d9cd 100755
--- a/test/integration/test-ubuntu-bug-802901-multiarch-early-remove
+++ b/test/integration/test-ubuntu-bug-802901-multiarch-early-remove
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-ubuntu-bug-806274-install-suggests b/test/integration/test-ubuntu-bug-806274-install-suggests
index 2d1cfcd9f..b73a6f754 100755
--- a/test/integration/test-ubuntu-bug-806274-install-suggests
+++ b/test/integration/test-ubuntu-bug-806274-install-suggests
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first
index 9eab1cbfd..5a3e2762e 100755
--- a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first
+++ b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-ubuntu-bug-859188-multiarch-reinstall b/test/integration/test-ubuntu-bug-859188-multiarch-reinstall
index 9bb99305e..5fdb98d1e 100755
--- a/test/integration/test-ubuntu-bug-859188-multiarch-reinstall
+++ b/test/integration/test-ubuntu-bug-859188-multiarch-reinstall
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386' 'armel'
diff --git a/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering b/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering
index e9cbf958e..bd5be9eb0 100755
--- a/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering
+++ b/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-unpack-different-version-unpacked b/test/integration/test-unpack-different-version-unpacked
index cdc187d15..bcb483639 100755
--- a/test/integration/test-unpack-different-version-unpacked
+++ b/test/integration/test-unpack-different-version-unpacked
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386'
diff --git a/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages b/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages
index 409d1212c..7fcf16ed5 100755
--- a/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages
+++ b/test/integration/test-very-tight-loop-configure-with-unpacking-new-packages
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
diff --git a/test/integration/test-xorg-break-providers b/test/integration/test-xorg-break-providers
index 57fd0e234..59b564a02 100755
--- a/test/integration/test-xorg-break-providers
+++ b/test/integration/test-xorg-break-providers
@@ -1,8 +1,8 @@
#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture "i386"
setupaptarchive