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, Set<String> keywords)

Public methods

void addImportPaths(Set<String> paths)
void addOption(TestOption option)
void addSources(Set<String> sources)
boolean equals(Object o)
boolean getHostOnly()
Set<String> getImportPaths()
Set<String> getKeywords()

Get a Set of the keywords supported by the test.

Set<String> getKeywords(Set<String> ignoreKeywords)

Get a 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.

List<TestOption> getOptions()
Set<String> 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, 
                Set<String> keywords)

Parameters
name String

source String

hostOnly boolean

keywords Set

Public methods

addImportPaths

public void addImportPaths (Set<String> paths)

Parameters
paths Set

addOption

public void addOption (TestOption option)

Parameters
option TestOption

addSources

public void addSources (Set<String> sources)

Parameters
sources Set

equals

public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getHostOnly

public boolean getHostOnly ()

Returns
boolean

getImportPaths

public Set<String> getImportPaths ()

Returns
Set<String>

getKeywords

public Set<String> getKeywords ()

Get a Set of the keywords supported by the test.

Returns
Set<String>

getKeywords

public Set<String> getKeywords (Set<String> ignoreKeywords)

Get a Set of the keywords supported by the test.

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

Returns
Set<String>

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 List<TestOption> getOptions ()

Returns
List<TestOption>

getSources

public Set<String> getSources ()

Returns
Set<String>

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