summaryrefslogtreecommitdiff
path: root/test/integration/test-acquire-same-repository-multiple-times
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-14 02:26:13 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-09-14 15:22:19 +0200
commit63c7141275c8c5c0f6e60f5242785e50cabaf2a0 (patch)
tree966f2998236fca9799395f3f3d05cf82b1ac5a98 /test/integration/test-acquire-same-repository-multiple-times
parentfecfbf2e4cbb71d20364306baf6aa7886c5f3ecd (diff)
tests: try to support spaces in TMPDIR
Not all tests work yet, most notable the cdrom tests, but those require changes in libapt itself to have a proper fix and what we have fixed so far is good enough progress for now. Git-Dch: Ignore
Diffstat (limited to 'test/integration/test-acquire-same-repository-multiple-times')
-rwxr-xr-xtest/integration/test-acquire-same-repository-multiple-times13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/integration/test-acquire-same-repository-multiple-times b/test/integration/test-acquire-same-repository-multiple-times
index abdfef8f0..19a18cb63 100755
--- a/test/integration/test-acquire-same-repository-multiple-times
+++ b/test/integration/test-acquire-same-repository-multiple-times
@@ -21,11 +21,14 @@ done
# install a slowed down file: otherwise its to fast to reproduce combining
NEWMETHODS="$(readlink -f rootdir)/usr/lib/apt/methods"
OLDMETHODS="$(readlink -f rootdir/usr/lib/apt/methods)"
-rm $NEWMETHODS
-mkdir $NEWMETHODS
-for METH in $(find $OLDMETHODS ! -type d); do
- ln -s $OLDMETHODS/$(basename $METH) $NEWMETHODS
+rm "$NEWMETHODS"
+mkdir "$NEWMETHODS"
+backupIFS="$IFS"
+IFS="$(printf "\n\b")"
+for METH in $(find "$OLDMETHODS" ! -type d); do
+ ln -s "$OLDMETHODS/$(basename "$METH")" "$NEWMETHODS"
done
+IFS="$backupIFS"
rm "${NEWMETHODS}/file" "${NEWMETHODS}/http"
cat >"${NEWMETHODS}/file" <<EOF
#!/bin/sh
@@ -45,7 +48,7 @@ tworepos() {
cp rootdir/tmp/testsuccess.output download.log
#cat download.log
aptget indextargets --format '$(FILENAME)' --no-release-info | sort > file.lst
- testequal "$(find $(readlink -f ./rootdir/var/lib/apt/lists) -name '*_dists_*' \( ! -name '*InRelease' \) -type f | sort)" cat file.lst
+ testequal "$(find "$(readlink -f ./rootdir/var/lib/apt/lists)" -name '*_dists_*' \( ! -name '*InRelease' \) -type f | sort)" cat file.lst
testsuccess aptcache policy
testequal "foo:
Installed: (none)