RemoteInvocationExecution

public class RemoteInvocationExecution
extends InvocationExecution

java.lang.Object
   ↳ com.android.tradefed.invoker.InvocationExecution
     ↳ com.android.tradefed.invoker.RemoteInvocationExecution


用于驱动远程执行的 InvocationExecution 实现。

摘要

嵌套的类

class RemoteInvocationExecution.FileOptionValueTransformer

 

常量

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 cleanUp 步骤。

void doSetup(TestInformation testInfo, IConfiguration config, ITestLogger logger)

执行 target_preparer 和 multi_target_preparer setUp 步骤。

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

STDOUT_FILE

public static final String STDOUT_FILE

公共构造函数

RemoteInvocationExecution

public RemoteInvocationExecution ()

公共方法

doCleanUp

public void doCleanUp (IInvocationContext context, 
                IConfiguration config, 
                Throwable exception)

执行 target_preparer 和 multi_target_preparer cleanUp 步骤。设备是否已清理。

参数
context IInvocationContext:调用的 IInvocationContext

config IConfiguration:此测试运行的 IConfiguration

exception Throwable:测试运行时抛出的原始异常。

doSetup

public void doSetup (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger)

执行 target_preparer 和 multi_target_preparer setUp 步骤。是否已完成运行测试所需的所有设备设置。

参数
testInfo TestInformation:调用的 TestInformation

config IConfiguration:此测试运行的 IConfiguration

logger ITestLogger:用于报告设置失败日志的 ITestLogger

抛出
BuildError
DeviceNotAvailableException
TargetSetupError

doTeardown

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:测试运行时抛出的原始异常。

fetchBuild

public boolean fetchBuild (TestInformation testInfo, 
                IConfiguration config, 
                IRescheduler rescheduler, 
                ITestInvocationListener listener)

执行调用的 build_provider 步骤。

参数
testInfo TestInformation:调用的 TestInformation

config IConfiguration:此测试运行的 IConfiguration

rescheduler IReschedulerIRescheduler,用于重新调度调用的部分,以便在其他资源上执行

listener ITestInvocationListener:用于报告 build 下载失败的 ITestInvocation

返回
boolean 如果成功下载 build,则为 true;否则为 false。

抛出
BuildRetrievalError
DeviceNotAvailableException

runTests

public void runTests (TestInformation info, 
                IConfiguration config, 
                ITestInvocationListener listener)

运行测试。

参数
info TestInformation:用于运行测试的 TestInformation

config IConfiguration:要运行的 IConfiguration

listener ITestInvocationListener:测试结果的 ITestInvocationListener

受保护的方法

customizeDevicePreInvocation

protected void customizeDevicePreInvocation (IConfiguration config, 
                IInvocationContext context)

在 preInvocationSetup 之前,提供自定义部分设备的机会。

参数
config IConfiguration:调用的配置。

context IInvocationContext:当前调用上下文。

getAdbVersion

protected String getAdbVersion ()

返回调用所用的 adb 版本。

返回
String