ICommandOptions

public interface ICommandOptions

com.android.tradefed.command.ICommandOptions


指令執行選項的容器。

摘要

公用方法

abstract boolean captureLogcatOnFailure()

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

abstract boolean captureScreenshotOnFailure()

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

abstract ICommandOptions clone()

建立 ICommandOptions 物件的副本。

abstract boolean delegatedEarlyDeviceRelease()

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

abstract boolean earlyDeviceRelease()

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

abstract boolean enableDefaultLogProcessors()

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

abstract boolean filterPreviousPassedTests()

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

abstract List<String> getAutoCollectorSetOptions()

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

abstract Set<AutoLogCollector> getAutoLogCollectors()

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

abstract Set<AutoLogProcessor> getAutoLogProcessors()

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

abstract Map<String, String> getDynamicDownloadArgs()

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

abstract MultiMap<String, String> getExperimentalFlags()

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

abstract int getExtraRemotePostsubmitInstance()

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

abstract String getGeminiApiKey()

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

abstract String getHostLogSuffix()

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

abstract UniqueMultiMap<String, String> getInvocationData()

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

abstract long getInvocationTimeout()

傳回指定的叫用逾時。

abstract File getJdkFolderForSubprocess()

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

abstract long getLoopTime()

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

abstract long getMaxLoopCount()

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

abstract Integer getMultiDeviceCount()

傳回支援多種裝置測試的裝置數量。

abstract boolean getOptimizeMainlineTest()

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

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

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

abstract Set<String> getRemoteFiles()

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

abstract MultiMap<String, String> getRolloutFlags()

傳回推出旗標對應。

abstract List<File> getRolloutFlagsFiles()

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

abstract Integer getShardCount()

傳回指令的總分片數。

abstract Integer getShardIndex()

傳回指令的分片索引。

abstract String getTestTag()

傳回呼叫的測試標記。

abstract String getTestTagSuffix()

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

abstract boolean isConditionalBugreportDisabled()

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

abstract boolean isDryRunMode()

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

abstract boolean isExperimentEnabled()

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

abstract boolean isFullHelpMode()

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

abstract boolean isGeminiLogOnlyMode()

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

abstract boolean isHelpMode()

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

abstract boolean isLoopMode()

傳回設定的迴圈模式。

abstract boolean isNoisyDryRunMode()

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

abstract boolean isRemoteInvocationDeviceless()

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

abstract boolean isTracingEnabled()

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

abstract boolean keepPostProcessorOrder()

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

abstract boolean reportCacheResults()

Returns true if we should report cache results when available.

abstract boolean reportCacheResultsInPresubmit()

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

abstract boolean reportInvocationCacheResultsInPostsubmit()

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

abstract boolean reportInvocationCacheResultsInPresubmit()

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

abstract boolean reportInvocationComplete()

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

abstract boolean reportPassedTests()

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

abstract boolean reportTestCaseCount()

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

abstract List<String> reportingTags()

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

abstract boolean runOnAllDevices()

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

abstract void setAutoCollectorSetOptions(List<String> autoCollectorSetOptions)

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

abstract void setAutoLogCollectors(Set<AutoLogCollector> autoLogCollectors)

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

abstract void setAutoLogProcessors(Set<AutoLogProcessor> autoLogProcessors)

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

abstract void setBugreportOnInvocationEnded(boolean takeBugreport)

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

abstract void setBugreportzOnInvocationEnded(boolean takeBugreportz)

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

abstract void setDelegatedEarlyDeviceRelease(boolean earlyRelease)

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

abstract void setHostLogSuffix(String suffix)

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

abstract void setInvocationTimeout(Long mInvocationTimeout)

設定叫用逾時。

abstract void setLoopMode(boolean loopMode)

設定指令的循環模式

abstract void setMultiDeviceCount(int count)

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

abstract void setReplicateSetup(boolean replicate)

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

abstract void setReportInvocationComplete(boolean reportInvocationCompleteLogs)

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

abstract void setReportTestCaseCount(boolean report)

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

abstract void setShardCount(Integer shardCount)

設定指令的資料分割數量。

abstract void setShardIndex(Integer shardIndex)

設定指令的分片索引。

abstract void setShouldRemoteDynamicShard(boolean shouldRemoteDynamicShard)

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

abstract void setShouldUseEvenModuleSharding(boolean useEvenModuleSharding)

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

