SubprocessTfLauncher

public abstract class SubprocessTfLauncher
extends Object implements IBuildReceiver, IInvocationContextReceiver, IRemoteTest

java.lang.Object
   ↳ com.android.tradefed.testtype.SubprocessTfLauncher
Known Direct Subclasses
TfTestLauncher A IRemoteTest for running unit or functional tests against a separate TF installation. 
VersionedTfLauncher A IRemoteTest for running tests against a separate TF installation. 


A IRemoteTest for running tests against a separate TF installation.

Launches an external java process to run the tests. Used for running the TF unit or functional tests continuously.

Summary

Constants

String TF_GLOBAL_CONFIG

Fields

protected IBuildInfo mBuildInfo

protected List<String> mCmdArgs

protected String mRootDir

protected IRunUtil mRunUtil

protected File mTmpDir

Public constructors

SubprocessTfLauncher()

Public methods

void run(ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

void setBuild(IBuildInfo buildInfo)

void setInvocationContext(IInvocationContext invocationContext)

Protected methods

void addJavaArguments(List<String> args)

Allow to add extra java parameters to the subprocess invocation.

void postRun(ITestInvocationListener listener, boolean exception)

Actions to take after the TF test is finished.

void preRun()

Setup before running the test.

void setEventStreaming(boolean eventStreaming)

Set use-event-streaming.

void setRunUtil(IRunUtil runUtil)

Set IRunUtil.

Constants

TF_GLOBAL_CONFIG

String TF_GLOBAL_CONFIG

Constant Value: "TF_GLOBAL_CONFIG"

Fields

mBuildInfo

IBuildInfo mBuildInfo

mCmdArgs

List<String> mCmdArgs

mRootDir

String mRootDir

mRunUtil

IRunUtil mRunUtil

mTmpDir

File mTmpDir

Public constructors

SubprocessTfLauncher

SubprocessTfLauncher ()

Public methods

run

void run (ITestInvocationListener listener)

Runs the tests, and reports result to the listener.

Parameters
listener ITestInvocationListener: the ITestInvocationListener of test results

setBuild

void setBuild (IBuildInfo buildInfo)

Parameters
buildInfo IBuildInfo

setInvocationContext

void setInvocationContext (IInvocationContext invocationContext)

Parameters
invocationContext IInvocationContext

Protected methods

addJavaArguments

void addJavaArguments (List<String> args)

Allow to add extra java parameters to the subprocess invocation.

Parameters
args List: the current list of arguments to which we need to add the extra ones.

postRun

void postRun (ITestInvocationListener listener, 
                boolean exception)

Actions to take after the TF test is finished.

Parameters
listener ITestInvocationListener: the original ITestInvocationListener where to report results.
exception boolean: True if exception was raised inside the test.

preRun

void preRun ()

Setup before running the test.

setEventStreaming

void setEventStreaming (boolean eventStreaming)

Set use-event-streaming. Exposed for unit testing.

Parameters
eventStreaming boolean

setRunUtil

void setRunUtil (IRunUtil runUtil)

Set IRunUtil. Exposed for unit testing.

Parameters
runUtil IRunUtil