SandboxedInvocationExecution

public class SandboxedInvocationExecution
extends InvocationExecution

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


调用的特殊沙盒执行:这是我们 运行此命令build 应已存在于上下文中。

摘要

公共构造函数

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 收集日志。

公共构造函数

SandboxedInvocationExecution

public SandboxedInvocationExecution ()

公共方法

cleanUpBuild

public void cleanUpBuilds (IInvocationContext context, 
                IConfiguration config)

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

参数
context IInvocationContext:调用的 IInvocationContext

config IConfiguration:此测试运行的 IConfiguration

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 如果我们成功下载了构建,则为 true,否则为 false。

抛出
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

受保护的方法

getPreparersToRun

protected  getPreparersToRun (IConfiguration config, 
                String deviceName)

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

在沙盒类中被替换,以限制实验准备器在沙盒内运行 孩子

参数
config IConfiguration

deviceName String

返回

logHostAdb

protected void logHostAdb (IConfiguration config, 
                ITestLogger logger)

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

参数
config IConfiguration

logger ITestLogger