[libgxps] regtest: Skip tests with results when creating refs



commit 2a801cb26952ab6425cda3318057dcf2b2917096
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sun Nov 6 15:33:29 2011 +0100

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

 regtest/Test.py           |    3 +++
 regtest/TestReferences.py |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/regtest/Test.py b/regtest/Test.py
index 51f98d3..71785f5 100644
--- a/regtest/Test.py
+++ b/regtest/Test.py
@@ -129,6 +129,9 @@ class Test:
 
         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, 'stderr'))
 
diff --git a/regtest/TestReferences.py b/regtest/TestReferences.py
index ea8b306..f5f7321 100644
--- a/regtest/TestReferences.py
+++ b/regtest/TestReferences.py
@@ -54,8 +54,8 @@ class TestReferences:
             raise
         doc_path = os.path.join(self._docsdir, filename)
 
-        if not self.config.force and self._test.has_md5(refs_path):
-            print("Checksum file found, skipping '%s' (%d/%d)" % (doc_path, n_doc, total_docs))
+        if not self.config.force and self._test.has_results(refs_path):
+            print("Results found, skipping '%s' (%d/%d)" % (doc_path, n_doc, total_docs))
             return
 
         print("Creating refs for '%s' (%d/%d)" % (doc_path, n_doc, total_docs))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]