abstract void setShouldUseSandboxing(boolean use)

設定是否應使用 TF 容器

abstract void setTestTag(String testTag)

設定呼叫的測試標記。

abstract void setUseSandboxTestMode(boolean use)

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

abstract boolean shouldDisableInvocationSetupAndTeardown()

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

abstract boolean shouldEnableDeviceSpecificSetup()

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

abstract boolean shouldForcePreparerFailureAsTestFailure()

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

abstract boolean shouldPassRetryAttemptNumber()

是否要傳遞重試次數。

abstract boolean shouldRemoteDynamicShard()

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

abstract boolean shouldReportModuleProgression()

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

abstract boolean shouldSkipParentProcessLogcat()

是否略過父項程序的 logcat。

abstract boolean shouldUploadCacheResults()

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

abstract boolean shouldUploadInvocationCacheResults()

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

abstract boolean shouldUseDynamicSharding()

傳回是否應使用動態分片

abstract boolean shouldUseEvenModuleSharding()

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

abstract boolean shouldUseParallelPreInvocationSetup()

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

abstract boolean shouldUseParallelRemoteSetup()

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

abstract boolean shouldUseParallelSetup()

是否嘗試並行設定。

abstract boolean shouldUseRemoteSandboxMode()

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

abstract boolean shouldUseReplicateSetup()

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

abstract boolean shouldUseSandboxTestMode()

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

abstract boolean shouldUseSandboxing()

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

abstract boolean shouldUseTokenSharding()

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

abstract boolean skipTrybotExperiment()

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

abstract boolean takeBugreportOnInvocationEnded()

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

abstract boolean takeBugreportzOnInvocationEnded()

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

公用方法

captureLogcatOnFailure

public abstract boolean captureLogcatOnFailure ()

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

傳回
boolean

captureScreenshotOnFailure

public abstract boolean captureScreenshotOnFailure ()

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

傳回
boolean

clone

public abstract ICommandOptions clone ()

建立 ICommandOptions 物件的副本。

傳回
ICommandOptions

delegatedEarlyDeviceRelease

public abstract boolean delegatedEarlyDeviceRelease ()

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

傳回
boolean

earlyDeviceRelease

public abstract boolean earlyDeviceRelease ()

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

傳回
boolean

enableDefaultLogProcessors

public abstract boolean enableDefaultLogProcessors ()

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

傳回
boolean

filterPreviousPassedTests

public abstract boolean filterPreviousPassedTests ()

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

傳回
boolean

getAutoCollectorSetOptions

public abstract List<String> getAutoCollectorSetOptions ()

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

傳回
List<String>

getAutoLogCollectors

public abstract Set<AutoLogCollector> getAutoLogCollectors ()

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

傳回
Set<AutoLogCollector>

getAutoLogProcessors

public abstract Set<AutoLogProcessor> getAutoLogProcessors ()

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

傳回
Set<AutoLogProcessor>

getDynamicDownloadArgs

public abstract Map<String, String> getDynamicDownloadArgs ()

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

傳回
Map<String, String>

getExperimentalFlags

public abstract MultiMap<String, String> getExperimentalFlags ()

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

傳回
MultiMap<String, String>

getExtraRemotePostsubmitInstance

public abstract int getExtraRemotePostsubmitInstance ()

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

傳回
int

getGeminiApiKey

public abstract String getGeminiApiKey ()

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

傳回
String

getHostLogSuffix

public abstract String getHostLogSuffix ()

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

傳回
String

getInvocationData

public abstract UniqueMultiMap<String, String> getInvocationData ()

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

傳回
UniqueMultiMap<String, String>

getInvocationTimeout

public abstract long getInvocationTimeout ()

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

傳回
long

getJdkFolderForSubprocess

public abstract File getJdkFolderForSubprocess ()

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

傳回
File

getLoopTime

public abstract long getLoopTime ()

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

傳回
long 時間 (毫秒)

getMaxLoopCount

public abstract long getMaxLoopCount ()

傳回排定指令的次數上限。如果 isLoopMode 為 false,這項政策就不會有任何作用。

傳回
long

getMultiDeviceCount

public abstract Integer getMultiDeviceCount ()

傳回支援多種裝置測試的裝置數量。

傳回
Integer

getOptimizeMainlineTest

public abstract boolean getOptimizeMainlineTest ()

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

傳回
boolean

getParallelPreInvocationSetupTimeout

