commit | 5313f56afa6b8b6ed44334fa8d8e8970486174a1 | [log] [tgz] |
---|---|---|
author | Prakhar Asthana <pasthana@google.com> | Thu Feb 09 20:35:45 2023 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Feb 09 20:35:45 2023 |
tree | b6da4230bae8a35dd72d1b864d2eccafefb7651e | |
parent | f4621c3ceb7eea7d28f4142939ec883c4e4ae7ca [diff] |
Revert "Use unit test coverage metric to warn of low coverage" This reverts commit f4621c3ceb7eea7d28f4142939ec883c4e4ae7ca. Reason for revert: Our use case changed from the time I created this change. We now use overall coverage metric to warn/block CLs. Original change's description: > Use unit test coverage metric to warn of low coverage > > Bug: 1412897 > Change-Id: I57de49fd5588df9836516086e7b1b9c001e21f61 Bug: 1412897 Change-Id: I4194b2ebfbe0f96d9b7b494b22c78f8e18eeeff2 No-Presubmit: true No-Tree-Checks: true No-Try: true
The purpose of this plugin is to surface code coverage data on Gerrit UI.
To check out the chromium-coverage plugin code, first make sure you have gerrit frontend code checked in
git clone https://gerrit.googlesource.com/gerrit
cd into plugins
directory and checkout this repo
cd plugins/ git clone https://chromium.googlesource.com/infra/gerrit-plugins/code-coverage
Following commands assume you have cd'ed into web/
directory
make test
For testing the plugin with Gerrit FE Dev Helper
1. make build (This creates a chromium-coverage.js file inside plugins directory) 2. cd ../../.. (cd into gerrit frontend code dir) 3. npx http-server -c-1 --cors
and let the Dev Helper redirect from .+/plugins/chromium-coverage/.*
to http://localhost:8080/plugins/chromium-coverage.js
You might also have to block loading of prod coverage plugin(s) by using a block rule similar to .*polygerrit_assets/549.0/plugins/.*
.
This plugin is configured via the project.config
file present in the repo's refs/meta/config
ref. This file uses git config format. By default, the coverage percentage columns in the file list are hidden to avoid visual distraction in unrelated projects, and in order to have them displayed, please add the following config:
[plugin "code-coverage"] enabled = true