主机测试
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 |