From 96ade372066db43cfab89295e981f645f9a34664 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 11 Oct 2018 04:00:51 +0000 Subject: [PATCH] [Coverage] Apply filtered paths to summary Summary: The script to generate code coverage reports supports passing filter paths to llvm-cov when generating the HTML reports, but doesn't pass those paths to the summary generation as well. This results in a summary report that doesn't match the HTML report. This patch addresses the problem by also passing the filter paths to the summary report generation. Reviewers: vsk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53110 llvm-svn: 344217 --- utils/prepare-code-coverage-artifact.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/prepare-code-coverage-artifact.py b/utils/prepare-code-coverage-artifact.py index 883cdd78049..5c4af242d0d 100644 --- a/utils/prepare-code-coverage-artifact.py +++ b/utils/prepare-code-coverage-artifact.py @@ -51,7 +51,8 @@ def prepare_html_report(host_llvm_cov, profile, report_dir, binaries, subprocess.check_call(invocation) with open(os.path.join(report_dir, 'summary.txt'), 'wb') as Summary: subprocess.check_call([host_llvm_cov, 'report'] + objects + - ['-instr-profile', profile], stdout=Summary) + ['-instr-profile', profile] + restricted_dirs, + stdout=Summary) print('Done!') def prepare_html_reports(host_llvm_cov, profdata_path, report_dir, binaries,