summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-progress-fd-conffile
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-apt-progress-fd-conffile
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-apt-progress-fd-conffile')
-rwxr-xr-xtest/integration/test-apt-progress-fd-conffile32
1 files changed, 13 insertions, 19 deletions
diff --git a/test/integration/test-apt-progress-fd-conffile b/test/integration/test-apt-progress-fd-conffile
index 085d5e871..ec3ded85d 100755
--- a/test/integration/test-apt-progress-fd-conffile
+++ b/test/integration/test-apt-progress-fd-conffile
@@ -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'
@@ -10,18 +10,18 @@ configarchitecture 'native'
# old conffile
setupsimplenativepackage 'compiz-core' 'native' '1.0' 'unstable'
BUILDDIR='incoming/compiz-core-1.0'
-mkdir -p ${BUILDDIR}/debian/compiz-core/etc
-echo 'foo=bar;' > ${BUILDDIR}/compiz.conf
-echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
+mkdir -p "${BUILDDIR}/debian/compiz-core/etc"
+echo 'foo=bar;' > "${BUILDDIR}/compiz.conf"
+echo 'compiz.conf /etc/compiz.conf' >> "${BUILDDIR}/debian/install"
buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
rm -rf "$BUILDDIR"
# new conffile
setupsimplenativepackage 'compiz-core' 'native' '2.0' 'unstable'
BUILDDIR='incoming/compiz-core-2.0'
-mkdir -p ${BUILDDIR}/debian/compiz-core/etc
-echo 'foo2=bar2;' > ${BUILDDIR}/compiz.conf
-echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
+mkdir -p "${BUILDDIR}/debian/compiz-core/etc"
+echo 'foo2=bar2;' > "${BUILDDIR}/compiz.conf"
+echo 'compiz.conf /etc/compiz.conf' >> "${BUILDDIR}/debian/install"
buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
rm -rf "$BUILDDIR"
@@ -30,21 +30,15 @@ setupaptarchive
testsuccess aptget install compiz-core=1.0
# fake conffile change
-echo "meep" >> rootdir/etc/compiz.conf/compiz.conf
+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;"
+OUTPUT="$(mktemp)"
+addtrap "rm \"$OUTPUT\";"
exec 3> apt-progress.log
-if aptget install compiz-core=2.0 -o APT::Status-Fd=3 -o Dpkg::Use-Pty=false -o dpkg::options::='--force-confold' >${OUTPUT} 2>&1; then
- msgpass
-else
- echo
- cat $OUTPUT
- msgfail
-fi
+testsuccess --nomsg aptget install compiz-core=2.0 -o APT::Status-Fd=3 -o Dpkg::Use-Pty=false -o dpkg::options::='--force-confold'
# and ensure there is a conffile message in the file
msgtest 'Test status fd for an included' 'pmconffile msg'
-grep -q "pmconffile:/etc/compiz.conf/compiz.conf" apt-progress.log && msgpass || (cat apt-progress.log && msgfail)
+testsuccess --nomsg grep "pmconffile:/etc/compiz.conf/compiz.conf" apt-progress.log