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

是否自動部署某些後處理器。

boolean filterPreviousPassedTests()

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

List<String> getAutoCollectorSetOptions()

傳回要傳遞至自動收集器的選項清單。

Set<AutoLogCollector> getAutoLogCollectors()

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

Set<AutoLogProcessor> getAutoLogProcessors()

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

Map<String, String> getDynamicDownloadArgs()

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

MultiMap<String, String> getExperimentalFlags()

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

int getExtraRemotePostsubmitInstance()

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

String getGeminiApiKey()

用於 Gemini API 提示查詢的 API 金鑰。

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

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

Set<String> getRemoteFiles()

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

MultiMap<String, String> getRolloutFlags()

傳回推出旗標對應。

List<File> getRolloutFlagsFiles()

傳回包含推出旗標的檔案清單。

Integer getShardCount()

傳回指令的總分片數。

Integer getShardIndex()

傳回指令的分片索引。

String getTestTag()

傳回呼叫的測試標記。

String getTestTagSuffix()

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

boolean isConditionalBugreportDisabled()

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

boolean isDryRunMode()

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

boolean isExperimentEnabled()

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

boolean isFullHelpMode()

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

boolean isGeminiLogOnlyMode()

是否要讓模型執行提示詞時保持靜音。

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

Returns true if we should report invocation cache result when available in postsubmit.

boolean reportInvocationCacheResultsInPresubmit()

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

boolean reportInvocationComplete()

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

boolean reportPassedTests()

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

boolean reportTestCaseCount()

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

List<String> reportingTags()

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

boolean runOnAllDevices()

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

void setAutoCollectorSetOptions(List<String> autoCollectorSetOptions)

設定要傳遞至自動收集器的選項清單。

void setAutoLogCollectors(Set<AutoLogCollector> autoLogCollectors)

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

void setAutoLogProcessors(Set<AutoLogProcessor> autoLogProcessors)

設定應新增至調用的自動記錄處理器集。

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

是否要啟用裝置專屬設定。

boolean shouldForcePreparerFailureAsTestFailure()

如果準備人員未通過測試,測試呼叫可能會因基礎架構錯誤而失敗,導致測試執行重試。

boolean shouldPassRetryAttemptNumber()

是否要傳遞重試次數。

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

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

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

clone

public ICommandOptions clone ()

傳回
ICommandOptions

delegatedEarlyDeviceRelease

public boolean delegatedEarlyDeviceRelease ()

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

傳回
boolean

earlyDeviceRelease

public boolean earlyDeviceRelease ()

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

傳回
boolean

enableDefaultLogProcessors

public boolean enableDefaultLogProcessors ()

是否自動部署某些後處理器。

傳回
boolean

filterPreviousPassedTests

public boolean filterPreviousPassedTests ()

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

傳回
boolean

getAutoCollectorSetOptions

public List<String> getAutoCollectorSetOptions ()

傳回要傳遞至自動收集器的選項清單。

傳回
List<String>

getAutoLogCollectors

public Set<AutoLogCollector> getAutoLogCollectors ()

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

傳回
Set<AutoLogCollector>

getAutoLogProcessors

public Set<AutoLogProcessor> getAutoLogProcessors ()

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

傳回
Set<AutoLogProcessor>

getDynamicDownloadArgs

public Map<String, String> getDynamicDownloadArgs ()

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

傳回
Map<String, String>

getExperimentalFlags

public MultiMap<String, String> getExperimentalFlags ()

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

傳回
MultiMap<String, String>

getExtraRemotePostsubmitInstance

public int getExtraRemotePostsubmitInstance ()

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

傳回
int

getGeminiApiKey

public String getGeminiApiKey ()

用於 Gemini API 提示查詢的 API 金鑰。

傳回
String

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 Set<String> getRemoteFiles ()

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

傳回
Set<String>

getRolloutFlags

public MultiMap<String, String> getRolloutFlags ()

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

傳回
MultiMap<String, String>

getRolloutFlagsFiles

public List<File> getRolloutFlagsFiles ()

傳回包含推出旗標的檔案清單。

傳回
List<File>

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

isGeminiLogOnlyMode

public boolean isGeminiLogOnlyMode ()

是否要讓模型提示執行作業靜音。

傳回
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

reportInvocationCacheResultsInPostsubmit

public boolean reportInvocationCacheResultsInPostsubmit ()

如果應在 postsubmit 中回報叫用快取結果 (如有),則傳回 true。

傳回
boolean

reportInvocationCacheResultsInPresubmit

public boolean reportInvocationCacheResultsInPresubmit ()

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

傳回
boolean

reportInvocationComplete

public boolean reportInvocationComplete ()

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

傳回
boolean

reportPassedTests

public boolean reportPassedTests ()

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

傳回
boolean

reportTestCaseCount

public boolean reportTestCaseCount ()

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

傳回
boolean

reportingTags

public List<String> reportingTags ()

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

傳回
List<String>

runOnAllDevices

public boolean runOnAllDevices ()

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

傳回
boolean

setAutoCollectorSetOptions

public void setAutoCollectorSetOptions (List<String> autoCollectorSetOptions)

設定要傳遞至自動收集器的選項清單。

參數
autoCollectorSetOptions List

setAutoLogCollectors

public void setAutoLogCollectors (Set<AutoLogCollector> autoLogCollectors)

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

參數
autoLogCollectors Set

setAutoLogProcessors

public void setAutoLogProcessors (Set<AutoLogProcessor> autoLogProcessors)

設定應新增至調用的自動記錄處理器集。

參數
autoLogProcessors Set

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

shouldEnableDeviceSpecificSetup

public boolean shouldEnableDeviceSpecificSetup ()

是否啟用裝置專屬設定。

傳回
boolean

shouldForcePreparerFailureAsTestFailure

public boolean shouldForcePreparerFailureAsTestFailure ()

如果準備人員未通過測試,測試呼叫可能會因基礎架構錯誤而失敗,導致測試執行重試。這個選項可將這類失敗轉換為測試失敗,因此基礎架構不會浪費資源重試整個測試執行。

傳回
boolean

shouldPassRetryAttemptNumber

public boolean shouldPassRetryAttemptNumber ()

是否要傳遞重試次數。

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

如果我們應在測試模式中使用 Tf 沙箱,則傳回 true。

傳回
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 而非 bugreport,則傳回 true。

傳回
boolean