Testing in Chromium - On disabling tests (original) (raw)

Sometimes you don‘t want to run a test that you’ve written (or that you've imported, like conformance tests). The test might not be possible to run in a particular configuration, or be temporarily broken by another change, or be flaky, or simply not work yet. In these cases (and perhaps others), you should disable the test :).

There are a number of different ways to do so:

If you want to be able to determine a global picture of which tests were disabled, you can either parse BUILD files, expectations and filter files, and source code to try and figure that out, or require the tests be present in test binaries (i.e., not compiled out) and then run the test binaries in order to collect the lists of disabled tests and report them to a central system.

Parsing code can be straightforward for some types of tests, but difficult-to-impractical to do correctly for others.