mirror of
https://github.com/token2/chromeos_smart_card_connector.git
synced 2026-06-22 14:42:50 -07:00
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:
@@ -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,2 +1,3 @@
|
||||
/binaries-for-github-release/
|
||||
/built_app_packages/
|
||||
/coverage-report-detailed/
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user