CommandOptions

public class CommandOptions
extends Object implements ICommandOptions

java.lang.Object
   ↳ com.android.tradefed.command.CommandOptions


實作 ICommandOptions

摘要

常數

String DRY_RUN_OPTION

String ENABLE_SANDBOX_TEST_MODE

String INVOCATION_DATA

String JDK_FOLDER_OPTION_NAME

String NOISY_DRY_RUN_OPTION

String TEST_TAG_OPTION

String USE_REMOTE_SANDBOX

String USE_SANDBOX

公用建構函式

CommandOptions()

公用方法

boolean captureLogcatOnFailure()

是否要在測試案例失敗時擷取 logcat

boolean captureScreenshotOnFailure()

是否要在測試案例失敗時擷取螢幕截圖

ICommandOptions clone()
boolean delegatedEarlyDeviceRelease()

是否要在委派模式中提早釋出裝置。

boolean earlyDeviceRelease()

是否要在使用完畢後提早釋出裝置。

boolean filterPreviousPassedTests()

是否要從先前的嘗試中篩選出先前通過的測試案例。

getAutoLogCollectors()

傳回要為叫用作業新增的自動記錄收集器集。

getDynamicDownloadArgs()

傳回要傳遞至動態下載查詢的引數對應。

getExperimentalFlags()

傳回實驗旗標對應,可用於功能閘道專案。

int getExtraRemotePostsubmitInstance()

是否要在提交後啟動遠端 VM 中的額外執行個體。

String getHostLogSuffix()

傳回要附加至 Tradefed host_log 的後置字串,如果沒有前置字串,則傳回 null。

UniqueMultiMap<String, String> getInvocationData()

傳回傳遞至呼叫的資料,以說明該呼叫

long getInvocationTimeout()

傳回指定的叫用逾時。

File getJdkFolderForSubprocess()

將 JDK 資料夾傳回至子程序,以用於分叉執行作業。

long getLoopTime()

取得重新排定這項指令前需要等待的時間。

long getMaxLoopCount()

傳回排定指令的次數上限。

Integer getMultiDeviceCount()

傳回多裝置測試的裝置數量。

boolean getOptimizeMainlineTest()

如果我們應針對主線測試最佳化測試模組清單,則傳回 true。

Duration getParallelPreInvocationSetupTimeout()

Return the timeout for parallel pre-invocation setup.

Duration getParallelSetupTimeout()

Returns the timeout to use during parallel setups.

String getRemoteCacheInstanceName()

傳回用於處理遠端快取的執行個體名稱。

getRemoteFiles()

傳回已設定的遠端檔案清單。

getRolloutFlags()

傳回推出標記對應檔。

Integer getShardCount()

傳回指令的總分片數。

Integer getShardIndex()

傳回指令的分片索引。

String getTestTag()

傳回呼叫的測試標記。

String getTestTagSuffix()

傳回附加至測試標記的測試標記後置字串,代表某項測試的某些變體。

boolean isConditionalBugreportDisabled()

傳回是否停用條件式錯誤報告

boolean isDryRunMode()

如果應略過將此指令加入佇列,則傳回 true

boolean isExperimentEnabled()

是否透過實驗旗標啟用實驗。

boolean isFullHelpMode()

如果要求完整詳細說明模式,則傳回 true

boolean isHelpMode()

如果要求使用簡短說明模式,則傳回 true

boolean isLoopMode()

傳回設定的迴圈模式。

boolean isNoisyDryRunMode()

如果我們應先將指令輸出至控制台,再略過將指令新增至佇列,請傳回 true

boolean isRemoteInvocationDeviceless()

是否要觸發無裝置的遠端叫用。

boolean isTracingEnabled()

傳回是否已啟用叫用追蹤。

boolean keepPostProcessorOrder()

是否按照設定中提及的順序套用後處理器。

boolean reportCacheResults()

Returns true if we should report cache results when available.

boolean reportCacheResultsInPresubmit()

Returns true if we should report cache results when available in presubmit.

boolean reportInvocationCacheResultsInPresubmit()

Returns true if we should report invocation cache results when available in presubmit.

boolean reportInvocationComplete()

是否要回報記錄,直到 invocationComplete 為止。

boolean reportPassedTests()

是否要回報通過的測試案例。

