主機測試

public class HostGTest
extends GTestBase implements IBuildReceiver

java.lang.Object
com.android.tradefed.testtype.GTestBase
com.android.tradefed.testtype.HostGTest


運行本機測試包的測試。

概括

公共構造函數

HostGTest ()

公共方法

CommandResult executeHostCommand (String cmd, long timeoutMs)
CommandResult executeHostCommand (String cmd)
String loadFilter (String binaryOnHost)

定義獲取過濾器方法。

void run ( TestInformation testInfo, ITestInvocationListener listener)

void setBuild ( IBuildInfo buildInfo)

公共構造函數

主機測試

public HostGTest ()

公共方法

執行主機命令

public CommandResult executeHostCommand (String cmd, 
                long timeoutMs)

參數
cmd String : 想要在主機中執行的命令

timeoutMs long :命令超時時間(以毫秒為單位)

退貨
CommandResult命令的CommandResult

執行主機命令

public CommandResult executeHostCommand (String cmd)

參數
cmd String : 想要在主機中執行的命令

退貨
CommandResult命令的CommandResult

加載過濾器

public String loadFilter (String binaryOnHost)

定義獲取過濾器方法。

子類必須實現如何獲取它自己的過濾器。

參數
binaryOnHost String : 過濾器文件的完整路徑。

退貨
String過濾字符串。

跑步

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

參數
testInfo TestInformation

listener ITestInvocationListener

投擲
DeviceNotAvailableException

設置構建

public void setBuild (IBuildInfo buildInfo)

參數
buildInfo IBuildInfo