可执行目标测试

public class ExecutableTargetTest
extends ExecutableBaseTest implements IDeviceTest

java.lang.Object
com.android.tradefed.testtype.binary.ExecutableBaseTest
com.android.tradefed.testtype.binary.ExecutableTargetTest


测试运行程序以在目标上运行可执行文件。由于二进制文件在设备上运行,因此运行程序实现了IDeviceTest

概括

公共构造函数

ExecutableTargetTest ()

公共方法

String findBinary (String binary)

搜索二进制文件以便能够运行它。

ITestDevice getDevice ()

获取被测设备。

void runBinary (String binaryPath, ITestInvocationListener listener, TestDescription description)

实际上在给定路径上运行二进制文件。

void setDevice ( ITestDevice device)

注入被测设备。

受保护的方法

void checkCommandResult ( CommandResult result, ITestInvocationListener listener, TestDescription description)

检查测试命令的结果。

boolean getSkipBinaryCheck ()

公共构造函数

可执行目标测试

public ExecutableTargetTest ()

公共方法

查找二进制文件

public String findBinary (String binary)

搜索二进制文件以便能够运行它。

参数
binary String :二进制文件的路径或简单的二进制文件名称。

退货
String二进制文件的路径,如果未找到则为 null。

投掷
DeviceNotAvailableException

获取设备

public ITestDevice getDevice ()

获取被测设备。

退货
ITestDevice ITestDevice

运行二进制文件

public void runBinary (String binaryPath, 
                ITestInvocationListener listener, 
                TestDescription description)

实际上在给定路径上运行二进制文件。

参数
binaryPath String :二进制文件的路径。

listener ITestInvocationListener :报告结果的侦听器。

description TestDescription :测试正在进行中。

投掷
DeviceNotAvailableException

设置设备

public void setDevice (ITestDevice device)

注入被测设备。

参数
device ITestDevice :要使用的ITestDevice

受保护的方法

检查命令结果

protected void checkCommandResult (CommandResult result, 
                ITestInvocationListener listener, 
                TestDescription description)

检查测试命令的结果。

参数
result CommandResult : 命令CommandResult的测试结果

listener ITestInvocationListenerITestInvocationListener

description TestDescription :测试正在进行中。

获取跳过二进制检查

protected boolean getSkipBinaryCheck ()

退货
boolean