boolean reportTestCaseCount()

是否要回報各測試類型的測試案例數量。

reportingTags()

用於回報與叫用相關資訊的標記清單。

boolean runOnAllDevices()

如果指令應在所有裝置上執行,則傳回 true。

void setAutoLogCollectors( autoLogCollectors)

設定要新增至調用的自動記錄收集器集。

void setBugreportOnInvocationEnded(boolean takeBugreport)

設定是否要在叫用結束時擷取錯誤報告。

void setBugreportzOnInvocationEnded(boolean takeBugreportz)

設定是否要在叫用結束時擷取 bugreportz。

void setDelegatedEarlyDeviceRelease(boolean earlyRelease)

設定是否要在委派模式中提早釋出裝置。

void setHostLogSuffix(String suffix)

設定要附加至 Tradefed host_log 的後置字元。

void setInvocationTimeout(Long invocationTimeout)

設定叫用逾時。

void setLoopMode(boolean loopMode)

設定設定的循環模式。

void setMultiDeviceCount(int count)

設定多裝置測試的預期裝置數量。

void setReplicateSetup(boolean replicate)

設定是否要使用複製的設定。

void setReportInvocationComplete(boolean reportInvocationCompleteLogs)

設定是否要回報記錄檔,直到 invocationComplete

void setReportTestCaseCount(boolean report)

設定是否要依測試類型回報測試案例數量。

void setShardCount(Integer shardCount)

為指令設定分片數量。

void setShardIndex(Integer shardIndex)

設定指令的分片索引。

void setShouldRemoteDynamicShard(boolean shouldRemoteDynamicShard)

設定是否要使用遠端動態分片伺服器

void setShouldUseEvenModuleSharding(boolean useEvenModuleSharding)

設定是否要嘗試在分片之間平均分配模組數量

void setShouldUseSandboxing(boolean use)

設定是否應使用 TF 容器

void setTestTag(String testTag)

設定呼叫的測試標記。

void setUseSandboxTestMode(boolean use)

設定是否應使用 TF 沙箱測試模式。

boolean shouldDisableInvocationSetupAndTeardown()

是否要停用叫用前設定和叫用後終止。

boolean shouldRemoteDynamicShard()

傳回是否使用遠端動態分片伺服器

boolean shouldReportModuleProgression()

是否要在模組層級回報遠端調用的進度。

boolean shouldSkipParentProcessLogcat()

是否略過父項程序的 logcat。

boolean shouldUploadCacheResults()

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

boolean shouldUploadInvocationCacheResults()

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

boolean shouldUseDynamicSharding()

傳回是否應使用動態分片

boolean shouldUseEvenModuleSharding()

傳回是否嘗試在分片之間平均分配模組數量

boolean shouldUseParallelPreInvocationSetup()

傳回是否要平行執行叫用前設定。

boolean shouldUseParallelRemoteSetup()

是否要嘗試平行設定遠端裝置。

boolean shouldUseParallelSetup()

是否嘗試平行設定。

boolean shouldUseRemoteSandboxMode()

是否要在遠端叫用時使用沙箱模式。

boolean shouldUseReplicateSetup()

是否要為所有遠端裝置使用複製的設定。

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()

分片是否應使用符記支援。

boolean skipTrybotExperiment()

是否要在 TRYBOT 執行期間略過實驗。

boolean takeBugreportOnInvocationEnded()

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

boolean takeBugreportzOnInvocationEnded()

如果測試呼叫最終錯誤報告期間應擷取 bugreportz 而非 bugreport,則傳回 true。

常數

DRY_RUN_OPTION

public static final String DRY_RUN_OPTION

常數值: "dry-run"

ENABLE_SANDBOX_TEST_MODE

public static final String ENABLE_SANDBOX_TEST_MODE

常數值: "sandbox-test-mode"

INVOCATION_DATA

public static final String INVOCATION_DATA

常數值: "invocation-data"

JDK_FOLDER_OPTION_NAME

public static final String JDK_FOLDER_OPTION_NAME

常數值: "jdk-folder-for-subprocess"

NOISY_DRY_RUN_OPTION

public static final String NOISY_DRY_RUN_OPTION

常數值: "noisy-dry-run"

TEST_TAG_OPTION

public static final String TEST_TAG_OPTION

