diff --git a/changelogs/fragments/62096-test-coverage-all.yml b/changelogs/fragments/62096-test-coverage-all.yml new file mode 100644 index 00000000000..7beab3a3a44 --- /dev/null +++ b/changelogs/fragments/62096-test-coverage-all.yml @@ -0,0 +1,2 @@ +bugfixes: +- ansible-test coverage - Fix the ``--all`` argument when generating coverage reports - https://github.com/ansible/ansible/issues/62096 diff --git a/test/lib/ansible_test/_internal/cover.py b/test/lib/ansible_test/_internal/cover.py index 078fd950bf9..335c3950eeb 100644 --- a/test/lib/ansible_test/_internal/cover.py +++ b/test/lib/ansible_test/_internal/cover.py @@ -175,7 +175,7 @@ def _command_coverage_combine_python(args): updated.add_arcs({filename: list(arc_data[filename])}) if args.all: - updated.add_arcs(dict((source, []) for source in sources)) + updated.add_arcs(dict((source[0], []) for source in sources)) if not args.explain: output_file = coverage_file + group