| commit | 4febf2e1abea3660f22b49ec2b784d7096efb755 | [log] [tgz] |
|---|---|---|
| author | Gavin Mak <gavinmak@google.com> | Wed Oct 08 19:12:51 2025 |
| committer | Gavin Mak <gavinmak@google.com> | Wed Oct 08 19:12:51 2025 |
| tree | f969d2a590cf16221f4bb13bc168c7554b7d5967 | |
| parent | bb3d39ed6baf64a91d3d806f0ad9d19b882326b3 [diff] |
Fix local tests to use web_test_runner These have been broken for a while since Gerrit removed karma test runner. Bug: 415387031 Change-Id: I2ef699a234af0bb871bfb233b738974c0cec8975
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