可執行主機測試
public class ExecutableHostTest
extends ExecutableBaseTest
java.lang.Object | ||
↳ | com.android.tradefed.testtype.binary.ExecutableBaseTest | |
↳ | com.android.tradefed.testtype.binary.ExecutableHostTest |
測試運行程式以在主機上執行可執行檔。由於主機二進位檔案可能與裝置通信,因此執行程式實作了IDeviceTest
。如果接收到的裝置不是StubDevice
,則序號將傳遞給要使用的二進位檔案。
概括
公共構造函數 | |
---|---|
ExecutableHostTest () |
公共方法 | |
---|---|
String | findBinary (String binary) 搜尋二進位檔案以便能夠運行它。 |
void | runBinary (String binaryPath, ITestInvocationListener listener, TestDescription description) 實際上在給定路徑上運行二進位檔案。 |
公共構造函數
可執行主機測試
public ExecutableHostTest ()
公共方法
尋找二進位文件
public String findBinary (String binary)
搜尋二進位檔案以便能夠運行它。
參數 | |
---|---|
binary | String :二進位檔案的路徑或簡單的二進位檔案名稱。 |
退貨 | |
---|---|
String | 二進位檔案的路徑,如果未找到則為 null。 |
運行二進位文件
public void runBinary (String binaryPath, ITestInvocationListener listener, TestDescription description)
實際上在給定路徑上運行二進位檔案。
參數 | |
---|---|
binaryPath | String :二進位檔案的路徑。 |
listener | ITestInvocationListener :報告結果的偵聽器。 |
description | TestDescription :測試正在進行中。 |
投擲 | |
---|---|
DeviceNotAvailableException |