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( patterns)

Add config patterns

void addModuleArgs( moduleArgs)

Adds module args

SuiteModuleLoader createModuleLoader( includeFiltersFormatted, excludeFiltersFormatted, testArgs, moduleArgs)

Create the SuiteModuleLoader responsible to load the IConfiguration and assign them some of the options.

SuiteModuleLoader getModuleLoader()

Returns the current SuiteModuleLoader.

File getTestsDir()
loadTests()

Abstract method to load the tests configuration that will be run.

loadingStrategy( abis, testsDirs, String suitePrefix, String suiteTag)

Default loading strategy will load from the resources and the tests directory.

void setBuild(IBuildInfo buildInfo)

void setExcludeFilter( excludeFilters)

Sets exclude-filters for the compatibility test

void setIncludeFilter( includeFilters)

Sets include-filters for the compatibility test

Protected methods

getExcludeFilter()

Gets a copy of exclude-filters for the compatibility test

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.

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

getTestsDir

public File getTestsDir ()

Returns
File

loadTests

public  loadTests ()

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

public  loadingStrategy ( 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.

setBuild

public void setBuild (IBuildInfo buildInfo)

Parameters
buildInfo IBuildInfo

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

Protected methods

getExcludeFilter

protected  getExcludeFilter ()

Gets a copy of exclude-filters for the compatibility test

Returns

getIncludeFilter

protected  getIncludeFilter ()

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.