ConfigurationDescriptor

public class ConfigurationDescriptor
extends Object

java.lang.Object
   ↳ com.android.tradefed.config.ConfigurationDescriptor


Configuration Object that describes some aspect of the configuration itself. Like a membership test-suite-tag. This class cannot receive option values via command line. Only directly in the xml.

Summary

Nested classes

enum ConfigurationDescriptor.LocalTestRunner

Enum used to indicate local test runner. 

Fields

public static final String LOCAL_SHARDED_KEY

Metadata key for a config to specify that it was sharded.

Public constructors

ConfigurationDescriptor()

Public methods

void addMetaData(String key, values)

Add more values of a given key to the metadata entries.

void addMetadata(String key, String value)

Add a value for a given key to the metadata entries.

void addRerunOption(ConfigurationDef.OptionDef optionDef)

Add the option to a list of options that can be used to rerun the test.

ConfigurationDescriptor clone()

Return a deep-copy of the ConfigurationDescriptor object.

static ConfigurationDescriptor fromProto(ConfigurationDescription.Descriptor protoDescriptor)

Inverse operation from toProto() to get the object back.

IAbi getAbi()

Returns the abi the configuration is running against if known, null otherwise.

MultiMap<String, String> getAllMetaData()

Retrieves all configured metadata and return a copy of the map.

getMetaData(String name)

Get the named metadata entries

String getModuleName()

Returns the module name of the module configuration.

getRerunOptions()

Get the list of OptionDef that can be used for rerun.

getSuiteTags()

Returns the list of suite tags the test is part of.

boolean isNotShardable()

Returns if the configuration is shardable or not as part of a suite

boolean isNotStrictShardable()

Returns if the configuration is strict shardable or not as part of a suite

void setAbi(IAbi abi)

Sets the abi the configuration is going to run against.

void setMetaData(MultiMap<String, String> metadata)
void setModuleName(String name)

If this configuration represents a module, we can set the module name associated with it.

void setSandboxed(boolean useSandboxed)

Sets whether or not a config will run in sandboxed mode or not.

void setSuiteTags( suiteTags)

Sets the list of suite tags the test is part of.

boolean shouldUseSandbox()

Returns true if the invocation should run in sandboxed mode.

ConfigurationDescription.Descriptor toProto()

Convert the current instance of the descriptor into its proto format.

Fields

LOCAL_SHARDED_KEY

public static final String LOCAL_SHARDED_KEY

Metadata key for a config to specify that it was sharded.

Public constructors

ConfigurationDescriptor

public ConfigurationDescriptor ()

Public methods

addMetaData

public void addMetaData (String key, 
                 values)

Add more values of a given key to the metadata entries.

Parameters
key String: String of the key to add values to.

values : a list of String of the additional values.

addMetadata

public void addMetadata (String key, 
                String value)

Add a value for a given key to the metadata entries.

Parameters
key String: String of the key to add values to.

value String: AString of the additional value.

addRerunOption

public void addRerunOption (ConfigurationDef.OptionDef optionDef)

Add the option to a list of options that can be used to rerun the test.

Parameters
optionDef ConfigurationDef.OptionDef: a OptionDef object of the test option.

clone

public ConfigurationDescriptor clone ()

Return a deep-copy of the ConfigurationDescriptor object.

Returns
ConfigurationDescriptor

fromProto

public static ConfigurationDescriptor fromProto (ConfigurationDescription.Descriptor protoDescriptor)

Inverse operation from toProto() to get the object back.

Parameters
protoDescriptor ConfigurationDescription.Descriptor

Returns
ConfigurationDescriptor

getAbi

public IAbi getAbi ()

Returns the abi the configuration is running against if known, null otherwise.

Returns
IAbi

getAllMetaData

public MultiMap<String, String> getAllMetaData ()

Retrieves all configured metadata and return a copy of the map.

Returns
MultiMap<String, String>

getMetaData

public  getMetaData (String name)

Get the named metadata entries

Parameters
name String

Returns

getModuleName

public String getModuleName ()

Returns the module name of the module configuration.

Returns
String

getRerunOptions

public  getRerunOptions ()

Get the list of OptionDef that can be used for rerun.

Returns

getSuiteTags

public  getSuiteTags ()

Returns the list of suite tags the test is part of.

Returns

isNotShardable

public boolean isNotShardable ()

Returns if the configuration is shardable or not as part of a suite

Returns
boolean

isNotStrictShardable

public boolean isNotStrictShardable ()

Returns if the configuration is strict shardable or not as part of a suite

Returns
boolean

setAbi

public void setAbi (IAbi abi)

Sets the abi the configuration is going to run against.

Parameters
abi IAbi

setMetaData

public void setMetaData (MultiMap<String, String> metadata)

Parameters
metadata MultiMap

setModuleName

public void setModuleName (String name)

If this configuration represents a module, we can set the module name associated with it.

Parameters
name String

setSandboxed

public void setSandboxed (boolean useSandboxed)

Sets whether or not a config will run in sandboxed mode or not.

Parameters
useSandboxed boolean

setSuiteTags

public void setSuiteTags ( suiteTags)

Sets the list of suite tags the test is part of.

Parameters
suiteTags

shouldUseSandbox

public boolean shouldUseSandbox ()

Returns true if the invocation should run in sandboxed mode. False otherwise.

Returns
boolean

toProto

public ConfigurationDescription.Descriptor toProto ()

Convert the current instance of the descriptor into its proto format.

Returns
ConfigurationDescription.Descriptor