]> sigrok.org Git - libsigrokdecode.git/commitdiff
pdtest: Generate a report listing missed lines across the whole PD.
authorBert Vermeulen <redacted>
Tue, 24 Jun 2014 13:49:05 +0000 (15:49 +0200)
committerBert Vermeulen <redacted>
Tue, 24 Jun 2014 13:49:05 +0000 (15:49 +0200)
tests/pdtest

index 088ad91cdf2b387ec8d0127da66f83fc9a1ae2a3..9309fb9dfc066c578715cd9ebbf171858dc147c0 100755 (executable)
@@ -417,6 +417,21 @@ def run_tests(tests, fix=False):
             if VERBOSE:
                 dots = '.' * (54 - len(pd) - 2)
             INFO("%s total %s %d%%" % (pd, dots, pd_coverage))
+            if report_dir:
+                # generate a missing lines list across all the files in
+                # the PD
+                files = {}
+                for entry in missed_lines:
+                    filename, line = entry.split(':')
+                    if filename not in files:
+                        files[filename] = []
+                    files[filename].append(line)
+                text = ''
+                for filename in sorted(files.keys()):
+                    line_list = ','.join(sorted(files[filename], key=int))
+                    text += "%s: %s\n" % (filename, line_list)
+                open(os.path.join(report_dir, pd + "_total"), 'w').write(text)
+
 
     return results, errors