沙盒调用执行

public class SandboxedInvocationExecution
extends InvocationExecution

java.lang.Object
com.android.tradefed.invoker.InitationExecution
com.android.tradefed.invoker.sandbox.SandboxedInitationExecution


调用的特殊沙箱执行:这是当我们在沙箱内运行命令时的 InvocationExection。该构建应该已经在上下文中可用。

概括

公共构造函数

SandboxedInvocationExecution ()

公共方法

void cleanUpBuilds (IInvocationContext context, IConfiguration config)

执行 build_provider 清理步骤。

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

执行调用的 build_provider 步骤。

void runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception)

为调用的每个设备部分调用ITestDevice#postInvocationTearDown(Throwable)

void runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger)

为调用的每个设备部分调用ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo))

受保护的方法

getPreparersToRun ( IConfiguration config, String deviceName)

检索要在此设备上运行的准备器列表。

void logHostAdb ( IConfiguration config, ITestLogger logger)

从 $TMPDIR/adb.$UID.log 收集日志。

公共构造函数

沙盒调用执行

public SandboxedInvocationExecution ()

公共方法

清理构建

public void cleanUpBuilds (IInvocationContext context, 
                IConfiguration config)

执行 build_provider 清理步骤。与构建获取相关。

参数
context IInvocationContext :调用的IInvocationContext

config IConfiguration :本次测试运行的IConfiguration

获取构建

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

执行调用的 build_provider 步骤。

参数
testInfo TestInformation :调用的TestInformation

config IConfiguration :本次测试运行的IConfiguration

rescheduler IReschedulerIRescheduler ,用于重新安排调用的部分以便在另一个资源上执行

listener ITestInvocationListener :报告构建下载失败的ITestInvocation

退货
boolean如果我们成功下载了构建版本,则为 true,否则为 false。

投掷
BuildRetrievalError
DeviceNotAvailableException

runDevicePostInspirationTearDown

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

为调用的每个设备部分调用ITestDevice#postInvocationTearDown(Throwable)

参数
context IInvocationContext :调用的IInvocationContext

config IConfiguration :本次测试运行的IConfiguration

exception Throwable :测试运行时抛出的原始异常(如果有)。

运行设备预调用设置

public void runDevicePreInvocationSetup (IInvocationContext context, 
                IConfiguration config, 
                ITestLogger logger)

为调用的每个设备部分调用ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo))

参数
context IInvocationContext :调用的IInvocationContext

config IConfiguration :本次测试运行的IConfiguration

logger ITestLogger :报告日志的ITestLogger

投掷
DeviceNotAvailableException
TargetSetupError

受保护的方法

获取准备运行

protected  getPreparersToRun (IConfiguration config, 
                String deviceName)

检索要在此设备上运行的准备器列表。

在沙箱类中重写,以限制实验室准备者在沙箱子项内运行

参数
config IConfiguration

deviceName String

退货

日志主机Adb

protected void logHostAdb (IConfiguration config, 
                ITestLogger logger)

从 $TMPDIR/adb.$UID.log 收集日志。

参数
config IConfiguration

logger ITestLogger