[GRASS-SVN] r61493 - grass/trunk/lib/python/gunittest

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 31 17:52:44 PDT 2014


Author: wenzeslaus
Date: 2014-07-31 17:52:44 -0700 (Thu, 31 Jul 2014)
New Revision: 61493

Modified:
   grass/trunk/lib/python/gunittest/multireport.py
Log:
gunittest: skip reports which does not contain key-value summary file (issue warning but not fail)

Modified: grass/trunk/lib/python/gunittest/multireport.py
===================================================================
--- grass/trunk/lib/python/gunittest/multireport.py	2014-07-31 20:48:38 UTC (rev 61492)
+++ grass/trunk/lib/python/gunittest/multireport.py	2014-08-01 00:52:44 UTC (rev 61493)
@@ -206,6 +206,12 @@
     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))



More information about the grass-commit mailing list