commit | ac4a452e2467587a65d7e49b3916399319fc6d99 | [log] [tgz] |
---|---|---|
author | Ben Reich <benreich@chromium.org> | Tue Dec 15 02:21:46 2020 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Dec 15 02:21:46 2020 |
tree | 6a497b228a4232f8a15ceeaf9df5d1738f104eb8 | |
parent | 2b39662f8c908712fff2b13d61419556a5a01e0f [diff] |
[js-code-coverage] Add get_files_coverage_data helper method Introduce a method that starts to generate the end format required to integrate into the code coverage dashboard. This extracts all the source files from the coverage files, retrieves the covered lines, uncovered lines, relative source path and adds a scaffolding method which returns the file summary level metrics. The metrics for now are only line coverage and there is an explicit Exception raised if duplicate source files are found in >1 coverage file. There is no possiblity for now for this to occur hence raising an Exception. 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 Test: https://chromium-swarm.appspot.com/task?id=5077e6e79e10c310 Change-Id: I8c70637460a9922718ac65bf13818f3613c19cab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/build/+/2588506 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.