RemoteTestTimeOutEnforcer

public class RemoteTestTimeOutEnforcer
extends ResultAndLogForwarder

java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.result.ResultAndLogForwarder
       ↳ com.android.tradefed.testtype.suite.RemoteTestTimeOutEnforcer


Listeners that allows to check the execution time of a given test config and fail it if it goes over a given timeout.

Note that this enforcer doesn't interrupt the tests, but will make them fail.

Summary

Constants

String REMOTE_TEST_TIMEOUT_DESCRIPTION

String REMOTE_TEST_TIMEOUT_OPTION

Public constructors

RemoteTestTimeOutEnforcer( allListeners, ModuleDefinition moduleDefinition, IRemoteTest test, Duration timeOut)

Create the RemoteTestTimeOutEnforcer with the given timeout to enforce.

Public methods

void setGranularListener(ModuleListener listener)
void testRunEnded(long elapsedTime, runMetrics)

Reports end of test run.

Constants

REMOTE_TEST_TIMEOUT_DESCRIPTION

public static final String REMOTE_TEST_TIMEOUT_DESCRIPTION

Constant Value: "The timeout that will be applied to each remote test object of the run."

REMOTE_TEST_TIMEOUT_OPTION

public static final String REMOTE_TEST_TIMEOUT_OPTION

Constant Value: "remote-test-timeout"

Public constructors

RemoteTestTimeOutEnforcer

public RemoteTestTimeOutEnforcer ( allListeners, 
                ModuleDefinition moduleDefinition, 
                IRemoteTest test, 
                Duration timeOut)

Create the RemoteTestTimeOutEnforcer with the given timeout to enforce.

Parameters
allListeners

moduleDefinition ModuleDefinition: The ModuleDefinition of the test module to be executed.

test IRemoteTest: The IRemoteTest to be executed.

timeOut Duration: The ERROR(/Duration) of the time out per test run.

Public methods

setGranularListener

public void setGranularListener (ModuleListener listener)

Parameters
listener ModuleListener

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Reports end of test run.

Parameters
elapsedTime long: device reported elapsed time, in milliseconds

runMetrics : key-value pairs reported at the end of a test run