浏览代码

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 年之前
父节点
当前提交
99ce86eb18
共有 1 个文件被更改,包括 6 次插入0 次删除
  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))