From 6fb1d56fdc022cb6001539ea4bbc87d759093987 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Wed, 11 Sep 2019 15:12:38 +1000 Subject: [PATCH] Fix ansible-test coverage --all (#62115) --- changelogs/fragments/62096-test-coverage-all.yml | 2 ++ test/lib/ansible_test/_internal/cover.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/62096-test-coverage-all.yml 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