常數值: "test-tag"

USE_REMOTE_SANDBOX

public static final String USE_REMOTE_SANDBOX

常數值: "use-remote-sandbox"

USE_SANDBOX

public static final String USE_SANDBOX

常數值: "use-sandbox"

公用建構函式

CommandOptions

public CommandOptions ()

公用方法

captureLogcatOnFailure

public boolean captureLogcatOnFailure ()

是否要在測試案例失敗時擷取 logcat

傳回
boolean

captureScreenshotOnFailure

public boolean captureScreenshotOnFailure ()

是否要在測試案例失敗時擷取螢幕截圖

傳回
boolean

複製

public ICommandOptions clone ()

傳回
ICommandOptions

delegatedEarlyDeviceRelease

public boolean delegatedEarlyDeviceRelease ()

是否要在委派模式中提早釋出裝置。

傳回
boolean

earlyDeviceRelease

public boolean earlyDeviceRelease ()

是否要在使用完畢後提早釋出裝置。

傳回
boolean

filterPreviousPassedTests

public boolean filterPreviousPassedTests ()

是否要從先前的嘗試中篩選出先前通過的測試案例。

傳回
boolean

getAutoLogCollectors

public  getAutoLogCollectors ()

傳回要為叫用作業新增的自動記錄收集器集

傳回

getDynamicDownloadArgs

public  getDynamicDownloadArgs ()

傳回要傳遞至動態下載查詢的引數對應。

傳回

getExperimentalFlags

public  getExperimentalFlags ()

傳回實驗旗標對應,可用於功能閘道專案。

傳回

getExtraRemotePostsubmitInstance

public int getExtraRemotePostsubmitInstance ()

是否要在提交後啟動遠端 VM 中的額外執行個體。

傳回
int

getHostLogSuffix

public String getHostLogSuffix ()

傳回要附加至 Tradefed host_log 的後置字串,如果沒有前置字串,則傳回 null。

傳回
String

getInvocationData

public UniqueMultiMap<String, String> getInvocationData ()

傳回傳遞至調用的資料,以說明該資料

傳回
UniqueMultiMap<String, String>

getInvocationTimeout

public long getInvocationTimeout ()

傳回指定的叫用逾時。如不使用逾時,請設為 0。

傳回
long

getJdkFolderForSubprocess

public File getJdkFolderForSubprocess ()

傳回在子程序中分叉執行時要使用的 JDK 資料夾。

傳回
File

getLoopTime

public long getLoopTime ()

取得重新排定這項指令前需要等待的時間。

傳回
long 時間 (毫秒)

getMaxLoopCount

public long getMaxLoopCount ()

傳回排定指令次數上限。如果 isLoopMode 為 false,這個方法就不會產生任何作用。

傳回
long

getMultiDeviceCount

public Integer getMultiDeviceCount ()

傳回多裝置測試的裝置數量。

傳回
Integer

getOptimizeMainlineTest

public boolean getOptimizeMainlineTest ()

如果我們應針對主線測試最佳化測試模組清單,則傳回 true。

傳回
boolean

getParallelPreInvocationSetupTimeout

public Duration getParallelPreInvocationSetupTimeout ()

傳回平行預先叫用設定的逾時。

傳回
Duration

getParallelSetupTimeout

public Duration getParallelSetupTimeout ()

傳回平行設定期間使用的逾時。

傳回
Duration

getRemoteCacheInstanceName

public String getRemoteCacheInstanceName ()

傳回用於處理遠端快取的執行個體名稱。

傳回
String

getRemoteFiles

public  getRemoteFiles ()

傳回已設定的遠端檔案清單。

傳回

getRolloutFlags

public  getRolloutFlags ()

傳回推出旗標對應檔。推出旗標與實驗旗標不同,因為推出旗標適用於每次呼叫。

傳回

getShardCount

public Integer getShardCount ()

傳回指令的總分片數。

傳回
Integer

getShardIndex

public Integer getShardIndex ()

傳回指令的分片索引。

傳回
Integer

getTestTag

public String getTestTag ()

傳回呼叫的測試標記。如未指定,則預設為「stub」。

傳回
String

getTestTagSuffix

public String getTestTagSuffix ()

傳回測試標記後置字元,附加至測試標記,代表某項測試的某些變體。