public abstract Duration getParallelPreInvocationSetupTimeout ()

傳回平行前調用設定的逾時。

傳回
Duration

getParallelSetupTimeout

public abstract Duration getParallelSetupTimeout ()

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

傳回
Duration

getRemoteCacheInstanceName

public abstract String getRemoteCacheInstanceName ()

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

傳回
String

getRemoteFiles

public abstract Set<String> getRemoteFiles ()

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

傳回
Set<String>

getRolloutFlags

public abstract MultiMap<String, String> getRolloutFlags ()

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

傳回
MultiMap<String, String>

getRolloutFlagsFiles

public abstract List<File> getRolloutFlagsFiles ()

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

傳回
List<File>

getShardCount

public abstract Integer getShardCount ()

傳回指令的總分片數。

傳回
Integer

getShardIndex

public abstract Integer getShardIndex ()

傳回指令的分片索引。

傳回
Integer

getTestTag

public abstract String getTestTag ()

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

傳回
String

getTestTagSuffix

public abstract String getTestTagSuffix ()

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

傳回
String

isConditionalBugreportDisabled

public abstract boolean isConditionalBugreportDisabled ()

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

傳回
boolean

isDryRunMode

public abstract boolean isDryRunMode ()

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

傳回
boolean

isExperimentEnabled

public abstract boolean isExperimentEnabled ()

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

傳回
boolean

isFullHelpMode

public abstract boolean isFullHelpMode ()

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

傳回
boolean

isGeminiLogOnlyMode

public abstract boolean isGeminiLogOnlyMode ()

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

傳回
boolean

isHelpMode

public abstract boolean isHelpMode ()

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

傳回
boolean

isLoopMode

public abstract boolean isLoopMode ()

傳回設定的迴圈模式。

傳回
boolean

isNoisyDryRunMode

public abstract boolean isNoisyDryRunMode ()

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

傳回
boolean

isRemoteInvocationDeviceless

public abstract boolean isRemoteInvocationDeviceless ()

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

傳回
boolean

isTracingEnabled

public abstract boolean isTracingEnabled ()

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

傳回
boolean

keepPostProcessorOrder

public abstract boolean keepPostProcessorOrder ()

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

傳回
boolean

reportCacheResults

public abstract boolean reportCacheResults ()

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

傳回
boolean

reportCacheResultsInPresubmit

public abstract boolean reportCacheResultsInPresubmit ()

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

傳回
boolean

reportInvocationCacheResultsInPostsubmit

public abstract boolean reportInvocationCacheResultsInPostsubmit ()

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

傳回
boolean

reportInvocationCacheResultsInPresubmit

public abstract boolean reportInvocationCacheResultsInPresubmit ()

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

傳回
boolean

reportInvocationComplete

public abstract boolean reportInvocationComplete ()

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

傳回
boolean

reportPassedTests

public abstract boolean reportPassedTests ()

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

傳回
boolean

reportTestCaseCount

public abstract boolean reportTestCaseCount ()

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

傳回
boolean

reportingTags

public abstract List<String> reportingTags ()

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

傳回
List<String>

runOnAllDevices

public abstract boolean runOnAllDevices ()

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

傳回
boolean

setAutoCollectorSetOptions

public abstract void setAutoCollectorSetOptions (List<String> autoCollectorSetOptions)

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

參數
autoCollectorSetOptions List

setAutoLogCollectors

public abstract void setAutoLogCollectors (Set<AutoLogCollector> autoLogCollectors)

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

參數
autoLogCollectors Set

setAutoLogProcessors

public abstract void setAutoLogProcessors (Set<AutoLogProcessor> autoLogProcessors)

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

參數
autoLogProcessors Set

setBugreportOnInvocationEnded

public abstract void setBugreportOnInvocationEnded (boolean takeBugreport)

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

參數
takeBugreport boolean

setBugreportzOnInvocationEnded

public abstract void setBugreportzOnInvocationEnded (boolean takeBugreportz)

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

參數
takeBugreportz boolean

setDelegatedEarlyDeviceRelease

public abstract void setDelegatedEarlyDeviceRelease (boolean earlyRelease)

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

參數
earlyRelease boolean

setHostLogSuffix

public abstract void setHostLogSuffix (String suffix)

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

參數
suffix String

setInvocationTimeout

public abstract void setInvocationTimeout (Long mInvocationTimeout)

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

參數
mInvocationTimeout Long

