| commit | ad1f6a1d5b906d0ba9f875c0c3f3d13031cefb2c | [log] [tgz] |
|---|---|---|
| author | Gavin Mak <[email protected]> | Wed Oct 08 19:01:21 2025 |
| committer | Gavin Mak <[email protected]> | Wed Oct 08 19:01:21 2025 |
| tree | 3c4476f274af680f978625fa984af6403efd9649 | |
| parent | d29ca0c64e3a93a8b97f3af59a7da4761fcbc74f [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: I60a9b11353e28974a4e5ecbb82b3fd2d3b8a2a15
The plugin queries the android-binary-size trybot for the current patchset on Gerrit, and gets the binary_size_plugin property. This property contains the metadata about the binary size metrics affected by the patchset in question. It then shows a table with the metric deltas + links to SuperSize output under the Checks tab.
This plugin is configured via the chromium-binary-size.config file present in the repo‘s refs/meta/config ref, as well as the same file in all repositories in the repo’s inheritance chain (up to and including All-Projects).
An example chromium-binary-size.config is below (this enables the plugin on the chromium/src repo using the android-binary-size trybot:
[host] gerrit = "chromium-review.googlesource.com" [repo "chromium/src"] builder = "android-binary-size" bucket = "try" project = "chromium"
All changes to chromium-binary-size.config files are instantly reflected. There is no caching period or need to restart the server.
This plugin must be placed inside the Gerrit plugins directory:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit/plugins git clone https://chromium.googlesource.com/infra/gerrit-plugins/chromium-binary-size
Run the commands below in web/.
For running Java unit tests execute:
make test_java
For running TypeScript unit tests execute:
make test
For checking or fixing eslint formatter problems run:
make lint_test make lint_fix
For testing the plugin with Gerrit FE Dev Helper the command below builds the JavaScript bundle and copies it to the plugins/chromium-binary-size folder:
make build
and let the Dev Helper redirect from .+/plugins/chromium-binary-size/static/chromium-binary-size.js to http://localhost:8081/plugins_/plugins/chromium-binary-size.js.