傳回
String

isConditionalBugreportDisabled

public boolean isConditionalBugreportDisabled ()

傳回條件式錯誤報告是否已停用

傳回
boolean

isDryRunMode

public boolean isDryRunMode ()

如果應略過將這個指令加入佇列,則傳回 true

傳回
boolean

isExperimentEnabled

public boolean isExperimentEnabled ()

是否透過實驗旗標啟用實驗。

傳回
boolean

isFullHelpMode

public boolean isFullHelpMode ()

如果要求完整詳細說明模式,則傳回 true

傳回
boolean

isHelpMode

public boolean isHelpMode ()

如果要求簡短說明模式,則傳回 true

傳回
boolean

isLoopMode

public boolean isLoopMode ()

傳回設定的迴圈模式。

傳回
boolean

isNoisyDryRunMode

public boolean isNoisyDryRunMode ()

如果我們應該先將指令輸出至控制台,再略過將指令新增至佇列,請傳回 true

傳回
boolean

isRemoteInvocationDeviceless

public boolean isRemoteInvocationDeviceless ()

是否要觸發無裝置的遠端叫用。

傳回
boolean

isTracingEnabled

public boolean isTracingEnabled ()

傳回是否已啟用叫用追蹤。

傳回
boolean

keepPostProcessorOrder

public boolean keepPostProcessorOrder ()

是否按照設定中提及的順序套用後置處理器。

傳回
boolean

reportCacheResults

public boolean reportCacheResults ()

如果應在有快取結果時回報,則傳回 true。

傳回
boolean

reportCacheResultsInPresubmit

public boolean reportCacheResultsInPresubmit ()

如果我們應在預先提交時回報快取結果 (如有),則傳回 true。

傳回
boolean

reportInvocationCacheResultsInPresubmit

public boolean reportInvocationCacheResultsInPresubmit ()

如果預先提交時有可用的叫用快取結果,是否應回報這些結果。

傳回
boolean

reportInvocationComplete

public boolean reportInvocationComplete ()

是否要回報記錄,直到 invocationComplete 為止。

傳回
boolean

reportPassedTests

public boolean reportPassedTests ()

是否要回報通過的測試案例。

傳回
boolean

reportTestCaseCount

public boolean reportTestCaseCount ()

是否要依測試類型回報測試案例數量。

傳回
boolean

reportingTags

public  reportingTags ()

用於回報與叫用相關資訊的標記清單。

傳回

runOnAllDevices

public boolean runOnAllDevices ()

如果指令應在所有裝置上執行,則傳回 true。

傳回
boolean

setAutoLogCollectors

public void setAutoLogCollectors ( autoLogCollectors)

設定要新增至調用的自動記錄收集器集。

參數
autoLogCollectors

setBugreportOnInvocationEnded

public void setBugreportOnInvocationEnded (boolean takeBugreport)

設定是否要在叫用結束時擷取錯誤報告。

參數
takeBugreport boolean

setBugreportzOnInvocationEnded

public void setBugreportzOnInvocationEnded (boolean takeBugreportz)

設定是否要在叫用結束時擷取 bugreportz。

參數
takeBugreportz boolean

setDelegatedEarlyDeviceRelease

public void setDelegatedEarlyDeviceRelease (boolean earlyRelease)

設定是否要在委派模式中提早發布裝置。

參數
earlyRelease boolean

setHostLogSuffix

public void setHostLogSuffix (String suffix)

設定要附加至 Tradefed host_log 的後置字元。

參數
suffix String

setInvocationTimeout

public void setInvocationTimeout (Long invocationTimeout)

設定叫用逾時。如不使用逾時,請設為 0。

參數
invocationTimeout Long

setLoopMode

public void setLoopMode (boolean loopMode)

設定設定的迴圈模式。

setMultiDeviceCount

public void setMultiDeviceCount (int count)

設定多裝置測試的預期裝置數量。

參數
count int

setReplicateSetup

public void setReplicateSetup (boolean replicate)

設定是否要使用複製設定。

參數
replicate boolean

setReportInvocationComplete

public void setReportInvocationComplete (boolean reportInvocationCompleteLogs)

設定是否要回報記錄檔,直到 invocationComplete 為止

參數
reportInvocationCompleteLogs boolean

