[poppler] Branch 'poppler-0.18' - regtest/backends regtest/TestReferences.py

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Sun Nov 6 06:46:21 PST 2011


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

New commits:
commit 145c9ae835bd5b0bdc97739c9b096121e3e7d43e
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Sun Nov 6 15:44:06 2011 +0100

    regtest: Skip tests with results when creating refs
    
    Not only tests that have md5, but also crashed or failed tests.

diff --git a/regtest/TestReferences.py b/regtest/TestReferences.py
index cfd4853..d65d30d 100644
--- a/regtest/TestReferences.py
+++ b/regtest/TestReferences.py
@@ -59,8 +59,8 @@ class TestReferences:
             backends = get_all_backends()
 
         for backend in backends:
-            if not self.config.force and backend.has_md5(refs_path):
-                print("Checksum file found, skipping '%s' for %s backend (%d/%d)" % (doc_path, backend.get_name(), n_doc, total_docs))
+            if not self.config.force and backend.has_results(refs_path):
+                print("Results found, skipping '%s' for %s backend (%d/%d)" % (doc_path, backend.get_name(), n_doc, total_docs))
                 continue
             print("Creating refs for '%s' using %s backend (%d/%d)" % (doc_path, backend.get_name(), n_doc, total_docs))
             if backend.create_refs(doc_path, refs_path):
diff --git a/regtest/backends/__init__.py b/regtest/backends/__init__.py
index 98d5a07..157170d 100644
--- a/regtest/backends/__init__.py
+++ b/regtest/backends/__init__.py
@@ -149,6 +149,9 @@ class Backend:
 
         return status
 
+    def has_results(self, test_path):
+        return self.has_md5(test_path) or self.is_crashed(test_path) or self.is_failed(test_path)
+
     def has_stderr(self, test_path):
         return os.path.exists(os.path.join(test_path, self._name + '.stderr'))
 


More information about the poppler mailing list