commit | 2a9ed2729a6a1f650f1247c0e3b8afcb40d6f35d | [log] [tgz] |
---|---|---|
author | Ben Reich <benreich@chromium.org> | Tue Dec 08 21:47:47 2020 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Dec 08 21:47:47 2020 |
tree | 876ecbb8e23bd9b956dcfd1965fed1ac3203fad9 | |
parent | af02d8489fa5e46eb44890ae98b9b437373f2902 [diff] |
[js-code-coverage] Convert cov output into line and uncovered blocks Coverage is merged post browser_test execution but the format is in contiguous blocks representing character offsets in the source file. To upload this data into the coverage dashboard a new format is required which can be found at: //appengine/findit/model/proto/code_coverage.proto The format we have available to convert to is line coverage, the other formats are not considered during this conversion. If multiple invocation counts are found within the same line, the larger of the two is taken. The main logic logic is supplied in this CL with follow up CLs to introduce logic for the helper functions _add_uncovered_block and _extend_previous_line_range. Tests for the function to follow. Bug: 1113941 Test: ./recipes.py test run Test: ./generate_coverage_metadata_for_javascript_test.py Test: python generate_coverage_metadata_for_javascript.py \ --src-path chromium/src \ --coverage-dir chromium/src/out/Default/devtools_code_coverage \ --dir-metadata-path component_mapping \ --output-dir none Change-Id: I153b4143643a161974b1d929ac87b846a2119ca2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2556418 Commit-Queue: Ben Reich <benreich@chromium.org> Reviewed-by: Zhaoyang Li <zhaoyangli@chromium.org>
If you're here to make a change to ‘recipes’ (the code located in scripts/slave/recipes*
), please take a look at the README for more information pertaining to recipes.
The preferred style is PEP8 with two-space indent; that is, the Chromium Python style. Functions use lowercase_with_underscores
, with the exception of the special functions RunSteps
and RunTests
in recipes. Use yapf (git cl format --no-clang-format
) to autoformat new code.