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