可執行目標測試

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