Build detailed coverage HTML pages (#649)

Change coverage-report.sh to produce an HTML archive with full coverage
information (with all source files and per-line coverage information).
Let the HTML archive be uploaded by Continuous Integration as one of
artifacts.
This commit is contained in:
Maksim Ivanov
2022-06-07 13:02:30 +02:00
committed by GitHub
parent 6cfad80954
commit 9692a93aad
3 changed files with 14 additions and 0 deletions
+6
View File
@@ -106,6 +106,12 @@ jobs:
scripts/parse-coverage-output.py < coverage-output.txt
)"
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report-detailed.zip
path: coverage-report-detailed/
# Post an autogenerated comment on the Pull Request (in case the action is run
# because of one).
post-results-comment:
+1
View File
@@ -1,2 +1,3 @@
/binaries-for-github-release/
/built_app_packages/
/coverage-report-detailed/
+7
View File
@@ -71,6 +71,13 @@ done
# weirdness of llvm-cov's CLI). Trim the leading whitespace via one sed
# invocation and replace inner spaces with the flag using the second one.
llvm_cov_args=$(echo "${executables}" | sed 's/^ //g' | sed 's/ / -object /g')
# Create detailed coverage HTML page with per-line information.
llvm-cov show \
-format=html \
${llvm_cov_args} \
-instr-profile=env/coverage-artifacts/all.profdata \
-ignore-filename-regex=${IGNORE_FILENAME_REGEX} \
-output-dir=coverage-report-detailed/
# Print the coverage report table to stdout, so that the report can be parsed by
# the next steps of the pipeline. (Everything above was logged to stderr.)
llvm-cov report \