VersionedTfLauncher

public class VersionedTfLauncher
extends SubprocessTfLauncher implements IMultiDeviceTest, IStrictShardableTest

java.lang.Object
   ↳ com.android.tradefed.testtype.SubprocessTfLauncher
     ↳ com.android.tradefed.testtype.VersionedTfLauncher


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

Public constructors

VersionedTfLauncher()

Public methods

IRemoteTest getTestShard(int shardCount, int shardIndex)

Returns a IRemoteTest for a single shard.

void setDeviceInfos(Map<ITestDeviceIBuildInfo> deviceInfos)

Protected methods

void preRun()

Setup before running the test.

The method tokenizes the command line arguments specified by --tf-command-line, and appends the arguments to the subprocess of TF run.

Public constructors

VersionedTfLauncher

VersionedTfLauncher ()

Public methods

getTestShard

IRemoteTest getTestShard (int shardCount, 
                int shardIndex)

Returns a IRemoteTest for a single shard. This must be deterministic and always return the same IRemoteTest for the same input.

Parameters
shardCount int: the number of total shards

shardIndex int: the index of a test shard to return. The value is in range [0, shardCount).

Returns
IRemoteTest a IRemoteTest

setDeviceInfos

void setDeviceInfos (Map<ITestDeviceIBuildInfo> deviceInfos)

Parameters
deviceInfos Map

Protected methods

preRun

void preRun ()

Setup before running the test.

The method tokenizes the command line arguments specified by --tf-command-line, and appends the arguments to the subprocess of TF run. It also passes in the serial of the test device through --serial option, to force the subprocess to use the device selected by the parent TF process.