agents/skills/experimental-test-suite-mapper/SKILL.md
This skill provides a fast, reliable, and deterministic way to map a Chromium source or test file to its parent executable test suite on Linux. It uses static dependency analysis of the GN build graph.
Use this skill when:
target_os = "linux").Depending on what information you have, use one of the two workflows below:
URLParser.PathUrl)If the bug description or comments explicitly mention a test name or GTest filter:
Locate the Test File: Search the codebase for the test definition using a case-insensitive search.
Example search pattern: TEST.*URLParser.*PathUrl Example resolved file:
url/url_parse_unittest.cc
Map the Test File to the Suite: Determine which executable test suites compile the test file. Example using the helper tool:
python3 tools/code_coverage/test_suite_mapper.py url/url_parse_unittest.cc
Example output:
[
"url_unittests"
]
Note: This workflow is preferred because test files are typically compiled into only one (or very few) test runner targets, avoiding proximity noise.
If you only know which source file has missing coverage:
Map the Source File directly: Determine which executable test suites compile the source file. Example using the helper tool:
python3 tools/code_coverage/test_suite_mapper.py base/values.cc
Example output:
[
"base_perftests",
"base_unittests"
]
Interpret the Results: A path proximity filter is used to narrow down the
consuming test suites. For core files (like base/), the most relevant
suites in the same directory are preferred. For files in chrome/, a list of
several covering suites (e.g., browser_tests, unit_tests) may be returned
because they all depend on it.
By default, the build directory is assumed to be out/Default. You can specify
a custom build directory (which must contain args.gn and be configured for
Linux): Example using --build-dir:
python3 tools/code_coverage/test_suite_mapper.py \
--build-dir out/coverage base/values.cc