ExecutableTargetTest
public
class
ExecutableTargetTest
extends ExecutableBaseTest
implements
IDeviceTest
| java.lang.Object | ||
| ↳ | com.android.tradefed.testtype.binary.ExecutableBaseTest | |
| ↳ | com.android.tradefed.testtype.binary.ExecutableTargetTest | |
測試執行器,用於在目標上執行的可執行檔。由於二進位檔會在裝置上執行,因此執行器會實作 IDeviceTest。
摘要
常數 | |
|---|---|
String |
DEVICE_LOST_ERROR
|
String |
ROOT_LOST_ERROR
|
公用建構函式 | |
|---|---|
ExecutableTargetTest()
|
|
公用方法 | |
|---|---|
String
|
findBinary(String binary)
搜尋二進位檔,以便執行。 |
boolean
|
getCollectTestsOnly()
|
ITestDevice
|
getDevice()
取得受測裝置。 |
void
|
runBinary(String binaryPath, ITestInvocationListener listener, TestDescription description)
實際執行指定路徑的二進位檔。 |
void
|
setDevice(ITestDevice device)
注入受測裝置。 |
FailureDescription
|
shouldAbortRun(TestDescription description)
檢查 testRun 是否應提早結束。 |
受保護的方法 | |
|---|---|
void
|
checkCommandResult(CommandResult result, ITestInvocationListener listener, TestDescription description)
檢查測試指令的結果。 |
boolean
|
doesRunBinaryGenerateTestResults()
|
boolean
|
doesRunBinaryGenerateTestRuns()
|
boolean
|
getSkipBinaryCheck()
|
常數
DEVICE_LOST_ERROR
public static final String DEVICE_LOST_ERROR
常數值: 「Device was lost prior to %s; aborting run.」
ROOT_LOST_ERROR
public static final String ROOT_LOST_ERROR
常數值: 「Root access was lost prior to %s; aborting run.」
公用建構函式
ExecutableTargetTest
public ExecutableTargetTest ()
公用方法
findBinary
public String findBinary (String binary)
搜尋二進位檔,以便執行。
| 參數 | |
|---|---|
binary |
String:二進位檔的路徑或二進位檔名稱。 |
| 傳回 | |
|---|---|
String |
二進位檔的路徑,如果找不到則為空值。 |
| 擲回 | |
|---|---|
DeviceNotAvailableException |
|
getCollectTestsOnly
public boolean getCollectTestsOnly ()
| 傳回 | |
|---|---|
boolean |
|
runBinary
public void runBinary (String binaryPath,
ITestInvocationListener listener,
TestDescription description)在指定路徑實際執行二進位檔。
| 參數 | |
|---|---|
binaryPath |
String:二進位檔的路徑。 |
listener |
ITestInvocationListener:要回報結果的接聽程式。 |
description |
TestDescription:測試正在進行中。 |
| 擲回 | |
|---|---|
DeviceNotAvailableException |
|
shouldAbortRun
public FailureDescription shouldAbortRun (TestDescription description)
檢查 testRun 是否應提早結束。
| 參數 | |
|---|---|
description |
TestDescription:測試正在進行中。 |
| 傳回 | |
|---|---|
FailureDescription |
如果執行迴圈應終止,則為 FailureDescription。 |
受保護的方法
checkCommandResult
protected void checkCommandResult (CommandResult result, ITestInvocationListener listener, TestDescription description)
檢查測試指令的結果。
| 參數 | |
|---|---|
result |
CommandResult:指令 CommandResult 的測試結果 |
listener |
ITestInvocationListener:ITestInvocationListener |
description |
TestDescription:測試正在進行中。 |
doesRunBinaryGenerateTestResults
protected boolean doesRunBinaryGenerateTestResults ()
| 傳回 | |
|---|---|
boolean |
|
doesRunBinaryGenerateTestRuns
protected boolean doesRunBinaryGenerateTestRuns ()
| 傳回 | |
|---|---|
boolean |
|
getSkipBinaryCheck
protected boolean getSkipBinaryCheck ()
| 傳回 | |
|---|---|
boolean |
|