主機G測試
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) |
公共構造函數
主機G測試
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 |