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 |
void
|
cleanUpSuiteSetup()
Opportunity to clean up all the things that were needed during the suites setup but are not required to run the tests. |
void
|
clearExcludeFilter()
|
void
|
clearIncludeFilter()
|
SuiteModuleLoader
|
createModuleLoader(
Create the |
|
getExcludeFilter()
Gets a copy of exclude-filters for the compatibility test |
|
getIncludeFilter()
Gets a copy of include-filters for the compatibility test |
SuiteModuleLoader
|
getModuleLoader()
Returns the current |
String
|
getRunSuiteTag()
|
|
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()
|
boolean
|
reverseExcludeFilters()
|
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)
|
void
|
setSkipjarLoading(boolean skipJarLoading)
|
Protected methods | |
---|---|
|
getFoldableStates(ITestDevice device)
|
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 |
|
cleanUpSuiteSetup
public void cleanUpSuiteSetup ()
Opportunity to clean up all the things that were needed during the suites setup but are not required to run the tests.
clearExcludeFilter
public void clearExcludeFilter ()
clearIncludeFilter
public void clearIncludeFilter ()
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 . |
getExcludeFilter
publicgetExcludeFilter ()
Gets a copy of exclude-filters for the compatibility test
Returns | |
---|---|
|
getIncludeFilter
publicgetIncludeFilter ()
Gets a copy of include-filters for the compatibility test
Returns | |
---|---|
|
getModuleLoader
public SuiteModuleLoader getModuleLoader ()
Returns the current SuiteModuleLoader
.
Returns | |
---|---|
SuiteModuleLoader |
getRunSuiteTag
public String getRunSuiteTag ()
Returns | |
---|---|
String |
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 ()
reverseExcludeFilters
public boolean reverseExcludeFilters ()
Returns | |
---|---|
boolean |
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 |
setSkipjarLoading
public void setSkipjarLoading (boolean skipJarLoading)
Parameters | |
---|---|
skipJarLoading |
boolean |
Protected methods
getFoldableStates
protectedgetFoldableStates (ITestDevice device)
Parameters | |
---|---|
device |
ITestDevice |
Returns | |
---|---|
|
Throws | |
---|---|
DeviceNotAvailableException |
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 |