Global filters in Trade Federation

Global filters is a way to provide test filters to Tradefed that will apply to the invocation automatically without having to worry about whether a test supports it or not.

It will be inop if the configuration doesn't support filtering, but provide the benefit of not throwing a configuration exception like it's usually the case in Tradefed. This allows a service with minimal knowledge about Tradefed to easily generate and provide filter flags generically.

Syntax

--global-filters:include-filter [abi] module-name [test-class][#method-name]

--global-filters:exclude-filter [abi] module-name [test-class][#method-name]

Where module-name is the only mandatory part to be provided.

For example:

  • --global-filters:include-filter moduleA : will only run the module
  • --global-filters:include-filter moduleA class#method : will only run the matching method

The option can be repeated if more filters are needed. Exclusion has priority over inclusion.

Implementation

Source code