setLoopMode

public abstract void setLoopMode (boolean loopMode)

設定指令的循環模式

setMultiDeviceCount

public abstract void setMultiDeviceCount (int count)

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

參數
count int

setReplicateSetup

public abstract void setReplicateSetup (boolean replicate)

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

參數
replicate boolean

setReportInvocationComplete

public abstract void setReportInvocationComplete (boolean reportInvocationCompleteLogs)

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

參數
reportInvocationCompleteLogs boolean

setReportTestCaseCount

public abstract void setReportTestCaseCount (boolean report)

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

參數
report boolean

setShardCount

public abstract void setShardCount (Integer shardCount)

設定指令的資料分割數量。

參數
shardCount Integer

setShardIndex

public abstract void setShardIndex (Integer shardIndex)

設定指令的分片索引。

參數
shardIndex Integer

setShouldRemoteDynamicShard

public abstract void setShouldRemoteDynamicShard (boolean shouldRemoteDynamicShard)

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

參數
shouldRemoteDynamicShard boolean

setShouldUseEvenModuleSharding

public abstract void setShouldUseEvenModuleSharding (boolean useEvenModuleSharding)

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

參數
useEvenModuleSharding boolean

setShouldUseSandboxing

public abstract void setShouldUseSandboxing (boolean use)

設定是否應使用 TF 容器

參數
use boolean

setTestTag

public abstract void setTestTag (String testTag)

設定叫用的測試標記。

setUseSandboxTestMode

public abstract void setUseSandboxTestMode (boolean use)

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

參數
use boolean

shouldDisableInvocationSetupAndTeardown

public abstract boolean shouldDisableInvocationSetupAndTeardown ()

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

傳回
boolean

shouldEnableDeviceSpecificSetup

public abstract boolean shouldEnableDeviceSpecificSetup ()

是否啟用裝置專屬設定。

傳回
boolean

shouldForcePreparerFailureAsTestFailure

public abstract boolean shouldForcePreparerFailureAsTestFailure ()

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

傳回
boolean

shouldPassRetryAttemptNumber

public abstract boolean shouldPassRetryAttemptNumber ()

是否要傳遞重試次數。

傳回
boolean

shouldRemoteDynamicShard

public abstract boolean shouldRemoteDynamicShard ()

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

傳回
boolean

shouldReportModuleProgression

public abstract boolean shouldReportModuleProgression ()

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

傳回
boolean

shouldSkipParentProcessLogcat

public abstract boolean shouldSkipParentProcessLogcat ()

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

傳回
boolean

shouldUploadCacheResults

public abstract boolean shouldUploadCacheResults ()

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

傳回
boolean

shouldUploadInvocationCacheResults

public abstract boolean shouldUploadInvocationCacheResults ()

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

傳回
boolean

shouldUseDynamicSharding

public abstract boolean shouldUseDynamicSharding ()

傳回是否應使用動態分片

傳回
boolean

shouldUseEvenModuleSharding

public abstract boolean shouldUseEvenModuleSharding ()

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

傳回
boolean

shouldUseParallelPreInvocationSetup

public abstract boolean shouldUseParallelPreInvocationSetup ()

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

傳回
boolean

shouldUseParallelRemoteSetup

public abstract boolean shouldUseParallelRemoteSetup ()

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

傳回
boolean

shouldUseParallelSetup

public abstract boolean shouldUseParallelSetup ()

是否要嘗試平行設定。

傳回
boolean

shouldUseRemoteSandboxMode

public abstract boolean shouldUseRemoteSandboxMode ()

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

傳回
boolean

shouldUseReplicateSetup

public abstract boolean shouldUseReplicateSetup ()

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

傳回
boolean

shouldUseSandboxTestMode

public abstract boolean shouldUseSandboxTestMode ()

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

傳回
boolean

shouldUseSandboxing

public abstract boolean shouldUseSandboxing ()

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

傳回
boolean

shouldUseTokenSharding

public abstract boolean shouldUseTokenSharding ()

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

傳回
boolean

skipTrybotExperiment

public abstract boolean skipTrybotExperiment ()

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

傳回
boolean

takeBugreportOnInvocationEnded

public abstract boolean takeBugreportOnInvocationEnded ()

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

傳回
boolean

takeBugreportzOnInvocationEnded

public abstract boolean takeBugreportzOnInvocationEnded ()

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

傳回
boolean