BaseTestSuite
public
class
BaseTestSuite
extends ITestSuite
java.lang.Object | ||
↳ | com.android.tradefed.testtype.suite.ITestSuite | |
↳ | com.android.tradefed.testtype.suite.BaseTestSuite |
A Test for running Compatibility Test Suite with new suite system.
Summary
Constants | |
---|---|
char |
MODULE_OPTION_SHORT_NAME
|
char |
TEST_OPTION_SHORT_NAME
|
Fields | |
---|---|
public
static
final
String |
CONFIG_PATTERNS_OPTION
|
public
static
final
String |
EXCLUDE_FILTER_OPTION
|
public
static
final
String |
INCLUDE_FILTER_OPTION
|
public
static
final
String |
MODULE_OPTION
|
public
static
final
String |
TEST_ARG_OPTION
|
public
static
final
String |
TEST_OPTION
|
Public constructors | |
---|---|
BaseTestSuite()
|
Public methods | |
---|---|
void
|
addConfigPatterns(
Add config patterns |
void
|
addModuleArgs(
Adds module args |
SuiteModuleLoader
|
createModuleLoader(
Create the |
SuiteModuleLoader
|
getModuleLoader()
Returns the current |
|
loadTests()
Abstract method to load the tests configuration that will be run. |
|
loadingStrategy(
Default loading strategy will load from the resources and the tests directory. |
void
|
reevaluateFilters()
|
void
|
setBuild(IBuildInfo buildInfo)
|
void
|
setEnableOptionalParameterizedModules(boolean enableOptionalParameter)
Set whether or not optional parameterized modules are enabled or not. |
void
|
setEnableParameterizedModules(boolean enableParameter)
Set whether or not parameterized modules are enabled or not. |
void
|
setExcludeFilter(
Sets exclude-filters for the compatibility test |
void
|
setIncludeFilter(
Sets include-filters for the compatibility test |
void
|
setModuleParameter(ModuleParameters forceParameter)
|
Protected methods | |
---|---|
|
getExcludeFilter()
Gets a copy of exclude-filters for the compatibility test |
|
getFoldableStates(ITestDevice device)
|
|
getIncludeFilter()
Gets a copy of include-filters for the compatibility test |
void
|
setPrioritizeHostConfig(boolean prioritizeHostConfig)
Set option prioritize-host-config. |
void
|
setupFilters(File testsDir)
Sets the include/exclude filters up based on if a module name was given. |
boolean
|
shouldModuleRun(ModuleDefinition module)
|
Constants
MODULE_OPTION_SHORT_NAME
public static final char MODULE_OPTION_SHORT_NAME
Constant Value: 109 (0x0000006d)
TEST_OPTION_SHORT_NAME
public static final char TEST_OPTION_SHORT_NAME
Constant Value: 116 (0x00000074)
Fields
CONFIG_PATTERNS_OPTION
public static final String CONFIG_PATTERNS_OPTION
EXCLUDE_FILTER_OPTION
public static final String EXCLUDE_FILTER_OPTION
INCLUDE_FILTER_OPTION
public static final String INCLUDE_FILTER_OPTION
MODULE_OPTION
public static final String MODULE_OPTION
TEST_ARG_OPTION
public static final String TEST_ARG_OPTION
TEST_OPTION
public static final String TEST_OPTION
Public constructors
BaseTestSuite
public BaseTestSuite ()
Public methods
addConfigPatterns
public void addConfigPatterns (patterns)
Add config patterns
Parameters | |
---|---|
patterns |
|
addModuleArgs
public void addModuleArgs (moduleArgs)
Adds module args
Parameters | |
---|---|
moduleArgs |
|
createModuleLoader
public SuiteModuleLoader createModuleLoader (includeFiltersFormatted, excludeFiltersFormatted, testArgs, moduleArgs)
Create the SuiteModuleLoader
responsible to load the IConfiguration
and
assign them some of the options.
Parameters | |
---|---|
includeFiltersFormatted |
: The formatted and parsed include filters. |
excludeFiltersFormatted |
: The formatted and parsed exclude filters. |
testArgs |
: the list of test (IRemoteTest ) arguments. |
moduleArgs |
: the list of module arguments. |
Returns | |
---|---|
SuiteModuleLoader |
the created SuiteModuleLoader .
|
getModuleLoader
public SuiteModuleLoader getModuleLoader ()
Returns the current SuiteModuleLoader
.
Returns | |
---|---|
SuiteModuleLoader |
loadTests
publicloadTests ()
Abstract method to load the tests configuration that will be run. Each tests is defined by a
IConfiguration
and a unique name under which it will report results.
Returns | |
---|---|
|
loadingStrategy
publicloadingStrategy ( abis, testsDirs, String suitePrefix, String suiteTag)
Default loading strategy will load from the resources and the tests directory. Can be extended or replaced.
Parameters | |
---|---|
abis |
: The set of abis to run against. |
testsDirs |
: The tests directory. |
suitePrefix |
String : A prefix to filter the resource directory. |
suiteTag |
String : The suite tag a module should have to be included. Can be null. |
Returns | |
---|---|
|
A list of loaded configuration for the suite. |
reevaluateFilters
public void reevaluateFilters ()
setBuild
public void setBuild (IBuildInfo buildInfo)
Parameters | |
---|---|
buildInfo |
IBuildInfo |
setEnableOptionalParameterizedModules
public void setEnableOptionalParameterizedModules (boolean enableOptionalParameter)
Set whether or not optional parameterized modules are enabled or not.
Parameters | |
---|---|
enableOptionalParameter |
boolean |
setEnableParameterizedModules
public void setEnableParameterizedModules (boolean enableParameter)
Set whether or not parameterized modules are enabled or not.
Parameters | |
---|---|
enableParameter |
boolean |
setExcludeFilter
public void setExcludeFilter (excludeFilters)
Sets exclude-filters for the compatibility test
Parameters | |
---|---|
excludeFilters |
|
setIncludeFilter
public void setIncludeFilter (includeFilters)
Sets include-filters for the compatibility test
Parameters | |
---|---|
includeFilters |
|
setModuleParameter
public void setModuleParameter (ModuleParameters forceParameter)
Parameters | |
---|---|
forceParameter |
ModuleParameters |
Protected methods
getExcludeFilter
protectedgetExcludeFilter ()
Gets a copy of exclude-filters for the compatibility test
Returns | |
---|---|
|
getFoldableStates
protectedgetFoldableStates (ITestDevice device)
Parameters | |
---|---|
device |
ITestDevice |
Returns | |
---|---|
|
Throws | |
---|---|
DeviceNotAvailableException |
getIncludeFilter
protectedgetIncludeFilter ()
Gets a copy of include-filters for the compatibility test
Returns | |
---|---|
|
setPrioritizeHostConfig
protected void setPrioritizeHostConfig (boolean prioritizeHostConfig)
Set option prioritize-host-config.
Parameters | |
---|---|
prioritizeHostConfig |
boolean : true to prioritize host config, i.e., run host test if possible.
|
setupFilters
protected void setupFilters (File testsDir)
Sets the include/exclude filters up based on if a module name was given.
Parameters | |
---|---|
testsDir |
File |
Throws | |
---|---|
|
if any file is not found. |
shouldModuleRun
protected boolean shouldModuleRun (ModuleDefinition module)
Parameters | |
---|---|
module |
ModuleDefinition |
Returns | |
---|---|
boolean |