沙盒调用执行

public class SandboxedInvocationExecution
extends InvocationExecution

java.lang.Object
com.android.tradefed.invoker.InvocationExecution
com.android.tradefed.invoker.sandbox.SandboxedInvocationExecution


调用的特殊沙箱执行:这是当我们在沙箱内运行命令时的 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))

受保护的方法

getLabPreparersToRun ( IConfiguration config, String deviceName)

检索要在此设备上运行的实验室准备者列表。

getTargetPreparersToRun ( 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如果我们成功下载构建,则为真,否则为假。

投掷
BuildRetrievalError
DeviceNotAvailableException

runDevicePostInvocationTearDown

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

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

参数
context IInvocationContext :调用的IInvocationContext

config IConfiguration :本次测试运行的IConfiguration

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

runDevicePreInvocationSetup

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

受保护的方法

getLabPreparersToRun

protected  getLabPreparersToRun (IConfiguration config, 
                String deviceName)

检索要在此设备上运行的实验室准备者列表。

在沙盒类中覆盖以限制实验室准备者在沙盒子类中运行

参数
config IConfiguration

deviceName String

退货

getTargetPreparersToRun

protected  getTargetPreparersToRun (IConfiguration config, 
                String deviceName)

检索要在此设备上运行的目标准备程序列表。

在沙盒类中覆盖以限制实验室准备者在沙盒子类中运行

参数
config IConfiguration

deviceName String

退货

logHostAdb

protected void logHostAdb (IConfiguration config, 
                ITestLogger logger)

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

参数
config IConfiguration

logger ITestLogger