SuiteModuleLoader
public
class
SuiteModuleLoader
extends Object
java.lang.Object | |
↳ | com.android.tradefed.testtype.suite.SuiteModuleLoader |
Retrieves Compatibility test module definitions from the repository. TODO: Add the expansion of suite when loading a module.
Summary
Nested classes | |
---|---|
class |
SuiteModuleLoader.ConfigFilter
A |
Fields | |
---|---|
public
static
final
String |
CONFIG_EXT
|
Public constructors | |
---|---|
SuiteModuleLoader(
Ctor for the SuiteModuleLoader. |
Public methods | |
---|---|
static
void
|
addFilters(
Utility method that allows to parse and create a structure with the option filters. |
void
|
addFiltersToTest(IRemoteTest test, IAbi abi, String moduleId,
Pass the filters to the |
static
|
getModuleNamesMatching(File directory, String suitePrefix, String pattern)
|
|
loadConfigsFromDirectory(
Main loading of configurations, looking into a folder |
|
loadConfigsFromJars(
Main loading of configurations, looking into the resources on the classpath. |
|
loadConfigsFromSpecifiedPaths(
Main loading of configurations, looking into the specified files |
|
loadTfConfigsFromSpecifiedPaths(
Main loading of configurations, looking into the specified resources on the classpath. |
final
void
|
setExcludedModuleParameters(
Sets the set of |
final
void
|
setFoldableStates(
Sets the set of |
final
void
|
setIgnoreNonPreloadedMainlineModule(boolean ignore)
Sets whether or not to ignore installing the module if it is not preloaded. |
final
void
|
setInvocationContext(IInvocationContext context)
|
final
void
|
setLoadConfigsWithIncludeFilters(boolean allowed)
Sets whether or not to load test config based on the given include-filter. |
final
void
|
setMainlineParameterizedModules(boolean allowed)
Sets whether or not to allow parameterized mainline modules. |
final
void
|
setModuleParameter(ModuleParameters param)
Sets the only |
final
void
|
setOptimizeMainlineTest(boolean allowed)
Sets whether or not to optimize mainline test. |
final
void
|
setOptionalParameterizedModules(boolean allowed)
Sets whether or not to allow optional parameterized modules. |
final
void
|
setParameterizedModules(boolean allowed)
Sets whether or not to allow parameterized modules. |
Fields
CONFIG_EXT
public static final String CONFIG_EXT
Public constructors
SuiteModuleLoader
public SuiteModuleLoader (includeFilters, excludeFilters, testArgs, moduleArgs)
Ctor for the SuiteModuleLoader.
Parameters | |
---|---|
includeFilters |
: The formatted and parsed include filters. |
excludeFilters |
: The formatted and parsed exclude filters. |
testArgs |
: the list of test (IRemoteTest ) arguments. |
moduleArgs |
: the list of module arguments. |
Public methods
addFilters
public static void addFilters (stringFilters, filters, abis, foldableStates)
Utility method that allows to parse and create a structure with the option filters.
Parameters | |
---|---|
stringFilters |
: The original option filters format. |
filters |
: The filters parsed from the string format. |
abis |
: The Abis to consider in the filtering. |
foldableStates |
|
addFiltersToTest
public void addFiltersToTest (IRemoteTest test, IAbi abi, String moduleId,includeFilters, excludeFilters)
Pass the filters to the IRemoteTest
. Default behavior is to ignore if the IRemoteTest
does not implements ITestFileFilterReceiver
. This can be overriden to create a more
restrictive behavior.
Parameters | |
---|---|
test |
IRemoteTest : The IRemoteTest that is being considered. |
abi |
IAbi : The Abi we are currently working on. |
moduleId |
String : The id of the module (usually abi + module name). |
includeFilters |
: The formatted and parsed include filters. |
excludeFilters |
: The formatted and parsed exclude filters. |
getModuleNamesMatching
public staticgetModuleNamesMatching (File directory, String suitePrefix, String pattern)
Parameters | |
---|---|
directory |
File |
suitePrefix |
String |
pattern |
String |
Returns | |
---|---|
|
the ERROR(/Set) of modules whose name contains the given pattern. |
loadConfigsFromDirectory
publicloadConfigsFromDirectory ( testsDirs, abis, String suitePrefix, String suiteTag, patterns)
Main loading of configurations, looking into a folder
Parameters | |
---|---|
testsDirs |
|
abis |
|
suitePrefix |
String |
suiteTag |
String |
patterns |
|
Returns | |
---|---|
|
loadConfigsFromJars
publicloadConfigsFromJars ( abis, String suitePrefix, String suiteTag)
Main loading of configurations, looking into the resources on the classpath. (TF configs for example).
Parameters | |
---|---|
abis |
|
suitePrefix |
String |
suiteTag |
String |
Returns | |
---|---|
|
loadConfigsFromSpecifiedPaths
publicloadConfigsFromSpecifiedPaths ( listConfigFiles, abis, String suiteTag)
Main loading of configurations, looking into the specified files
Parameters | |
---|---|
listConfigFiles |
|
abis |
|
suiteTag |
String |
Returns | |
---|---|
|
loadTfConfigsFromSpecifiedPaths
publicloadTfConfigsFromSpecifiedPaths ( configs, abis, String suiteTag)
Main loading of configurations, looking into the specified resources on the classpath.
Parameters | |
---|---|
configs |
|
abis |
|
suiteTag |
String |
Returns | |
---|---|
|
setExcludedModuleParameters
public final void setExcludedModuleParameters (excludedParams)
Sets the set of ModuleParameters
that should not be considered at all.
Parameters | |
---|---|
excludedParams |
|
setFoldableStates
public final void setFoldableStates (foldableStates)
Sets the set of DeviceFoldableState
that should be run.
Parameters | |
---|---|
foldableStates |
|
setIgnoreNonPreloadedMainlineModule
public final void setIgnoreNonPreloadedMainlineModule (boolean ignore)
Sets whether or not to ignore installing the module if it is not preloaded.
Parameters | |
---|---|
ignore |
boolean |
setInvocationContext
public final void setInvocationContext (IInvocationContext context)
Parameters | |
---|---|
context |
IInvocationContext |
setLoadConfigsWithIncludeFilters
public final void setLoadConfigsWithIncludeFilters (boolean allowed)
Sets whether or not to load test config based on the given include-filter.
Parameters | |
---|---|
allowed |
boolean |
setMainlineParameterizedModules
public final void setMainlineParameterizedModules (boolean allowed)
Sets whether or not to allow parameterized mainline modules.
Parameters | |
---|---|
allowed |
boolean |
setModuleParameter
public final void setModuleParameter (ModuleParameters param)
Sets the only ModuleParameters
type that should be run.
Parameters | |
---|---|
param |
ModuleParameters |
setOptimizeMainlineTest
public final void setOptimizeMainlineTest (boolean allowed)
Sets whether or not to optimize mainline test.
Parameters | |
---|---|
allowed |
boolean |
setOptionalParameterizedModules
public final void setOptionalParameterizedModules (boolean allowed)
Sets whether or not to allow optional parameterized modules.
Parameters | |
---|---|
allowed |
boolean |
setParameterizedModules
public final void setParameterizedModules (boolean allowed)
Sets whether or not to allow parameterized modules.
Parameters | |
---|---|
allowed |
boolean |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-03-08 UTC.