[all-commits] [llvm/llvm-project] bea39c: [llvm-cov] Support directory layout in coverage re...
Yuhao Gu via All-commits
all-commits at lists.llvm.org
Wed Aug 23 22:46:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bea39c5443612b638aa1cc56d36e3b1fd06f6e96
https://github.com/llvm/llvm-project/commit/bea39c5443612b638aa1cc56d36e3b1fd06f6e96
Author: Yuhao Gu <yhgu2000 at outlook.com>
Date: 2023-08-24 (Thu, 24 Aug 2023)
Changed paths:
M llvm/docs/CommandGuide/llvm-cov.rst
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/a0/a1/a2.cc
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/b0/b1.h
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/b0/b1_1.cc
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/b0/b1_2.cc
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/c0/c1/c2.h
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/c0/c1/c2_1.cc
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/c0/c1/c2_2.cc
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/header.h
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/main.cc
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/main.covmapping
A llvm/test/tools/llvm-cov/Inputs/directory_coverage/main.profdata
A llvm/test/tools/llvm-cov/directory_coverage.linux.test
A llvm/test/tools/llvm-cov/directory_coverage.win.test
M llvm/tools/llvm-cov/CodeCoverage.cpp
M llvm/tools/llvm-cov/CoverageReport.cpp
M llvm/tools/llvm-cov/CoverageReport.h
M llvm/tools/llvm-cov/CoverageSummaryInfo.h
M llvm/tools/llvm-cov/CoverageViewOptions.h
M llvm/tools/llvm-cov/SourceCoverageView.cpp
M llvm/tools/llvm-cov/SourceCoverageView.h
M llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
M llvm/tools/llvm-cov/SourceCoverageViewHTML.h
M llvm/tools/llvm-cov/SourceCoverageViewText.cpp
M llvm/tools/llvm-cov/SourceCoverageViewText.h
M llvm/tools/llvm-cov/TestingSupport.cpp
Log Message:
-----------
[llvm-cov] Support directory layout in coverage reports
This is a GSoC 2023 project ([discourse link](https://discourse.llvm.org/t/coverage-support-a-hierarchical-directory-structure-in-generated-coverage-html-reports/68239)).
llvm-cov currently generates a single top-level index HTML file, which causes rendering scalability issues in large projects. This patch adds support for hierarchical directory structure into the HTML reports to solve scalability issues by introducing the following changes:
- Added a new command line option `--show-directory-coverage` for `llvm-cov show`. It works both for `--format=html` and `--format=text`.
- Two new classes: `CoveragePrinterHTMLDirectory` and `CoveragePrinterTextDirectory` was added to support the new option.
- A tool class `DirectoryCoverageReport` was added to support the two classes above.
- Updated the document.
- Added a new regression test for `--show-directory-coverage`.
Reviewed By: phosek, gulfem
Differential Revision: https://reviews.llvm.org/D151283
More information about the All-commits
mailing list