ICommandOptions

public interface ICommandOptions

com.android.tradefed.command.ICommandOptions


Container for execution options for commands.

Summary

Public methods

abstract boolean captureLogcatOnFailure()

Whether or not to capture a logcat on test case failure

abstract boolean captureScreenshotOnFailure()

Whether or not to capture a screenshot on test case failure

abstract ICommandOptions clone()

Creates a copy of the ICommandOptions object.

abstract boolean delegatedEarlyDeviceRelease()

Whether or not to release the device early in delegated mode.

abstract boolean earlyDeviceRelease()

Whether or not to release the device early when done with it.

abstract boolean filterPreviousPassedTests()

Whether or not to filters previous passed test cases from previous attempt.

abstract getAutoLogCollectors()

Returns the set of auto log collectors to be added for an invocation

abstract getDynamicDownloadArgs()

Returns the map of args to pass to the dynamic download query.

abstract getExperimentalFlags()

Returns the experimental flags map, that can be used to feature gate projects.

abstract int getExtraRemotePostsubmitInstance()

Whether or not to start extra instances in the remote VM in postsubmit.

abstract String getHostLogSuffix()

Returns the suffix to append to the Tradefed host_log or null if no prefix.

abstract UniqueMultiMap<String, String> getInvocationData()

Returns the data passed to the invocation to describe it

abstract long getInvocationTimeout()

Return the invocation timeout specified.

abstract File getJdkFolderForSubprocess()

Returns the jdk folder to use when forking execution in a subprocess.

abstract long getLoopTime()

Get the time to wait before re-scheduling this command.

abstract long getMaxLoopCount()

Returns the maximum number of times to scheduled the command.

abstract Integer getMultiDeviceCount()

Return the number of devices for multi-device tests.

abstract boolean getOptimizeMainlineTest()

Returns true if we should optimize the list of test modules for mainline test.

abstract Duration getParallelPreInvocationSetupTimeout()

Return the timeout for parallel pre-invocation setup.

abstract Duration getParallelSetupTimeout()

Returns the timeout to use during parallel setups.

abstract String getRemoteCacheInstanceName()

Returns the name of the instance used to handle remote caching.

abstract getRemoteFiles()

Returns the list of remote files configured.

abstract Integer getShardCount()

Return the total shard count for the command.

abstract Integer getShardIndex()

Return the shard index for the command.

abstract String getTestTag()

Return the test-tag for the invocation.

abstract String getTestTagSuffix()

Return the test-tag suffix, appended to test-tag to represents some variants of one test.

abstract boolean isConditionalBugreportDisabled()

Returns whether or not conditional bugreport is disabled

abstract boolean isDryRunMode()

Return true if we should skip adding this command to the queue.

abstract boolean isExperimentEnabled()

Whether or not to enable experiments through experimental flags.

abstract boolean isFullHelpMode()

Returns true if full detailed help mode has been requested

abstract boolean isHelpMode()

Returns true if abbreviated help mode has been requested

abstract boolean isLoopMode()

Return the loop mode for the config.

abstract boolean isNoisyDryRunMode()

Return true if we should print the command out to the console before we skip adding it to the queue.

abstract boolean isRemoteInvocationDeviceless()

Whether or not to trigger a deviceless remote invocation.

abstract boolean isTracingEnabled()

Returns whether or not invocation tracing is enabled.

abstract boolean reportCacheResults()

Returns true if we should report cache results when available.

abstract boolean reportInvocationComplete()

whether or not to report the logs until invocationComplete.

abstract boolean reportPassedTests()

Whether or not to report passed test cases.

abstract boolean reportTestCaseCount()

Whether or not to report the number of test cases per test types.

abstract reportingTags()

List of tags used for reporting related to the invocation.

abstract boolean runOnAllDevices()

Return true if command should run on all devices.

abstract void setAutoLogCollectors( autoLogCollectors)

