远程调用执行
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 |