mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-13 20:49:11 -07:00
Show invalid coverage paths with verbosity > 1.
This commit is contained in:
parent
54293fed3c
commit
8fe9eb7b92
1 changed files with 11 additions and 1 deletions
|
@ -139,6 +139,8 @@ def command_coverage_combine(args):
|
||||||
arc_data[filename].update(arcs)
|
arc_data[filename].update(arcs)
|
||||||
|
|
||||||
output_files = []
|
output_files = []
|
||||||
|
invalid_path_count = 0
|
||||||
|
invalid_path_chars = 0
|
||||||
|
|
||||||
for group in sorted(groups):
|
for group in sorted(groups):
|
||||||
arc_data = groups[group]
|
arc_data = groups[group]
|
||||||
|
@ -147,7 +149,12 @@ def command_coverage_combine(args):
|
||||||
|
|
||||||
for filename in arc_data:
|
for filename in arc_data:
|
||||||
if not os.path.isfile(filename):
|
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
|
continue
|
||||||
|
|
||||||
updated.add_arcs({filename: list(arc_data[filename])})
|
updated.add_arcs({filename: list(arc_data[filename])})
|
||||||
|
@ -160,6 +167,9 @@ def command_coverage_combine(args):
|
||||||
updated.write_file(output_file)
|
updated.write_file(output_file)
|
||||||
output_files.append(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)
|
return sorted(output_files)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue