tree: 500c58b733ac25ba362573e69d518aa07d983dea [path history] [tgz]
  1. BUILD.gn
  2. OWNERS
  3. PRESUBMIT.py
  4. README.md
  5. ash_unittests_mash.filter
  6. browser_tests_cros_asan.filter
  7. cast-linux.content_browsertests.filter
  8. fuchsia.base_unittests.filter
  9. fuchsia.content_unittests.filter
  10. fuchsia.ipc_tests.filter
  11. fuchsia.mojo_system_unittests.filter
  12. fuchsia.net_unittests.filter
  13. fuchsia.service_manager_unittests.filter
  14. fuchsia.ui_base_unittests.filter
  15. mash.browser_tests.filter
  16. mojo.fyi.mash.browser_tests.filter
  17. mojo.fyi.network_browser_tests.filter
  18. mojo.fyi.network_content_browsertests.filter
  19. mojo.fyi.viz.content_browsertests.filter
  20. site-per-process.browser_tests.filter
  21. site-per-process.content_browsertests.filter
  22. site-per-process.interactive_ui_tests.filter
  23. unit_tests_cros_asan.filter
  24. viz.browser_tests.filter
  25. viz.content_browsertests.filter
  26. viz.content_unittests.filter
  27. win10.services_unittests.filter
testing/buildbot/filters/README.md

Test filter files

Summary

This directory contains files that list tests that are not yet ready to run in a particular mode. For example - the site-per-process.browser_tests.filter file lists tests that should be excluded when running browser_tests in --site-per-process mode.

File syntax

Contents of test filter files follow the syntax below:

  • Empty lines are ignored.
  • Any text after ‘#’ on each line is treated as comments and ignored.
  • All other lines specify a single test name pattern.
    • Negative patterns: Patterns prefixed with the ‘-’ character specify tests to exclude from a test run.
    • Positive patterns: All other patterns specify tests to include in a test run.

A test will be executed if and only if it matches any of the positive patterns but does not match any of the negative patterns (please see documentation of --gtest_filter for more details and examples).

Please see [https://crbug.com/587527] for discussion how “positive” and “negative” test patterns should be combined in presence of both the --gtest_filter and the --test-launcher-filter-file command line flags.

Example test filter file for excluding a set of tests:

# crbug.com/417518: Get tests working w/ --site-per-process
-BrowserTest.OtherRedirectsDontForkProcess
-ChromeRenderProcessHostTest.*
-ReferrerPolicyTest.HttpsRedirect

# crbug.com/448592: Get extension browsertests working w/ --site-per-process
-IsolatedAppTest.CookieIsolation
-IsolatedAppTest.CrossProcessClientRedirect
-IsolatedAppTest.IsolatedAppProcessModel
-IsolatedAppTest.SubresourceCookieIsolation

Usage

When running tests on desktop platforms, the test filter file can be specified using --test-launcher-filter-file command line flag. Example test invocation:

$ out/dbg/content_browsertests \
    --site-per-process \
    --test-launcher-filter-file=testing/buildbot/filters/site-per-process.content_browsertests.filter

When running tests on Android, the test filter file can also be specified using --test-launcher-filter-file command line flag. Example test invocation:

$ out/android/bin/run_content_browsertests \
    --site-per-process \
    --test-launcher-filter-file=testing/buildbot/filters/site-per-process.content_browsertests.filter

Applicability

Test filter files described here are currently only supported for gtest-based tests.

For excluding layout tests when running with a particular command line flag, see third_party/WebKit/LayoutTests/FlagExpectations/README.txt.

Adding new test filter files

Please use the following conventions when naming the new file:

  • Please include the name of the test executable (e.g. content_browsertests).
  • Please use .filter suffix.
  • Feel free to add other relevant things into the file name (e.g. the mode the file applies to - for example site-per-process).

When adding a new file, please update //testing/buildbot/filters/BUILD.gn.