TestInfo

public class TestInfo
extends Object

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


存储在 TEST_MAPPING 文件中设置的测试信息。

摘要

公共构造函数

TestInfo(String name, String source, boolean hostOnly)
TestInfo(String name, String source, boolean hostOnly, Set<String> keywords)

公共方法

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

获取测试支持的关键字的 Set

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

获取测试支持的关键字的 Set

String getName()
String getNameAndHostOnly()

获取一个 String,表示测试名称及其主机设置。

String getNameOption()

获取一个 String,表示测试名称及其选项。

List<TestOption> getOptions()
Set<String> getSources()
int hashCode()
void merge(TestInfo test)

与其他测试合并。

String toString()

公共构造函数

TestInfo

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

参数
name String

source String

hostOnly boolean

TestInfo

public TestInfo (String name, 
                String source, 
                boolean hostOnly, 
                Set<String> keywords)

参数
name String

source String

hostOnly boolean

keywords Set

公共方法

addImportPaths

public void addImportPaths (Set<String> paths)

参数
paths Set

addOption

public void addOption (TestOption option)

参数
option TestOption

addSources

public void addSources (Set<String> sources)

参数
sources Set

等于

public boolean equals (Object o)

参数
o Object

返回
boolean

getHostOnly

public boolean getHostOnly ()

返回
boolean

getImportPaths

public Set<String> getImportPaths ()

返回
Set<String>

getKeywords

public Set<String> getKeywords ()

获取测试支持的关键字的 Set

返回
Set<String>

getKeywords

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

获取测试支持的关键字的 Set

参数
ignoreKeywords Set:一组要忽略的关键字(String)。

返回
Set<String>

getName

public String getName ()

返回
String

getNameAndHostOnly

public String getNameAndHostOnly ()

获取一个 String,表示测试名称及其宿主设置。这样一来,就可以按设备上的要求将 TestInfo 按名称分组。

返回
String

getNameOption

public String getNameOption ()

获取一个 String 来表示测试名称及其选项。

返回
String

getOptions

public List<TestOption> getOptions ()

返回
List<TestOption>

getSources

public Set<String> getSources ()

返回
Set<String>

hashCode

public int hashCode ()

返回
int

合并

public void merge (TestInfo test)

与其他测试合并。

更新测试选项,以便测试尽可能全面地涵盖这两项测试。

TODO(b/113616538):实现更强大的选项合并机制。

参数
test TestInfo:要合并的 TestInfo 对象。

toString

public String toString ()

返回
String