RemoteInvocationExecution

public class RemoteInvocationExecution
extends InvocationExecution

java.lang.Object
   ↳ com.android.tradefed.invoker.InvocationExecution
     ↳ com.android.tradefed.invoker.RemoteInvocationExecution


Implementation of InvocationExecution that drives a remote execution.

Summary

Nested classes

class RemoteInvocationExecution.FileOptionValueTransformer

 

Constants

long JOIN_CLEAN_TIMEOUT_MS

long LAUNCH_EXTRA_DEVICE

long NEW_USER_TIMEOUT

long PULL_RESULT_TIMEOUT

long PUSH_TF_TIMEOUT

long REMOTE_PROCESS_RUNNING_WAIT

long SETUP_REMOTE_DIR_TIMEOUT

Fields

public static final String GLOBAL_REMOTE_CONFIG

public static final String PROTO_RESULT_NAME

public static final String REMOTE_CONFIG

public static final String REMOTE_USER_DIR

public static final String START_FEATURE_SERVER

public static final String STDERR_FILE

public static final String STDOUT_FILE

Public constructors

RemoteInvocationExecution()

Public methods

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

Execute the target_preparer and multi_target_preparer cleanUp step.

void doSetup(TestInformation testInfo, IConfiguration config, ITestLogger logger)

Execute the target_preparer and multi_target_preparer setUp step.

void doTeardown(TestInformation testInfo, IConfiguration config, ITestLogger logger, Throwable exception)

Execute the target_preparer and multi_target_preparer teardown step.

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

Execute the build_provider step of the invocation.

void runTests(TestInformation info, IConfiguration config, ITestInvocationListener listener)

Runs the test.

Protected methods

void customizeDevicePreInvocation(IConfiguration config, IInvocationContext context)

Give a chance to customize some of the device before preInvocationSetup.

String getAdbVersion()

Returns the adb version in use for the invocation.

Constants

JOIN_CLEAN_TIMEOUT_MS

public static final long JOIN_CLEAN_TIMEOUT_MS

Constant Value: 120000 (0x000000000001d4c0)

LAUNCH_EXTRA_DEVICE

public static final long LAUNCH_EXTRA_DEVICE

Constant Value: 900000 (0x00000000000dbba0)

NEW_USER_TIMEOUT

public static final long NEW_USER_TIMEOUT

Constant Value: 300000 (0x00000000000493e0)

PULL_RESULT_TIMEOUT

public static final long PULL_RESULT_TIMEOUT

Constant Value: 180000 (0x000000000002bf20)

PUSH_TF_TIMEOUT

public static final long PUSH_TF_TIMEOUT

Constant Value: 150000 (0x00000000000249f0)

REMOTE_PROCESS_RUNNING_WAIT

public static final long REMOTE_PROCESS_RUNNING_WAIT

Constant Value: 15000 (0x0000000000003a98)

SETUP_REMOTE_DIR_TIMEOUT

public static final long SETUP_REMOTE_DIR_TIMEOUT

Constant Value: 600000 (0x00000000000927c0)

Fields

GLOBAL_REMOTE_CONFIG

public static final String GLOBAL_REMOTE_CONFIG

PROTO_RESULT_NAME

public static final String PROTO_RESULT_NAME

REMOTE_CONFIG

public static final String REMOTE_CONFIG

REMOTE_USER_DIR

public static final String REMOTE_USER_DIR

START_FEATURE_SERVER

public static final String START_FEATURE_SERVER

STDERR_FILE

public static final String STDERR_FILE

STDOUT_FILE

public static final String STDOUT_FILE

Public constructors

RemoteInvocationExecution

public RemoteInvocationExecution ()

Public methods

doCleanUp

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

Execute the target_preparer and multi_target_preparer cleanUp step. Does the devices clean up.

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.

doSetup

public void doSetup (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger)

Execute the target_preparer and multi_target_preparer setUp step. Does all the devices setup required for the test to run.

Parameters
testInfo TestInformation: the TestInformation of the invocation.

config IConfiguration: the IConfiguration of this test run.

logger ITestLogger: the ITestLogger to report setup failures logs.

Throws
BuildError
DeviceNotAvailableException
TargetSetupError

doTeardown

public void doTeardown (TestInformation testInfo, 
                IConfiguration config, 
                ITestLogger logger, 
                Throwable exception)

Execute the target_preparer and multi_target_preparer teardown step. Does the devices tear down associated with the setup.

Parameters
testInfo TestInformation: the TestInformation of the invocation.

config IConfiguration: the IConfiguration of this test run.

logger ITestLogger: the ITestLogger to report logs.

exception Throwable: the original exception thrown by the test running.

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

runTests

public void runTests (TestInformation info, 
                IConfiguration config, 
                ITestInvocationListener listener)

Runs the test.

Parameters
info TestInformation: the TestInformation to run tests with.

config IConfiguration: the IConfiguration to run

listener ITestInvocationListener: the ITestInvocationListener of test results

Protected methods

customizeDevicePreInvocation

protected void customizeDevicePreInvocation (IConfiguration config, 
                IInvocationContext context)

Give a chance to customize some of the device before preInvocationSetup.

Parameters
config IConfiguration: The config of the invocation.

context IInvocationContext: The current invocation context.

getAdbVersion

protected String getAdbVersion ()

Returns the adb version in use for the invocation.

Returns
String