沙盒调用执行
public class SandboxedInvocationExecution
extends InvocationExecution
对象 | ||
↳ | 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) 调用 |
void | runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger) |
受保护的方法 | |
---|---|
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 | IRescheduler :所述IRescheduler ,用于在另一资源上重新调度的调用来执行的部分(S) |
listener | ITestInvocationListener :在ITestInvocation 到报告生成下载失败。 |
退货 | |
---|---|
boolean | 如果我们成功下载了构建,则为 true,否则为 false。 |
投掷 | |
---|---|
BuildRetrievalError | |
DeviceNotAvailableException |
运行DevicePostInvocationTearDown
public void runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception)
调用ITestDevice#postInvocationTearDown(Throwable)
用于调用每个设备的一部分。
参数 | |
---|---|
context | IInvocationContext :在IInvocationContext 调用的。 |
config | IConfiguration :在IConfiguration 此试运行。 |
exception | Throwable :原始异常由试运行,如果任何异常。 |
运行DevicePreInvocationSetup
public void runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger)
参数 | |
---|---|
context | IInvocationContext :在IInvocationContext 调用的。 |
config | IConfiguration :在IConfiguration 此试运行。 |
logger | ITestLogger :在ITestLogger 报告日志。 |
投掷 | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
受保护的方法
getPreparersToRun
protectedgetPreparersToRun (IConfiguration config, String deviceName)
检索要在此设备上运行的准备程序列表。
在沙盒类中重写以限制实验室准备者在沙盒子类中运行
参数 | |
---|---|
config | IConfiguration |
deviceName | String |
退货 | |
---|---|
日志主机Adb
protected void logHostAdb (IConfiguration config, ITestLogger logger)
从 $TMPDIR/adb.$UID.log 收集日志。
参数 | |
---|---|
config | IConfiguration |
logger | ITestLogger |