summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-12-29 11:20:18 +0100
committerJulian Andres Klode <jak@debian.org>2017-02-22 16:53:45 +0100
commit24217e734c2ce603e0ff8bfa083535905955eff1 (patch)
treee528c71494cc6c912a029f48022bb13dc690f120 /test/integration
parentab951bc3184d62d9bf9a94187468329e53ac0d0a (diff)
ensure generation of valid EDSP error stanzas
The crude way of preparing a message to be a multiline value failed at generation valid deb822 in case the error message ended with a new line like the resolving errors from apt do. apt itself can parse these, but other tools like grep-dctrl choke on it, so be nice and print valid. Reported-By: Johannes 'josch' Schauer on IRC (cherry picked from commit 0161280405fe5aa256dc9df6a56106dd3a1a6f38)
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-external-dependency-solver-protocol11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/integration/test-external-dependency-solver-protocol b/test/integration/test-external-dependency-solver-protocol
index d126cd84b..2c451d5f9 100755
--- a/test/integration/test-external-dependency-solver-protocol
+++ b/test/integration/test-external-dependency-solver-protocol
@@ -148,7 +148,16 @@ testsuccess aptget upgrade -s --solver apt
testfailure aptget install awesome badstuff -s
testfailure aptget install awesome badstuff -s --solver apt
testsuccess grep 'ERR_UNSOLVABLE' rootdir/tmp/testfailure.output
-
+msgtest 'A resolving error is format as' 'valid parseable EDSP error'
+if dpkg-checkbuilddeps -d 'dctrl-tools' /dev/null >/dev/null 2>&1; then
+ if apthelper cat-file rootdir/var/log/apt/edsp.last.xz | aptinternalsolver > solver.result 2>&1; then
+ testsuccess --nomsg grep-dctrl -FError ERR -- solver.result
+ else
+ msgfail
+ fi
+else
+ msgskip 'dctrl-tools not installed'
+fi
configarchitecture 'armel'
testfailure aptget install --solver apt awesomecoolstuff:i386 -s
msgtest 'An invalid EDSP file generates a' 'hard error'