Bug#703250: apt: failing tests in test/libapt does not cause FTBFS
On Sun, Mar 17, 2013 at 05:42:34PM +0100, Niels Thykier wrote:
> Package: apt
> Version: 0.9.7.8
> Severity: normal
> Tags: patch
Thanks for your bugreport and your patch!
> Currently, the APT build process will continue even if one of the
> tests in test/libapt fails. On IRC (#d-apt) we concluded this was not
> the desired behaviour. I am attaching a (prototype) patch for fixing
> this issue.
This patch looks good! I commited it to bzr. Unfortunately its not
sufficient as current a msgfail() in framework will not cause a != 0
exit status. So to properly fix this some more work is needed.
The attached (additional) patch should make it work now.
Cheers,
Michael
=== modified file 'test/integration/framework'
--- test/integration/framework 2012-09-09 14:03:52 +0000
+++ test/integration/framework 2013-03-17 20:00:01 +0000
@@ -36,7 +36,7 @@
}
msgpass() { echo "${CPASS}PASS${CNORMAL}" >&2; }
msgskip() { echo "${CWARNING}SKIP${CNORMAL}" >&2; }
-msgfail() { echo "${CFAIL}FAIL${CNORMAL}" >&2; }
+msgfail() { echo "${CFAIL}FAIL${CNORMAL}" >&2; exit 1; }
# enable / disable Debugging
MSGLEVEL=${MSGLEVEL:-3}
@@ -115,7 +115,7 @@
addtrap() {
CURRENTTRAP="$CURRENTTRAP $1"
- trap "$CURRENTTRAP exit;" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
+ trap "$CURRENTTRAP " 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
}
setupenvironment() {
Reply to: