SuiteTestFilter
public
class
SuiteTestFilter
extends Object
java.lang.Object | |
↳ | com.android.tradefed.testtype.suite.SuiteTestFilter |
Represents a filter for including and excluding tests.
Summary
Public constructors | |
---|---|
SuiteTestFilter(Integer shardIndex, String abi, String name, String test)
Creates a new |
|
SuiteTestFilter(String abi, String name, String test)
Creates a new |
Public methods | |
---|---|
static
SuiteTestFilter
|
createFrom(String filter)
Builds a new |
boolean
|
equals(Object obj)
|
String
|
getAbi()
|
String
|
getBaseName()
Returns the base name of the module without any parameterization. |
String
|
getModuleId()
|
String
|
getName()
|
String
|
getParameterName()
If the module is parameterized, returns the parameter value. |
Integer
|
getShardIndex()
Returns the shard index of the test, or null if not specified. |
String
|
getTest()
|
int
|
hashCode()
|
String
|
toString()
Returns a String representation of this filter. |
Public constructors
SuiteTestFilter
public SuiteTestFilter (Integer shardIndex, String abi, String name, String test)
Creates a new SuiteTestFilter
from the given parts.
Parameters | |
---|---|
shardIndex |
Integer |
abi |
String : The ABI must be supported AbiUtils#isAbiSupportedByCompatibility(String) |
name |
String : The module's name |
test |
String : The test's identifier eg |
SuiteTestFilter
public SuiteTestFilter (String abi, String name, String test)
Creates a new SuiteTestFilter
from the given parts.
Parameters | |
---|---|
abi |
String : The ABI must be supported AbiUtils#isAbiSupportedByCompatibility(String) |
name |
String : The module's name |
test |
String : The test's identifier eg |
Public methods
createFrom
public static SuiteTestFilter createFrom (String filter)
Builds a new SuiteTestFilter
from the given string. Filters can be in one of four
forms, the instance will be initialized as; -"name" -> abi = null, name = "name", test = null
-"name" "test..." -> abi = null, name = "name", test = "test..." -"abi" "name" -> abi =
"abi", name = "name", test = null -"abi" "name" "test..." -> abi = "abi", name = "name", test
= "test..."
Test identifier can contain multiple parts, eg parameterized tests.
Parameters | |
---|---|
filter |
String : the filter to parse |
Returns | |
---|---|
SuiteTestFilter |
the SuiteTestFilter |
equals
public boolean equals (Object obj)
Parameters | |
---|---|
obj |
Object |
Returns | |
---|---|
boolean |
getAbi
public String getAbi ()
Returns | |
---|---|
String |
the abi of this filter, or null if not specified. |
getBaseName
public String getBaseName ()
Returns the base name of the module without any parameterization. If not parameterized, it
will return getName()
;
Returns | |
---|---|
String |
getModuleId
public String getModuleId ()
Returns | |
---|---|
String |
getName
public String getName ()
Returns | |
---|---|
String |
the module name of this filter, or null if not specified. |
getParameterName
public String getParameterName ()
If the module is parameterized, returns the parameter value. Null if not parameterized.
Returns | |
---|---|
String |
getShardIndex
public Integer getShardIndex ()
Returns the shard index of the test, or null if not specified.
Returns | |
---|---|
Integer |
getTest
public String getTest ()
Returns | |
---|---|
String |
the test identifier of this filter, or null if not specified. |
hashCode
public int hashCode ()
Returns | |
---|---|
int |
toString
public String toString ()
Returns a String representation of this filter. This function is the inverse of createFrom(String)
.
For a valid filter f;
new TestFilter(f).toString().equals(f)
Returns | |
---|---|
String |