agents/skills/experimental-code-coverage-local-debugger/SKILL.md
Use this skill to generate code coverage data on a local workstation using
Chromium's Universal Test Runner (tools/utr). It wraps the exact recipe logic
used by LUCI trybots, dynamically evaluating local Starlark and GN repairs.
builder_name: The target CQ builder name (e.g., "linux-rel").bucket: The builder bucket (default: "try").test_suite: The target test target name (e.g., "net_unittests").build_dir: Optional custom output directory (e.g., "out/Coverage").If prior agent debugging steps modified Starlark files under infra/config/,
regenerate the global configuration files so UTR reads the latest state.
lucicfg generate infra/config/main.star
For general UTR command documentation, common flags, and authentication guidelines, refer to the utr skill.
When debugging code coverage specifically, invoke tools/utr/run.py to compile
and execute the test target while replicating the exact LUCI builder recipe
environment and evaluating Starlark code coverage GN arguments (e.g.,
use_clang_coverage = true):
vpython3 tools/utr/run.py -p chromium -B {{bucket}} -b {{builder_name}} \
-t {{test_suite}} compile-and-test
.profdata generation before uploading a CL, or when isolating shard failures
on platforms not accessible locally (e.g., Windows or ChromeOS).To run a native workstation test binary directly against pinned LLVM tools without UTR container overhead, execute the rapid helper script:
vpython3 tools/code_coverage/run_local_coverage.py \
--binary {{build_dir}}/{{test_suite}} --source {{target_file}}
ci.chromium.org/ui/inv/...) to verify code coverage percentage
resolution.run_local_coverage.py), verify
that generated .profdata reports non-zero line execution counts matching
edits.