UTR (Universal Test Runner) is a tool to locally compile and/or run tests the same way it's done on Chromium CI/try builders (aka "bots"). It's particularly useful for reproducing bot failures or running tests on platforms you don't have access to locally.
The UTR tool is located at tools/utr/run.py. Always run it with vpython3.
vpython3 tools/utr/run.py -B <bucket> -b <builder> -t <test_suite> <action>
compile: Only compile the targets.test: Only run the tests (assumes already compiled).compile-and-test: Compile and then run tests.-B <bucket>: The bucket name (e.g., ci or try).-b <builder>: The builder name (e.g., Linux Tests, Win10 Tests x64).-t <test_suite>: The test suite to run (e.g., viz_unittests, url_unittests).--build-dir <dir>-o <dir>//out///out/UTR${{builder_name}}--force or -f: Skip all prompts about config mismatches especially useful
when cross-compiling or using a custom build directory.-n N: Runs the build/test command N times without cleaning the build dir,
and exits on the first failure.--: Any args after this will be passed directly to the test executable.More information including examples with builder names and advanced usage can be found at tools/utr/README.md.
Information about cross-compiling Windows targets on Linux can be found at docs/win_cross.md.