Sets the set of auto log collectors that should be added to an invocation.

abstract void setBugreportOnInvocationEnded(boolean takeBugreport)

Sets whether or not to capture a bugreport at the end of the invocation.

abstract void setBugreportzOnInvocationEnded(boolean takeBugreportz)

Sets whether or not to capture a bugreportz at the end of the invocation.

abstract void setDelegatedEarlyDeviceRelease(boolean earlyRelease)

Set whether or not to release the device early in delegated mode.

abstract void setHostLogSuffix(String suffix)

Sets the suffix to append to Tradefed host_log.

abstract void setInvocationTimeout(Long mInvocationTimeout)

Set the invocation timeout.

abstract void setLoopMode(boolean loopMode)

Sets the loop mode for the command

abstract void setMultiDeviceCount(int count)

Sets the number of expected devices for multi-device tests.

abstract void setReplicateSetup(boolean replicate)

Set whether or not to use replicated setup.

abstract void setReportInvocationComplete(boolean reportInvocationCompleteLogs)

Set whether or not to report the logs until invocationComplete

abstract void setReportTestCaseCount(boolean report)

Set whether or not to report test cases count per test types.

abstract void setShardCount(Integer shardCount)

Sets the shard count for the command.

abstract void setShardIndex(Integer shardIndex)

Sets the shard index for the command.

abstract void setShouldRemoteDynamicShard(boolean shouldRemoteDynamicShard)

Sets whether to use remote dynamic sharding server or not

abstract void setShouldUseEvenModuleSharding(boolean useEvenModuleSharding)

Set whether to attempt to distribute number of modules evenly across shards

abstract void setShouldUseSandboxing(boolean use)

Sets whether or not we should use TF containers

abstract void setTestTag(String testTag)

Sets the test-tag for the invocation.

abstract void setUseSandboxTestMode(boolean use)

Sets whether or not we should use the TF sandbox test mode.

abstract boolean shouldDisableInvocationSetupAndTeardown()

Whether or not to disable pre-invocaiton setup and post-invocation teardown.

abstract boolean shouldRemoteDynamicShard()

Returns whether to use remote dynamic sharding server or not

abstract boolean shouldReportModuleProgression()

Whether or not to report progression of remote invocation at module level.

abstract boolean shouldUploadCacheResults()

Returns true if we should capture the results in the cache.

abstract boolean shouldUseDynamicSharding()

Returns if we should use dynamic sharding or not

abstract boolean shouldUseEvenModuleSharding()

Returns whether to attempt to distribute number of modules evenly across shards

abstract boolean shouldUseParallelPreInvocationSetup()

Return whether to execute pre-invocation setup in parallel.

abstract boolean shouldUseParallelRemoteSetup()

Whether or not to attempt parallel setup of the remote devices.

abstract boolean shouldUseParallelSetup()

Whether or not to attempt parallel setup.

abstract boolean shouldUseRemoteSandboxMode()

Whether or not to use sandbox mode in remote invocation.

abstract boolean shouldUseReplicateSetup()

Whether or not to use replicated setup for all the remote devices.

abstract boolean shouldUseSandboxTestMode()

Returns true if we should use the Tf sandbox in a test mode.

abstract boolean shouldUseSandboxing()

Returns true if we should use Tf containers to run the invocation

abstract boolean shouldUseTokenSharding()

Whether or not sharding should use the token support.

abstract boolean skipTrybotExperiment()

Whether to skip experiments for TRYBOT runs.

abstract boolean takeBugreportOnInvocationEnded()

Return true if a bugreport should be taken when the test invocation has ended.

abstract boolean takeBugreportzOnInvocationEnded()

Return true if a bugreportz should be taken instead of bugreport during the test invocation final bugreport.

Public methods

captureLogcatOnFailure

public abstract boolean captureLogcatOnFailure ()

Whether or not to capture a logcat on test case failure

Returns
boolean

