SandboxedInvocationExecution
public
class
SandboxedInvocationExecution
extends InvocationExecution
java.lang.Object | ||
↳ | com.android.tradefed.invoker.InvocationExecution | |
↳ | com.android.tradefed.invoker.sandbox.SandboxedInvocationExecution |
Special sandbox execution of the invocation: This is the InvocationExection for when we are inside the sandbox running the command. The build should already be available in the context.
Summary
Public constructors | |
---|---|
SandboxedInvocationExecution()
|
Public methods | |
---|---|
void
|
cleanUpBuilds(IInvocationContext context, IConfiguration config)
Execute the build_provider clean up step. |
boolean
|
fetchBuild(TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
Execute the build_provider step of the invocation. |
void
|
runDevicePostInvocationTearDown(IInvocationContext context, IConfiguration config, Throwable exception)
Invoke the |
void
|
runDevicePreInvocationSetup(IInvocationContext context, IConfiguration config, ITestLogger logger)
Invoke the |
Protected methods | |
---|---|
|
getPreparersToRun(IConfiguration config, String deviceName)
Retrieve a list of preparers to run on this device. |
void
|
logHostAdb(IConfiguration config, ITestLogger logger)
Collect the logs from $TMPDIR/adb.$UID.log. |
Public constructors
SandboxedInvocationExecution
public SandboxedInvocationExecution ()
Public methods
cleanUpBuilds
public void cleanUpBuilds (IInvocationContext context, IConfiguration config)
Execute the build_provider clean up step. Associated with the build fetching.
Parameters | |
---|---|
context |
IInvocationContext : the IInvocationContext of the invocation. |
config |
IConfiguration : the IConfiguration of this test run.
|
fetchBuild
public boolean fetchBuild (TestInformation testInfo, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener listener)
Execute the build_provider step of the invocation.
Parameters | |
---|---|
testInfo |
TestInformation : the TestInformation of the invocation. |
config |
IConfiguration : the IConfiguration of this test run. |
rescheduler |
IRescheduler : the IRescheduler , for rescheduling portions of the invocation for
execution on another resource(s) |
listener |
ITestInvocationListener : the ITestInvocation to report build download failures. |
Returns | |
---|---|
boolean |
True if we successfully downloaded the build, false otherwise. |
Throws | |
---|---|
BuildRetrievalError |
|
DeviceNotAvailableException |
runDevicePostInvocationTearDown
public void runDevicePostInvocationTearDown (IInvocationContext context, IConfiguration config, Throwable exception)
Invoke the ITestDevice#postInvocationTearDown(Throwable)
for each device part of the
invocation.
Parameters | |
---|---|
context |
IInvocationContext : the IInvocationContext of the invocation. |
config |
IConfiguration : the IConfiguration of this test run. |
exception |
Throwable : the original exception thrown by the test running if any.
|
runDevicePreInvocationSetup
public void runDevicePreInvocationSetup (IInvocationContext context, IConfiguration config, ITestLogger logger)
Invoke the ERROR(ITestDevice#preInvocationSetup(IBuildInfo)/com.android.tradefed.device.ITestDevice#preInvocationSetup(com.android.tradefed.build.IBuildInfo) ITestDevice#preInvocationSetup(IBuildInfo))
for each device part of the
invocation.
Parameters | |
---|---|
context |
IInvocationContext : the IInvocationContext of the invocation. |
config |
IConfiguration : the IConfiguration of this test run. |
logger |
ITestLogger : the ITestLogger to report logs. |
Throws | |
---|---|
DeviceNotAvailableException |
|
TargetSetupError |
Protected methods
getPreparersToRun
protectedgetPreparersToRun (IConfiguration config, String deviceName)
Retrieve a list of preparers to run on this device.
Overridden in sandbox classes to restrict lab preparers from being run inside the sandbox child
Parameters | |
---|---|
config |
IConfiguration |
deviceName |
String |
Returns | |
---|---|
|
logHostAdb
protected void logHostAdb (IConfiguration config, ITestLogger logger)
Collect the logs from $TMPDIR/adb.$UID.log.
Parameters | |
---|---|
config |
IConfiguration |
logger |
ITestLogger |