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 ERROR(/FilenameFilter) to find all the config files in a directory. 

Fields

public static final String CONFIG_EXT

Public constructors

SuiteModuleLoader( includeFilters, excludeFilters, testArgs, moduleArgs)

Ctor for the SuiteModuleLoader.

Public methods

static void addFilters( stringFilters, filters, abis)

Utility method that allows to parse and create a structure with the option filters.

void addFiltersToTest(IRemoteTest test, IAbi abi, String moduleId, includeFilters, excludeFilters)

Pass the filters to the IRemoteTest.

static getModuleNamesMatching(File directory, String suitePrefix, String pattern)
loadConfigsFromDirectory( testsDirs, abis, String suitePrefix, String suiteTag, patterns)

Main loading of configurations, looking into a folder

loadConfigsFromJars( abis, String suitePrefix, String suiteTag)

Main loading of configurations, looking into the resources on the classpath.

final void setExcludedModuleParameters( excludedParams)

Sets the set of ModuleParameters that should not be considered at all.

final void setModuleParameter(ModuleParameters param)

Sets the only ModuleParameters type that should be run.

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)

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.

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 static  getModuleNamesMatching (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

public  loadConfigsFromDirectory ( 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

public  loadConfigsFromJars ( 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

setExcludedModuleParameters

public final void setExcludedModuleParameters ( excludedParams)

Sets the set of ModuleParameters that should not be considered at all.

Parameters
excludedParams

setModuleParameter

public final void setModuleParameter (ModuleParameters param)

Sets the only ModuleParameters type that should be run.

Parameters
param ModuleParameters

setParameterizedModules

public final void setParameterizedModules (boolean allowed)

Sets whether or not to allow parameterized modules.

Parameters
allowed boolean