make test failures fatal

Elias Pipping <[email protected]> Sat, 21 Jan 2012 12:22:22 +0100
Newsgroups gmane.comp.printing.ghostscript.jbig2dec.devel
Message-ID <[email protected]>
--=-=-=
Content-Type: text/plain

Hello,

even if a test fails, test_jbig2dec.py currently returns zero,
signalling success.

I'm attaching a patch that changes that.


Best regards,

Elias Pipping


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=jbig2dec-test-script.patch
Content-Description: patch

Source: Elias Pipping <[email protected]>
Upstream: no
Reason: Make script return non-zero iff a test failed
--- jbig2dec/test_jbig2dec.py
+++ jbig2dec/test_jbig2dec.py
@@ -52,6 +52,7 @@
 	(len(self.fails),len(self.tests)))
     else:
       self.stream.write('PASSED all %d tests\n' % len(self.tests))
+    return len(self.fails) == 0
 
 class KnownFileHash(SelfTest):
   'self test to check for correct decode of known test files'

--=-=-=
Content-Type: text/plain


PS: I wrote to this mailing list three weeks ago already. I had not
subscribed, so that an automated reply told me my message was awaiting
moderator approval. That never happened.

The reply also gave me a link to cancel my request for a non-member
posting. That link appears to have expired after three days, so that I
can no longer even cancel that posting.

I'm not saying that non-member postings should be possible -- I imagine
they bring a massive spam problem with them; If the automated reply had
told me to subscribe since that's the only way to mail the list, I would
have. But instead of doing that, it just threw lies at me.

--=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
jbig2-dev mailing list
[email protected]
http://ghostscript.com/cgi-bin/mailman/listinfo/jbig2-dev

--=-=-=--