summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2020-03-06 15:14:59 -0800
committerMatt Clay <matt@mystile.com>2020-03-10 13:49:35 -0700
commit8fffbecc815576b29bf4f7da1cac7d8eaab9d2a0 (patch)
treef48b5b9c46e69246d6e9c93e58f1235a91e31ca9 /test
parentb54189c45b7736a34449b8d28825bc52fde7d7ef (diff)
downloadansible-8fffbecc815576b29bf4f7da1cac7d8eaab9d2a0.tar.gz
Fix ansible-test handling of no Python coverage.
Diffstat (limited to 'test')
-rw-r--r--test/lib/ansible_test/_internal/coverage/combine.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/lib/ansible_test/_internal/coverage/combine.py b/test/lib/ansible_test/_internal/coverage/combine.py
index bb2474b1a0..28986b2354 100644
--- a/test/lib/ansible_test/_internal/coverage/combine.py
+++ b/test/lib/ansible_test/_internal/coverage/combine.py
@@ -110,8 +110,11 @@ def _command_coverage_combine_python(args):
if not args.explain:
output_file = coverage_file + group
- updated.write_file(output_file)
- output_files.append(output_file)
+ updated.write_file(output_file) # always write files to make sure stale files do not exist
+
+ if updated:
+ # only report files which are non-empty to prevent coverage from reporting errors
+ output_files.append(output_file)
path_checker.report()