From 8fe9eb7b9292a7f79a722a22fbb1b1b459a4b091 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Fri, 8 Mar 2019 14:06:33 -0800 Subject: [PATCH] Show invalid coverage paths with verbosity > 1. --- test/runner/lib/cover.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/runner/lib/cover.py b/test/runner/lib/cover.py index 35e8bccd94..9e887dac54 100644 --- a/test/runner/lib/cover.py +++ b/test/runner/lib/cover.py @@ -139,6 +139,8 @@ def command_coverage_combine(args): arc_data[filename].update(arcs) output_files = [] + invalid_path_count = 0 + invalid_path_chars = 0 for group in sorted(groups): arc_data = groups[group] @@ -147,7 +149,12 @@ def command_coverage_combine(args): for filename in arc_data: if not os.path.isfile(filename): - display.warning('Invalid coverage path: %s' % filename) + invalid_path_count += 1 + invalid_path_chars += len(filename) + + if args.verbosity > 1: + display.warning('Invalid coverage path: %s' % filename) + continue updated.add_arcs({filename: list(arc_data[filename])}) @@ -160,6 +167,9 @@ def command_coverage_combine(args): updated.write_file(output_file) output_files.append(output_file) + if invalid_path_count > 0: + display.warning('Ignored %d characters from %d invalid coverage path(s).' % (invalid_path_chars, invalid_path_count)) + return sorted(output_files)