[code coverage] Write tests for generate_coverage_metadata

This CL writes tests to exercise the main logic for generating coverage
metadata for both per-cl coverage and full-repo coverage, and also does
necessary refactorings to make the code paths testable.

This CL is expected to be a pure non-op refactoring.

Change-Id: I5f6382960c851a8315cb6496b7cbb002292097d7
Reviewed-on: https://chromium-review.googlesource.com/c/1356914
Commit-Queue: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Shuotao Gao <stgao@chromium.org>
Reviewed-by: Roberto Carrillo <robertocn@chromium.org>
2 files changed
tree: 55aba2a6b0ea34fd1eee7c68cc249d859706ea4c
  1. infra/
  2. masters/
  3. scripts/
  4. site_config/
  5. slave/
  6. tests/
  7. third_party/
  8. .gitattributes
  9. .gitignore
  10. .vpython
  11. codereview.settings
  12. DEPS
  13. environment.cfg.py
  14. LICENSE
  15. OWNERS
  16. PRESUBMIT.py
  17. README.md
  18. WATCHLISTS
README.md

build

Hi build contributor! If you do any change in scripts/master/ or touching any master's html/ directories, you must restart master.chromium.fyi first and ensure that it still works before restarting other masters.

Recipes

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.