]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-dpkg-assert-multi-arch
run update post-invokes even on (partial) failures
[apt.git] / test / integration / test-dpkg-assert-multi-arch
index b3fbbf0eb7bfb291bfba981f54ccd6166b3432b6..14b29ec87d5ff99f6f93be9c2332a4f3f22a4e1e 100755 (executable)
@@ -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'
 
@@ -16,12 +16,15 @@ setupaptarchive
 
 testqualifier() {
        msgtest 'Test with' $1 'for correct qualifier mode' $2
-       GIVEN="$(aptget install $1 -qq -o Debug::pkgDPkgPM=1 2>&1 | grep -v -- '--unpack' | sed -e 's/^.*--[^u][^ ]* \([^ ]*\).*$/\1/')"
+       #aptget install $1 -qq -o Debug::pkgDPkgPM=1 || true
+       aptget install $1 -qq -o Debug::pkgDPkgPM=1 -o Dpkg::ExplicitLastConfigure=1 > testqualifier.output 2>&1 || true
+       GIVEN="$(grep -v -- '--unpack' testqualifier.output | sed -e 's/^.*--[^u][^ ]* \([^ ]*\).*$/\1/')"
        if [ "$GIVEN" = "$2" ]; then
                msgpass
        else
-               echo
-               echo "$GIVEN"
+               cat >&2 testqualifier.output
+               echo >&2
+               echo >&2 "$GIVEN"
                msgfail
        fi
 }