captureScreenshotOnFailure

public abstract boolean captureScreenshotOnFailure ()

Whether or not to capture a screenshot on test case failure

Returns
boolean

clone

public abstract ICommandOptions clone ()

Creates a copy of the ICommandOptions object.

Returns
ICommandOptions

delegatedEarlyDeviceRelease

public abstract boolean delegatedEarlyDeviceRelease ()

Whether or not to release the device early in delegated mode.

Returns
boolean

earlyDeviceRelease

public abstract boolean earlyDeviceRelease ()

Whether or not to release the device early when done with it.

Returns
boolean

filterPreviousPassedTests

public abstract boolean filterPreviousPassedTests ()

Whether or not to filters previous passed test cases from previous attempt.

Returns
boolean

getAutoLogCollectors

public abstract  getAutoLogCollectors ()

Returns the set of auto log collectors to be added for an invocation

Returns

getDynamicDownloadArgs

public abstract  getDynamicDownloadArgs ()

Returns the map of args to pass to the dynamic download query.

Returns

getExperimentalFlags

public abstract  getExperimentalFlags ()

Returns the experimental flags map, that can be used to feature gate projects.

Returns

getExtraRemotePostsubmitInstance

public abstract int getExtraRemotePostsubmitInstance ()

Whether or not to start extra instances in the remote VM in postsubmit.

Returns
int

getHostLogSuffix

public abstract String getHostLogSuffix ()

Returns the suffix to append to the Tradefed host_log or null if no prefix.

Returns
String

getInvocationData

public abstract UniqueMultiMap<String, String> getInvocationData ()

Returns the data passed to the invocation to describe it

Returns
UniqueMultiMap<String, String>

getInvocationTimeout

public abstract long getInvocationTimeout ()

Return the invocation timeout specified. 0 if no timeout to be used.

Returns
long

getJdkFolderForSubprocess

public abstract File getJdkFolderForSubprocess ()

Returns the jdk folder to use when forking execution in a subprocess.

Returns
File

getLoopTime

public abstract long getLoopTime ()

Get the time to wait before re-scheduling this command.

Returns
long time in ms

getMaxLoopCount

public abstract long getMaxLoopCount ()

Returns the maximum number of times to scheduled the command. Has no effect if isLoopMode is false.

Returns
long

getMultiDeviceCount

public abstract Integer getMultiDeviceCount ()

Return the number of devices for multi-device tests.

Returns
Integer

getOptimizeMainlineTest

public abstract boolean getOptimizeMainlineTest ()

Returns true if we should optimize the list of test modules for mainline test.

Returns
boolean

getParallelPreInvocationSetupTimeout

public abstract Duration getParallelPreInvocationSetupTimeout ()

Return the timeout for parallel pre-invocation setup.

Returns
Duration

getParallelSetupTimeout

public abstract Duration getParallelSetupTimeout ()

Returns the timeout to use during parallel setups.

Returns
Duration

getRemoteCacheInstanceName

public abstract String getRemoteCacheInstanceName ()

Returns the name of the instance used to handle remote caching.

Returns
String

getRemoteFiles

public abstract  getRemoteFiles ()

Returns the list of remote files configured.

Returns

getShardCount

public abstract Integer getShardCount ()

Return the total shard count for the command.

Returns
Integer

getShardIndex

public abstract Integer getShardIndex ()

Return the shard index for the command.

Returns
Integer

getTestTag

public abstract String getTestTag ()

Return the test-tag for the invocation. Default is 'stub' if unspecified.

Returns
String

getTestTagSuffix

public abstract String getTestTagSuffix ()

Return the test-tag suffix, appended to test-tag to represents some variants of one test.

Returns
String

isConditionalBugreportDisabled

public abstract boolean isConditionalBugreportDisabled ()

Returns whether or not conditional bugreport is disabled

Returns
boolean

isDryRunMode

public abstract boolean isDryRunMode ()

