自 2026 年起,为了与我们的主干稳定开发模型保持一致,并确保生态系统的平台稳定性,我们将在第 2 季度和第 4 季度将源代码发布到 AOSP。对于构建 AOSP 和向 AOSP 贡献代码,我们建议使用 android-latest-release 而不是 aosp-main。android-latest-release 清单分支将始终引用推送到 AOSP 的最新版本。如需了解详情,请参阅 AOSP 变更。
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
GranularRetriableTestWrapper
public
class
GranularRetriableTestWrapper
extends Object
implements
IRemoteTest,
ITestCollector
| java.lang.Object
|
| ↳ |
com.android.tradefed.testtype.suite.GranularRetriableTestWrapper
|
一个封装容器类,用于在测试用例级别对 IRemoteTest 进行细化。
一个 IRemoteTest 可以包含多个测试用例。以前,这些测试用例被视为一个整体:当 IRemoteTest 运行时,所有测试用例都会运行。某些 IRemoteTest(实现 ITestFilterReceiver 的测试)可以接受测试用例的许可名单,并仅运行这些测试用例。此类利用了现有功能,并提供了一种更灵活的运行测试套件的方式。
- 单个测试用例可以重试多次(在同一 IRemoteTest 运行中),以降低非测试错误失败率。
- 重新尝试的测试用例是从之前的运行失败中动态收集的。
注意:
摘要
公共构造函数 |
GranularRetriableTestWrapper(IRemoteTest test, ITestInvocationListener mainListener, int maxRunLimit)
|
GranularRetriableTestWrapper(IRemoteTest test, ModuleDefinition module, ITestInvocationListener mainListener, int maxRunLimit)
|
GranularRetriableTestWrapper(IRemoteTest test, ModuleDefinition module, ITestInvocationListener mainListener, int maxRunLimit, boolean useModuleResultsForwarder, boolean removeModuleBuffering, int targetPreparerRetryCount)
|
公共构造函数
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ITestInvocationListener mainListener,
int maxRunLimit)
| 参数 |
test |
IRemoteTest |
mainListener |
ITestInvocationListener |
maxRunLimit |
int |
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ModuleDefinition module,
ITestInvocationListener mainListener,
int maxRunLimit)
| 参数 |
test |
IRemoteTest |
module |
ModuleDefinition |
mainListener |
ITestInvocationListener |
maxRunLimit |
int |
GranularRetriableTestWrapper
public GranularRetriableTestWrapper (IRemoteTest test,
ModuleDefinition module,
ITestInvocationListener mainListener,
int maxRunLimit,
boolean useModuleResultsForwarder,
boolean removeModuleBuffering,
int targetPreparerRetryCount)
| 参数 |
test |
IRemoteTest |
module |
ModuleDefinition |
mainListener |
ITestInvocationListener |
maxRunLimit |
int |
useModuleResultsForwarder |
boolean |
removeModuleBuffering |
boolean |
targetPreparerRetryCount |
int |
公共方法
getExpectedTestsCount
public final int getExpectedTestsCount ()
计算 IRemoteTest 中的测试用例数量。此值用于区分多次重新调度的相同测试用例。
getFinalTestRunResults
public final getFinalTestRunResults ()
从每次 IRemoteTest 运行中获取合并的 TestRunResults。
getPassedTests
public final getPassedTests ()
getResultListener
public ModuleListener getResultListener ()
返回包含所有结果的监听器。
getRetryCount
public int getRetryCount ()
setCollectTestsOnly
public void setCollectTestsOnly (boolean shouldCollectTest)
启用或停用测试收集模式
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-12-04。
[null,null,["最后更新时间 (UTC):2025-12-04。"],[],[]]