CommandOptions
public
class
CommandOptions
extends Object
implements
ICommandOptions
java.lang.Object | |
↳ | com.android.tradefed.command.CommandOptions |
Implementation of ICommandOptions
.
Summary
Fields | |
---|---|
public
static
final
String |
DRY_RUN_OPTION
|
public
static
final
String |
ENABLE_SANDBOX_TEST_MODE
|
public
static
final
String |
INVOCATION_DATA
|
public
static
final
String |
NOISY_DRY_RUN_OPTION
|
public
static
final
String |
TEST_TAG_OPTION
|
public
static
final
String |
USE_REMOTE_SANDBOX
|
public
static
final
String |
USE_SANDBOX
|
Public constructors | |
---|---|
CommandOptions()
|
Public methods | |
---|---|
boolean
|
captureLogcatOnFailure()
Whether or not to capture a logcat on test case failure |
boolean
|
captureScreenshotOnFailure()
Whether or not to capture a screenshot on test case failure |
ICommandOptions
|
clone()
|
boolean
|
earlyDeviceRelease()
Whether or not to release the device early when done with it. |
boolean
|
filterPreviousPassedTests()
Whether or not to filters previous passed test cases from previous attempt. |
|
getAutoLogCollectors()
Returns the set of auto log collectors to be added for an invocation |
|
getDynamicDownloadArgs()
Returns the map of args to pass to the dynamic download query. |
int
|
getExtraRemotePostsubmitInstance()
Whether or not to start extra instances in the remote VM in postsubmit. |
String
|
getHostLogSuffix()
Returns the suffix to append to the Tradefed host_log or null if no prefix. |
UniqueMultiMap<String, String>
|
getInvocationData()
Returns the data passed to the invocation to describe it |
long
|
getInvocationTimeout()
Return the invocation timeout specified. |
long
|
getLoopTime()
Get the time to wait before re-scheduling this command. |
long
|
getMaxLoopCount()
Returns the maximum number of times to scheduled the command. |
boolean
|
getOptimizeMainlineTest()
Returns true if we should optimize the list of test modules for mainline test. |
Duration
|
getParallelSetupTimeout()
Returns the timeout to use during parallel setups. |
Integer
|
getShardCount()
Return the total shard count for the command. |
Integer
|
getShardIndex()
Return the shard index for the command. |
String
|
getTestTag()
Return the test-tag for the invocation. |
String
|
getTestTagSuffix()
Return the test-tag suffix, appended to test-tag to represents some variants of one test. |
boolean
|
isDryRunMode()
Return |
boolean
|
isFullHelpMode()
Returns |
boolean
|
isHelpMode()
Returns |
boolean
|
isLoopMode()
Return the loop mode for the config. |
boolean
|
isNoisyDryRunMode()
Return |
boolean
|
reportInvocationComplete()
whether or not to report the logs until invocationComplete. |
boolean
|
reportPassedTests()
Whether or not to report passed test cases. |
boolean
|
reportTestCaseCount()
Whether or not to report the number of test cases per test types. |
|
reportingTags()
List of tags used for reporting related to the invocation. |
boolean
|
runOnAllDevices()
Return true if command should run on all devices. |
void
|
setAutoLogCollectors(
Sets the set of auto log collectors that should be added to an invocation. |
void
|
setBugreportOnInvocationEnded(boolean takeBugreport)
Sets whether or not to capture a bugreport at the end of the invocation. |
void
|
setBugreportzOnInvocationEnded(boolean takeBugreportz)
Sets whether or not to capture a bugreportz at the end of the invocation. |
void
|
setHostLogSuffix(String suffix)
Sets the suffix to append to Tradefed host_log. |
void
|
setInvocationTimeout(Long invocationTimeout)
Set the invocation timeout. |
void
|
setLoopMode(boolean loopMode)
Set the loop mode for the config. |
void
|
setReplicateSetup(boolean replicate)
Set whether or not to use replicated setup. |
void
|
setReportInvocationComplete(boolean reportInvocationCompleteLogs)
Set whether or not to report the logs until invocationComplete |
void
|
setReportTestCaseCount(boolean report)
Set whether or not to report test cases count per test types. |
void
|
setShardCount(Integer shardCount)
Sets the shard count for the command. |
void
|
setShardIndex(Integer shardIndex)
Sets the shard index for the command. |
void
|
setShouldUseSandboxing(boolean use)
Sets whether or not we should use TF containers |
void
|
setTestTag(String testTag)
Sets the test-tag for the invocation. |
void
|
setUseSandboxTestMode(boolean use)
Sets whether or not we should use the TF sandbox test mode. |
boolean
|
shouldDisableInvocationSetupAndTeardown()
Whether or not to disable pre-invocaiton setup and post-invocation teardown. |
boolean
|
shouldReportModuleProgression()
Whether or not to report progression of remote invocation at module level. |
boolean
|
shouldUseDynamicSharding()
Returns if we should use dynamic sharding or not |
boolean
|
shouldUseParallelRemoteSetup()
Whether or not to attempt parallel setup of the remote devices. |
boolean
|
shouldUseParallelSetup()
Whether or not to attempt parallel setup. |
boolean
|
shouldUseRemoteSandboxMode()
Whether or not to use sandbox mode in remote invocation. |
boolean
|
shouldUseReplicateSetup()
Whether or not to use replicated setup for all the remote devices. |
boolean
|
shouldUseSandboxTestMode()
Returns true if we should use the Tf sandbox in a test mode. |
boolean
|
shouldUseSandboxing()
Returns true if we should use Tf containers to run the invocation |
boolean
|
shouldUseTokenSharding()
Whether or not sharding should use the token support. |
boolean
|
takeBugreportOnInvocationEnded()
Return true if a bugreport should be taken when the test invocation has ended. |
boolean
|
takeBugreportzOnInvocationEnded()
Return true if a bugreportz should be taken instead of bugreport during the test invocation final bugreport. |
Fields
DRY_RUN_OPTION
public static final String DRY_RUN_OPTION
ENABLE_SANDBOX_TEST_MODE
public static final String ENABLE_SANDBOX_TEST_MODE
INVOCATION_DATA
public static final String INVOCATION_DATA
NOISY_DRY_RUN_OPTION
public static final String NOISY_DRY_RUN_OPTION
TEST_TAG_OPTION
public static final String TEST_TAG_OPTION
USE_REMOTE_SANDBOX
public static final String USE_REMOTE_SANDBOX
USE_SANDBOX
public static final String USE_SANDBOX
Public constructors
CommandOptions
public CommandOptions ()
Public methods
captureLogcatOnFailure
public boolean captureLogcatOnFailure ()
Whether or not to capture a logcat on test case failure
Returns | |
---|---|
boolean |
captureScreenshotOnFailure
public boolean captureScreenshotOnFailure ()
Whether or not to capture a screenshot on test case failure
Returns | |
---|---|
boolean |
earlyDeviceRelease
public boolean earlyDeviceRelease ()
Whether or not to release the device early when done with it.
Returns | |
---|---|
boolean |
filterPreviousPassedTests
public boolean filterPreviousPassedTests ()
Whether or not to filters previous passed test cases from previous attempt.
Returns | |
---|---|
boolean |
getAutoLogCollectors
publicgetAutoLogCollectors ()
Returns the set of auto log collectors to be added for an invocation
Returns | |
---|---|
|
getDynamicDownloadArgs
publicgetDynamicDownloadArgs ()
Returns the map of args to pass to the dynamic download query.
Returns | |
---|---|
|
getExtraRemotePostsubmitInstance
public int getExtraRemotePostsubmitInstance ()
Whether or not to start extra instances in the remote VM in postsubmit.
Returns | |
---|---|
int |
getHostLogSuffix
public String getHostLogSuffix ()
Returns the suffix to append to the Tradefed host_log or null if no prefix.
Returns | |
---|---|
String |
getInvocationData
public UniqueMultiMap<String, String> getInvocationData ()
Returns the data passed to the invocation to describe it
Returns | |
---|---|
UniqueMultiMap<String, String> |
getInvocationTimeout
public long getInvocationTimeout ()
Return the invocation timeout specified. 0 if no timeout to be used.
Returns | |
---|---|
long |
getLoopTime
public long getLoopTime ()
Get the time to wait before re-scheduling this command.
Returns | |
---|---|
long |
time in ms |
getMaxLoopCount
public long getMaxLoopCount ()
Returns the maximum number of times to scheduled the command. Has no effect if isLoopMode is false.
Returns | |
---|---|
long |
getOptimizeMainlineTest
public boolean getOptimizeMainlineTest ()
Returns true if we should optimize the list of test modules for mainline test.
Returns | |
---|---|
boolean |
getParallelSetupTimeout
public Duration getParallelSetupTimeout ()
Returns the timeout to use during parallel setups.
Returns | |
---|---|
Duration |
getShardCount
public Integer getShardCount ()
Return the total shard count for the command.
Returns | |
---|---|
Integer |
getShardIndex
public Integer getShardIndex ()
Return the shard index for the command.
Returns | |
---|---|
Integer |
getTestTag
public String getTestTag ()
Return the test-tag for the invocation. Default is 'stub' if unspecified.
Returns | |
---|---|
String |
getTestTagSuffix
public String getTestTagSuffix ()
Return the test-tag suffix, appended to test-tag to represents some variants of one test.
Returns | |
---|---|
String |
isDryRunMode
public boolean isDryRunMode ()
Return true
if we should
Returns | |
---|---|
boolean |
isFullHelpMode
public boolean isFullHelpMode ()
Returns true
if full detailed help mode has been requested
Returns | |
---|---|
boolean |
isHelpMode
public boolean isHelpMode ()
Returns true
if abbreviated help mode has been requested
Returns | |
---|---|
boolean |
isLoopMode
public boolean isLoopMode ()
Return the loop mode for the config.
Returns | |
---|---|
boolean |
isNoisyDryRunMode
public boolean isNoisyDryRunMode ()
Return true
if we should print the command out to the console before we
Returns | |
---|---|
boolean |
reportInvocationComplete
public boolean reportInvocationComplete ()
whether or not to report the logs until invocationComplete.
Returns | |
---|---|
boolean |
reportPassedTests
public boolean reportPassedTests ()
Whether or not to report passed test cases.
Returns | |
---|---|
boolean |
reportTestCaseCount
public boolean reportTestCaseCount ()
Whether or not to report the number of test cases per test types.
Returns | |
---|---|
boolean |
reportingTags
publicreportingTags ()
List of tags used for reporting related to the invocation.
Returns | |
---|---|
|
runOnAllDevices
public boolean runOnAllDevices ()
Return true if command should run on all devices.
Returns | |
---|---|
boolean |
setAutoLogCollectors
public void setAutoLogCollectors (autoLogCollectors)
Sets the set of auto log collectors that should be added to an invocation.
Parameters | |
---|---|
autoLogCollectors |
|
setBugreportOnInvocationEnded
public void setBugreportOnInvocationEnded (boolean takeBugreport)
Sets whether or not to capture a bugreport at the end of the invocation.
Parameters | |
---|---|
takeBugreport |
boolean |
setBugreportzOnInvocationEnded
public void setBugreportzOnInvocationEnded (boolean takeBugreportz)
Sets whether or not to capture a bugreportz at the end of the invocation.
Parameters | |
---|---|
takeBugreportz |
boolean |
setHostLogSuffix
public void setHostLogSuffix (String suffix)
Sets the suffix to append to Tradefed host_log.
Parameters | |
---|---|
suffix |
String |
setInvocationTimeout
public void setInvocationTimeout (Long invocationTimeout)
Set the invocation timeout. 0 if no timeout to be used.
Parameters | |
---|---|
invocationTimeout |
Long |
setLoopMode
public void setLoopMode (boolean loopMode)
Set the loop mode for the config.
setReplicateSetup
public void setReplicateSetup (boolean replicate)
Set whether or not to use replicated setup.
Parameters | |
---|---|
replicate |
boolean |
setReportInvocationComplete
public void setReportInvocationComplete (boolean reportInvocationCompleteLogs)
Set whether or not to report the logs until invocationComplete
Parameters | |
---|---|
reportInvocationCompleteLogs |
boolean |
setReportTestCaseCount
public void setReportTestCaseCount (boolean report)
Set whether or not to report test cases count per test types.
Parameters | |
---|---|
report |
boolean |
setShardCount
public void setShardCount (Integer shardCount)
Sets the shard count for the command.
Parameters | |
---|---|
shardCount |
Integer |
setShardIndex
public void setShardIndex (Integer shardIndex)
Sets the shard index for the command.
Parameters | |
---|---|
shardIndex |
Integer |
setShouldUseSandboxing
public void setShouldUseSandboxing (boolean use)
Sets whether or not we should use TF containers
Parameters | |
---|---|
use |
boolean |
setTestTag
public void setTestTag (String testTag)
Sets the test-tag for the invocation.
setUseSandboxTestMode
public void setUseSandboxTestMode (boolean use)
Sets whether or not we should use the TF sandbox test mode.
Parameters | |
---|---|
use |
boolean |
shouldDisableInvocationSetupAndTeardown
public boolean shouldDisableInvocationSetupAndTeardown ()
Whether or not to disable pre-invocaiton setup and post-invocation teardown.
Returns | |
---|---|
boolean |
shouldReportModuleProgression
public boolean shouldReportModuleProgression ()
Whether or not to report progression of remote invocation at module level.
Returns | |
---|---|
boolean |
shouldUseDynamicSharding
public boolean shouldUseDynamicSharding ()
Returns if we should use dynamic sharding or not
Returns | |
---|---|
boolean |
shouldUseParallelRemoteSetup
public boolean shouldUseParallelRemoteSetup ()
Whether or not to attempt parallel setup of the remote devices.
Returns | |
---|---|
boolean |
shouldUseParallelSetup
public boolean shouldUseParallelSetup ()
Whether or not to attempt parallel setup.
Returns | |
---|---|
boolean |
shouldUseRemoteSandboxMode
public boolean shouldUseRemoteSandboxMode ()
Whether or not to use sandbox mode in remote invocation.
Returns | |
---|---|
boolean |
shouldUseReplicateSetup
public boolean shouldUseReplicateSetup ()
Whether or not to use replicated setup for all the remote devices.
Returns | |
---|---|
boolean |
shouldUseSandboxTestMode
public boolean shouldUseSandboxTestMode ()
Returns true if we should use the Tf sandbox in a test mode.
Returns | |
---|---|
boolean |
shouldUseSandboxing
public boolean shouldUseSandboxing ()
Returns true if we should use Tf containers to run the invocation
Returns | |
---|---|
boolean |
shouldUseTokenSharding
public boolean shouldUseTokenSharding ()
Whether or not sharding should use the token support.
Returns | |
---|---|
boolean |
takeBugreportOnInvocationEnded
public boolean takeBugreportOnInvocationEnded ()
Return true if a bugreport should be taken when the test invocation has ended.
Returns | |
---|---|
boolean |
takeBugreportzOnInvocationEnded
public boolean takeBugreportzOnInvocationEnded ()
Return true if a bugreportz should be taken instead of bugreport during the test invocation final bugreport.
Returns | |
---|---|
boolean |