Return true if we should skip adding this command to the queue.

Returns
boolean

isExperimentEnabled

public abstract boolean isExperimentEnabled ()

Whether or not to enable experiments through experimental flags.

Returns
boolean

isFullHelpMode

public abstract boolean isFullHelpMode ()

Returns true if full detailed help mode has been requested

Returns
boolean

isHelpMode

public abstract boolean isHelpMode ()

Returns true if abbreviated help mode has been requested

Returns
boolean

isLoopMode

public abstract boolean isLoopMode ()

Return the loop mode for the config.

Returns
boolean

isNoisyDryRunMode

public abstract boolean isNoisyDryRunMode ()

Return true if we should print the command out to the console before we skip adding it to the queue.

Returns
boolean

isRemoteInvocationDeviceless

public abstract boolean isRemoteInvocationDeviceless ()

Whether or not to trigger a deviceless remote invocation.

Returns
boolean

isTracingEnabled

public abstract boolean isTracingEnabled ()

Returns whether or not invocation tracing is enabled.

Returns
boolean

reportCacheResults

public abstract boolean reportCacheResults ()

Returns true if we should report cache results when available.

Returns
boolean

reportInvocationComplete

public abstract boolean reportInvocationComplete ()

whether or not to report the logs until invocationComplete.

Returns
boolean

reportPassedTests

public abstract boolean reportPassedTests ()

Whether or not to report passed test cases.

Returns
boolean

reportTestCaseCount

public abstract boolean reportTestCaseCount ()

Whether or not to report the number of test cases per test types.

Returns
boolean

reportingTags

public abstract  reportingTags ()

List of tags used for reporting related to the invocation.

Returns

runOnAllDevices

public abstract boolean runOnAllDevices ()

Return true if command should run on all devices.

Returns
boolean

setAutoLogCollectors

public abstract void setAutoLogCollectors ( autoLogCollectors)

Sets the set of auto log collectors that should be added to an invocation.

Parameters
autoLogCollectors

setBugreportOnInvocationEnded

public abstract void setBugreportOnInvocationEnded (boolean takeBugreport)

Sets whether or not to capture a bugreport at the end of the invocation.

Parameters
takeBugreport boolean

setBugreportzOnInvocationEnded

public abstract void setBugreportzOnInvocationEnded (boolean takeBugreportz)

Sets whether or not to capture a bugreportz at the end of the invocation.

Parameters
takeBugreportz boolean

setDelegatedEarlyDeviceRelease

public abstract void setDelegatedEarlyDeviceRelease (boolean earlyRelease)

Set whether or not to release the device early in delegated mode.

Parameters
earlyRelease boolean

setHostLogSuffix

public abstract void setHostLogSuffix (String suffix)

Sets the suffix to append to Tradefed host_log.

Parameters
suffix String

setInvocationTimeout

public abstract void setInvocationTimeout (Long mInvocationTimeout)

Set the invocation timeout. 0 if no timeout to be used.

Parameters
mInvocationTimeout Long

setLoopMode

public abstract void setLoopMode (boolean loopMode)

Sets the loop mode for the command

setMultiDeviceCount

public abstract void setMultiDeviceCount (int count)

Sets the number of expected devices for multi-device tests.

Parameters
count int

setReplicateSetup

public abstract void setReplicateSetup (boolean replicate)

Set whether or not to use replicated setup.

Parameters
replicate boolean

setReportInvocationComplete

public abstract void setReportInvocationComplete (boolean reportInvocationCompleteLogs)

Set whether or not to report the logs until invocationComplete

Parameters
reportInvocationCompleteLogs boolean

setReportTestCaseCount

public abstract void setReportTestCaseCount (boolean report)

Set whether or not to report test cases count per test types.

Parameters
report boolean

setShardCount

public abstract void setShardCount (Integer shardCount)

Sets the shard count for the command.

Parameters
shardCount Integer

setShardIndex

