遠程調用執行
public class RemoteInvocationExecution
extends InvocationExecution
對象 | ||
↳ | com.android.tradefed.invoker.InvocationExecution | |
↳ | com.android.tradefed.invoker.RemoteInvocationExecution |
實施InvocationExecution
驅動一個遠程執行。
概括
常數 | |
---|---|
long | JOIN_CLEAN_TIMEOUT_MS |
long | LAUNCH_EXTRA_DEVICE |
long | NEW_USER_TIMEOUT |
long | PULL_RESULT_TIMEOUT |
long | PUSH_TF_TIMEOUT |
long | REMOTE_PROCESS_RUNNING_WAIT |
long | SETUP_REMOTE_DIR_TIMEOUT
|
字段 | |
---|---|
public static final String | GLOBAL_REMOTE_CONFIG |
public static final String | PROTO_RESULT_NAME |
public static final String | REMOTE_CONFIG |
public static final String | REMOTE_USER_DIR |
public static final String | START_FEATURE_SERVER |
public static final String | STDERR_FILE |
public static final String | STDOUT_FILE
|
公共構造函數 | |
---|---|
RemoteInvocationExecution () |
公共方法 | |
---|---|
void | doCleanUp (IInvocationContext context, IConfiguration config, Throwable exception) 執行 target_preparer 和 multi_target_preparer 清理步驟。 |
void | doSetup (TestInformation testInfo, IConfiguration config, ITestLogger logger) 執行 target_preparer 和 multi_target_preparer 設置步驟。 |
void | doTeardown (TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception) 執行 target_preparer 和 multi_target_preparer 拆卸步驟。 |
boolean | fetchBuild (TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener) 執行調用的 build_provider 步驟。 |
void | runTests (TestInformation info, IConfiguration config, ITestInvocationListener listener) 運行測試。 |
受保護的方法 | |
---|---|
void | customizeDevicePreInvocation ( IConfiguration config, IInvocationContext context) 在 preInvocationSetup 之前給一些自定義設備的機會。 |
String | getAdbVersion () 返回用於調用的 adb 版本。 |
常數
JOIN_CLEAN_TIMEOUT_MS
public static final long JOIN_CLEAN_TIMEOUT_MS
常數值:120000 (0x000000000001d4c0)
LAUNCH_EXTRA_DEVICE
public static final long LAUNCH_EXTRA_DEVICE
常數值:900000 (0x00000000000dbba0)
NEW_USER_TIMEOUT
public static final long NEW_USER_TIMEOUT
常數值:300000 (0x00000000000493e0)
PULL_RESULT_TIMEOUT
public static final long PULL_RESULT_TIMEOUT
常數值:180000 (0x000000000002bf20)
PUSH_TF_TIMEOUT
public static final long PUSH_TF_TIMEOUT
常數值:150000 (0x00000000000249f0)
REMOTE_PROCESS_RUNNING_WAIT
public static final long REMOTE_PROCESS_RUNNING_WAIT
常數值:15000 (0x0000000000003a98)
SETUP_REMOTE_DIR_TIMEOUT
public static final long SETUP_REMOTE_DIR_TIMEOUT
常數值:600000 (0x00000000000927c0)
字段
GLOBAL_REMOTE_CONFIG
public static final String GLOBAL_REMOTE_CONFIG
PROTO_RESULT_NAME
public static final String PROTO_RESULT_NAME
REMOTE_CONFIG
public static final String REMOTE_CONFIG
REMOTE_USER_DIR
public static final String REMOTE_USER_DIR
START_FEATURE_SERVER
public static final String START_FEATURE_SERVER
STDERR_FILE
public static final String STDERR_FILE
標準輸出文件
public static final String STDOUT_FILE
公共構造函數
遠程調用執行
public RemoteInvocationExecution ()
公共方法
清理
public void doCleanUp (IInvocationContext context, IConfiguration config, Throwable exception)
執行 target_preparer 和 multi_target_preparer 清理步驟。設備是否清理。
參數 | |
---|---|
context | IInvocationContext :在IInvocationContext 調用的。 |
config | IConfiguration :在IConfiguration 此試運行。 |
exception | Throwable :原始異常由試運行拋出。 |
設置
public void doSetup (TestInformation testInfo, IConfiguration config, ITestLogger logger)
執行 target_preparer 和 multi_target_preparer 設置步驟。是否設置了測試運行所需的所有設備。
參數 | |
---|---|
testInfo | TestInformation :在TestInformation 調用的。 |
config | IConfiguration :在IConfiguration 此試運行。 |
logger | ITestLogger :在ITestLogger 報告建立故障日誌。 |
投擲 | |
---|---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError |
拆解
public void doTeardown (TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)
執行 target_preparer 和 multi_target_preparer 拆卸步驟。設備是否與設置相關聯。
參數 | |
---|---|
testInfo | TestInformation :在TestInformation 調用的。 |
config | IConfiguration :在IConfiguration 此試運行。 |
logger | ITestLogger :在ITestLogger 報告日誌。 |
exception | Throwable :原始異常由試運行拋出。 |
獲取構建
public boolean fetchBuild (TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
執行調用的 build_provider 步驟。
參數 | |
---|---|
testInfo | TestInformation :在TestInformation 調用的。 |
config | IConfiguration :在IConfiguration 此試運行。 |
rescheduler | IRescheduler :所述IRescheduler ,用於在另一資源上重新調度的調用來執行的部分(S) |
listener | ITestInvocationListener :在ITestInvocation 到報告生成下載失敗。 |
退貨 | |
---|---|
boolean | 如果我們成功下載了構建,則為 true,否則為 false。 |
投擲 | |
---|---|
BuildRetrievalError | |
DeviceNotAvailableException |
運行測試
public void runTests (TestInformation info, IConfiguration config, ITestInvocationListener listener)
運行測試。
參數 | |
---|---|
info | TestInformation :在TestInformation 與運行測試。 |
config | IConfiguration :在IConfiguration 來運行 |
listener | ITestInvocationListener :在ITestInvocationListener 測試結果 |
受保護的方法
自定義設備預調用
protected void customizeDevicePreInvocation (IConfiguration config, IInvocationContext context)
在 preInvocationSetup 之前給一些自定義設備的機會。
參數 | |
---|---|
config | IConfiguration :調用的配置。 |
context | IInvocationContext :當前調用上下文。 |
獲取Adb版本
protected String getAdbVersion ()
返回用於調用的 adb 版本。
退貨 | |
---|---|
String |