自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
BaseRetryDecision
public
class
BaseRetryDecision
extends Object
implements
IConfigurationReceiver,
IRetryDecision,
ITestInformationReceiver
java.lang.Object
|
↳ |
com.android.tradefed.retry.BaseRetryDecision
|
IRetryDecision
的基本實作項目。基本實作只會考量本機信號。
摘要
公用方法 |
void
|
addLastAttempt( lastResults)
ERROR(/#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List)) 很可能會在最後一次重試嘗試之前呼叫,因此我們可能會遺漏統計用途的最後一次嘗試結果。
|
void
|
addToSkipRetryList(String filterEntry)
新增項目,略過重試。
|
|
getCommandLineArgs()
傳回重試決定的指令列引數。
|
CurrentInvocation.IsolationGrade
|
getIsolationGrade()
|
int
|
getMaxTestCaseAttempts()
自動重試期間,每個測試執行的最大嘗試次數。
|
int
|
getMaxTestCaseAttempts(ModuleDefinition module)
自動重試期間,指定模組的每個測試執行次數上限。
|
int
|
getMaxTestRunAttempts()
自動重試期間,每個測試執行的最大嘗試次數。
|
int
|
getMaxTestRunAttempts(ModuleDefinition module)
自動重試期間,指定模組的每個測試執行次數上限。
|
RetryStatistics
|
getRetryStatistics()
傳回代表重試的 RetryStatistics 。
|
RetryStrategy
|
getRetryStrategy()
自動重試期間使用的 RetryStrategy 。
|
|
getSkipRetrySet()
|
TestInformation
|
getTestInformation()
|
boolean
|
isAutoRetryEnabled()
是否啟用自動重試功能。
|
boolean
|
rebootAtLastAttempt()
在最後一次嘗試前,是否要重新啟動裝置。
|
void
|
setConfiguration(IConfiguration configuration)
插入正在使用的 IConfiguration 。
|
void
|
setInvocationContext(IInvocationContext context)
設定目前的叫用內容。
|
void
|
setTestInformation(TestInformation testInformation)
|
boolean
|
shouldRetry(IRemoteTest test, ModuleDefinition module, int attemptJustExecuted, previousResults, DeviceNotAvailableException dnae)
決定是否應嘗試重試。
|
boolean
|
shouldRetry(IRemoteTest test, int attemptJustExecuted, previousResults)
決定是否應嘗試重試。
|
RetryPreparationDecision
|
shouldRetryPreparation(ModuleDefinition module, int attempt, int maxAttempt)
決定是否應重試模組準備作業。
|
boolean
|
useUpdatedReporting()
如果應使用更新版報表,則會傳回 true。
|
公用建構函式
BaseRetryDecision
public BaseRetryDecision ()
重試決定的建構函式
公用方法
addToSkipRetryList
public void addToSkipRetryList (String filterEntry)
新增項目來略過重試。
getCommandLineArgs
public getCommandLineArgs ()
傳回重試決定的指令列引數。
getMaxTestCaseAttempts
public int getMaxTestCaseAttempts ()
自動重試期間,每個測試執行的嘗試次數上限。
getMaxTestCaseAttempts
public int getMaxTestCaseAttempts (ModuleDefinition module)
自動重試期間,針對特定模組的每個測試執行次數上限。
參數 |
module |
ModuleDefinition |
getMaxTestRunAttempts
public int getMaxTestRunAttempts ()
自動重試期間,每個測試執行的嘗試次數上限。
getMaxTestRunAttempts
public int getMaxTestRunAttempts (ModuleDefinition module)
自動重試期間,針對特定模組的每個測試執行次數上限。
參數 |
module |
ModuleDefinition |
getSkipRetrySet
public getSkipRetrySet ()
isAutoRetryEnabled
public boolean isAutoRetryEnabled ()
是否啟用自動重試功能。
rebootAtLastAttempt
public boolean rebootAtLastAttempt ()
在最後一次嘗試前,是否要重新啟動裝置。
setInvocationContext
public void setInvocationContext (IInvocationContext context)
設定目前的叫用內容。
參數 |
context |
IInvocationContext |
public void setTestInformation (TestInformation testInformation)
參數 |
testInformation |
TestInformation |
shouldRetry
public boolean shouldRetry (IRemoteTest test,
int attemptJustExecuted,
previousResults)
決定是否應重試。另外,請對要重試的 IRemoteTest
進行必要變更 (例如套用篩選器)。
傳回 |
boolean |
如果應重試,則傳回 True,否則傳回 False。 |
shouldRetryPreparation
public RetryPreparationDecision shouldRetryPreparation (ModuleDefinition module,
int attempt,
int maxAttempt)
決定是否應重試模組準備作業。
參數 |
module |
ModuleDefinition |
attempt |
int |
maxAttempt |
int |
useUpdatedReporting
public boolean useUpdatedReporting ()
如果應使用更新版報表,則會傳回 true。
受保護的方法
isolateRetry
protected void isolateRetry ( devices)
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-06-12 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-06-12 (世界標準時間)。"],[],[]]