public abstract void setShardIndex (Integer shardIndex)

Sets the shard index for the command.

Parameters
shardIndex Integer

setShouldRemoteDynamicShard

public abstract void setShouldRemoteDynamicShard (boolean shouldRemoteDynamicShard)

Sets whether to use remote dynamic sharding server or not

Parameters
shouldRemoteDynamicShard boolean

setShouldUseEvenModuleSharding

public abstract void setShouldUseEvenModuleSharding (boolean useEvenModuleSharding)

Set whether to attempt to distribute number of modules evenly across shards

Parameters
useEvenModuleSharding boolean

setShouldUseSandboxing

public abstract void setShouldUseSandboxing (boolean use)

Sets whether or not we should use TF containers

Parameters
use boolean

setTestTag

public abstract void setTestTag (String testTag)

Sets the test-tag for the invocation.

setUseSandboxTestMode

public abstract void setUseSandboxTestMode (boolean use)

Sets whether or not we should use the TF sandbox test mode.

Parameters
use boolean

shouldDisableInvocationSetupAndTeardown

public abstract boolean shouldDisableInvocationSetupAndTeardown ()

Whether or not to disable pre-invocaiton setup and post-invocation teardown.

Returns
boolean

shouldRemoteDynamicShard

public abstract boolean shouldRemoteDynamicShard ()

Returns whether to use remote dynamic sharding server or not

Returns
boolean

shouldReportModuleProgression

public abstract boolean shouldReportModuleProgression ()

Whether or not to report progression of remote invocation at module level.

Returns
boolean

shouldUploadCacheResults

public abstract boolean shouldUploadCacheResults ()

Returns true if we should capture the results in the cache.

Returns
boolean

shouldUseDynamicSharding

public abstract boolean shouldUseDynamicSharding ()

Returns if we should use dynamic sharding or not

Returns
boolean

shouldUseEvenModuleSharding

public abstract boolean shouldUseEvenModuleSharding ()

Returns whether to attempt to distribute number of modules evenly across shards

Returns
boolean

shouldUseParallelPreInvocationSetup

public abstract boolean shouldUseParallelPreInvocationSetup ()

Return whether to execute pre-invocation setup in parallel.

Returns
boolean

shouldUseParallelRemoteSetup

public abstract boolean shouldUseParallelRemoteSetup ()

Whether or not to attempt parallel setup of the remote devices.

Returns
boolean

shouldUseParallelSetup

public abstract boolean shouldUseParallelSetup ()

Whether or not to attempt parallel setup.

Returns
boolean

shouldUseRemoteSandboxMode

public abstract boolean shouldUseRemoteSandboxMode ()

Whether or not to use sandbox mode in remote invocation.

Returns
boolean

shouldUseReplicateSetup

public abstract boolean shouldUseReplicateSetup ()

Whether or not to use replicated setup for all the remote devices.

Returns
boolean

shouldUseSandboxTestMode

public abstract boolean shouldUseSandboxTestMode ()

Returns true if we should use the Tf sandbox in a test mode.

Returns
boolean

shouldUseSandboxing

public abstract boolean shouldUseSandboxing ()

Returns true if we should use Tf containers to run the invocation

Returns
boolean

shouldUseTokenSharding

public abstract boolean shouldUseTokenSharding ()

Whether or not sharding should use the token support.

Returns
boolean

skipTrybotExperiment

public abstract boolean skipTrybotExperiment ()

Whether to skip experiments for TRYBOT runs.

Returns
boolean

takeBugreportOnInvocationEnded

public abstract boolean takeBugreportOnInvocationEnded ()

Return true if a bugreport should be taken when the test invocation has ended.

Returns
boolean

takeBugreportzOnInvocationEnded

public abstract boolean takeBugreportzOnInvocationEnded ()

Return true if a bugreportz should be taken instead of bugreport during the test invocation final bugreport.

Returns
boolean