Browse Source

gunittest: skip reports which does not contain key-value summary file (issue warning but not fail)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@61493 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 10 years ago
parent
commit
99ce86eb18
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lib/python/gunittest/multireport.py

+ 6 - 0
lib/python/gunittest/multireport.py

@@ -206,6 +206,12 @@ def main():
     for report in reports:
         try:
             summary_file = os.path.join(report, 'test_keyvalue_result.txt')
+            if not os.path.exists(summary_file):
+                sys.stderr.write('WARNING: Key-value summary not available in'
+                                 ' report <%s>, skipping.\n')
+                # skipping incomplete reports
+                # use only results list for further processing
+                continue
             summary = text_to_keyvalue(open(summary_file).read(), sep='=')
             if use_timestamps:
                 test_timestamp = datetime.datetime.fromtimestamp(os.path.getmtime(summary_file))