TestInfo

public class TestInfo
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.testmapping.TestInfo


Stores the test information set in a TEST_MAPPING file.

Summary

Public constructors

TestInfo(String name, String source, boolean hostOnly)
TestInfo(String name, String source, boolean hostOnly, keywords)

Public methods

void addImportPaths( paths)
void addOption(TestOption option)
void addSources( sources)
boolean equals(Object o)
boolean getHostOnly()
getImportPaths()
getKeywords( ignoreKeywords)

Get a ERROR(/Set) of the keywords supported by the test.

getKeywords()

Get a ERROR(/Set) of the keywords supported by the test.

String getName()
String getNameAndHostOnly()

Get a String represent the test name and its host setting.

String getNameOption()

Get a String represent the test name and its options.

getOptions()
getSources()
int hashCode()
void merge(TestInfo test)

Merge with another test.

String toString()

Public constructors

TestInfo

public TestInfo (String name, 
                String source, 
                boolean hostOnly)

Parameters
name String

source String

hostOnly boolean

TestInfo

public TestInfo (String name, 
                String source, 
                boolean hostOnly, 
                 keywords)

Parameters
name String

source String

hostOnly boolean

keywords

Public methods

addImportPaths

public void addImportPaths ( paths)

Parameters
paths

addOption

public void addOption (TestOption option)

Parameters
option TestOption

addSources

public void addSources ( sources)

Parameters
sources

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getHostOnly

public boolean getHostOnly ()

Returns
boolean

getImportPaths

public  getImportPaths ()

Returns

getKeywords

public  getKeywords ( ignoreKeywords)

Get a ERROR(/Set) of the keywords supported by the test.

Parameters
ignoreKeywords : A set of String of keywords to be ignored.

Returns

getKeywords

public  getKeywords ()

Get a ERROR(/Set) of the keywords supported by the test.

Returns

getName

public String getName ()

Returns
String

getNameAndHostOnly

public String getNameAndHostOnly ()

Get a String represent the test name and its host setting. This allows TestInfos to be grouped by name the requirement on device.

Returns
String

getNameOption

public String getNameOption ()

Get a String represent the test name and its options.

Returns
String

getOptions

public  getOptions ()

Returns

getSources

public  getSources ()

Returns

hashCode

public int hashCode ()

Returns
int

merge

public void merge (TestInfo test)

Merge with another test.

Update test options so the test has the best possible coverage of both tests.

TODO(b/113616538): Implement a more robust option merging mechanism.

Parameters
test TestInfo: TestInfo object to be merged with.

toString

public String toString ()

Returns
String