setReportTestCaseCount

public void setReportTestCaseCount (boolean report)

設定是否要依測試類型回報測試案例數量。

參數
report boolean

setShardCount

public void setShardCount (Integer shardCount)

為指令設定分片計數。

參數
shardCount Integer

setShardIndex

public void setShardIndex (Integer shardIndex)

設定指令的分片索引。

參數
shardIndex Integer

setShouldRemoteDynamicShard

public void setShouldRemoteDynamicShard (boolean shouldRemoteDynamicShard)

設定是否要使用遠端動態分片伺服器

參數
shouldRemoteDynamicShard boolean

setShouldUseEvenModuleSharding

public void setShouldUseEvenModuleSharding (boolean useEvenModuleSharding)

設定是否要嘗試在各個分片中平均分配模組數量

參數
useEvenModuleSharding boolean

setShouldUseSandboxing

public void setShouldUseSandboxing (boolean use)

設定是否應使用 TF 容器

參數
use boolean

setTestTag

public void setTestTag (String testTag)

設定叫用的測試標記。

setUseSandboxTestMode

public void setUseSandboxTestMode (boolean use)

設定是否應使用 TF 沙箱測試模式。

參數
use boolean

shouldDisableInvocationSetupAndTeardown

public boolean shouldDisableInvocationSetupAndTeardown ()

是否要停用叫用前設定和叫用後終止。

傳回
boolean

shouldRemoteDynamicShard

public boolean shouldRemoteDynamicShard ()

傳回是否要使用遠端動態分片伺服器

傳回
boolean

shouldReportModuleProgression

public boolean shouldReportModuleProgression ()

是否要在模組層級回報遠端調用的進度。

傳回
boolean

shouldSkipParentProcessLogcat

public boolean shouldSkipParentProcessLogcat ()

是否要略過父項程序的 logcat。

傳回
boolean

shouldUploadCacheResults

public boolean shouldUploadCacheResults ()

如果應將結果擷取到快取中,則傳回 true。

傳回
boolean

shouldUploadInvocationCacheResults

public boolean shouldUploadInvocationCacheResults ()

如果應在快取中擷取叫用結果,則傳回 true。

傳回
boolean

shouldUseDynamicSharding

public boolean shouldUseDynamicSharding ()

傳回是否應使用動態分片

傳回
boolean

shouldUseEvenModuleSharding

public boolean shouldUseEvenModuleSharding ()

傳回是否嘗試在分片之間平均分配模組數量

傳回
boolean

shouldUseParallelPreInvocationSetup

public boolean shouldUseParallelPreInvocationSetup ()

傳回是否要並行執行叫用前設定。

傳回
boolean

shouldUseParallelRemoteSetup

public boolean shouldUseParallelRemoteSetup ()

是否要嘗試平行設定遠端裝置。

傳回
boolean

shouldUseParallelSetup

public boolean shouldUseParallelSetup ()

是否嘗試並行設定。

傳回
boolean

shouldUseRemoteSandboxMode

public boolean shouldUseRemoteSandboxMode ()

是否要在遠端呼叫中使用沙箱模式。

傳回
boolean

shouldUseReplicateSetup

public boolean shouldUseReplicateSetup ()

是否要為所有遠端裝置使用複製的設定。

傳回
boolean

shouldUseSandboxTestMode

public boolean shouldUseSandboxTestMode ()

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

傳回
boolean

shouldUseSandboxing

public boolean shouldUseSandboxing ()

如果我們應使用 Tf 容器執行叫用,則傳回 true

傳回
boolean

shouldUseTokenSharding

public boolean shouldUseTokenSharding ()

分片是否應使用符記支援。

傳回
boolean

skipTrybotExperiment

public boolean skipTrybotExperiment ()

是否要在 TRYBOT 執行期間略過實驗。

傳回
boolean

takeBugreportOnInvocationEnded

public boolean takeBugreportOnInvocationEnded ()

如果測試呼叫結束時應擷取錯誤報告,則傳回 true。

傳回
boolean

takeBugreportzOnInvocationEnded

public boolean takeBugreportzOnInvocationEnded ()

如果測試叫用最終錯誤報告期間應採用 bugreportz 而非錯誤報告,則傳回 true。

傳回
boolean