[poppler] 2 commits - regtest/backends

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Mon Sep 19 09:46:30 PDT 2011


 regtest/backends/__init__.py |    6 +++---
 regtest/backends/cairo.py    |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit ce7372db64ee807dc2b491e121fbe557dbf697e8
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Mon Sep 19 22:04:27 2011 +0930

    regtest: render cairo at 72ppi
    
    For consistency with splash. It is faster and easier to compare with splash results.

diff --git a/regtest/backends/cairo.py b/regtest/backends/cairo.py
index 0ec361f..a990ddf 100644
--- a/regtest/backends/cairo.py
+++ b/regtest/backends/cairo.py
@@ -28,8 +28,8 @@ class Cairo(Backend):
 
     def create_refs(self, doc_path, refs_path):
         out_path = os.path.join(refs_path, 'cairo')
-        p1 = subprocess.Popen([self._pdftocairo, '-cropbox', '-e', '-png', doc_path, out_path], stderr = subprocess.PIPE)
-        p2 = subprocess.Popen([self._pdftocairo, '-cropbox', '-o', '-png', doc_path, out_path], stderr = subprocess.PIPE)
+        p1 = subprocess.Popen([self._pdftocairo, '-cropbox', '-r', '72', '-e', '-png', doc_path, out_path], stderr = subprocess.PIPE)
+        p2 = subprocess.Popen([self._pdftocairo, '-cropbox', '-r', '72', '-o', '-png', doc_path, out_path], stderr = subprocess.PIPE)
         return self._check_exit_status2(p1, p2, out_path)
 
     def _create_diff(self, ref_path, result_path):
commit 6cf7330089c4dcc1099906d9c37c3607a2a1eeba
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Mon Sep 19 18:42:35 2011 +0200

    regtest: Ignore checksums of crashed, failed and stderr files
    
    They shouldn't have a checksum, but it might happen with md5 files
    generated with previous versions.

diff --git a/regtest/backends/__init__.py b/regtest/backends/__init__.py
index f54be80..2e90759 100644
--- a/regtest/backends/__init__.py
+++ b/regtest/backends/__init__.py
@@ -71,14 +71,14 @@ class Backend:
         for line in md5_file.readlines():
             md5sum, ref_path = line.strip('\n').split(' ', 1)
             basename = os.path.basename(ref_path)
+            if not self.__should_have_checksum(basename):
+                continue
+
             if not basename in tests:
                 retval = False
                 print("%s found in md5 ref file but missing in output dir %s" % (basename, out_path))
                 continue
 
-            if not self.__should_have_checksum(basename):
-                continue
-
             result_path = os.path.join(out_path, basename)
             f = open(result_path, 'rb')
             matched = md5sum == md5(f.read()).hexdigest()


More information about the poppler mailing list