shithub: jbig2

Download patch

ref: 1229240608d8efcb31315e1d46382335cd410d8c
parent: 5552c16b8c7ac2ef437656de8c5c3fb5b865776e
author: Sebastian Rasmussen <[email protected]>
date: Tue Mar 20 22:30:12 EDT 2018

Fix 698839: Have the testsuite runner return the result.

Previously the return value was None regardless of test succeeded
or failed. This meant that the test_jbig2dec.py script had an
exit code of 1 not matter the outcome. Now it is 0 upon success
and 1 upon error, as expected by the make check infrastructure.

--- a/test_jbig2dec.py
+++ b/test_jbig2dec.py
@@ -50,8 +50,10 @@
     if len(self.fails):
       self.stream.write('FAILED %d of %d tests\n' % 
 	(len(self.fails),len(self.tests)))
+      return False
     else:
       self.stream.write('PASSED all %d tests\n' % len(self.tests))
+      return True
 
 class KnownFileHash(SelfTest):
   'self test to check for correct decode of known test files'