Effective in 2026, to align with our trunk stable development model and ensure platform stability for the ecosystem, we will publish source code to AOSP in Q2 and Q4. For building and contributing to AOSP, use android-latest-release. The android-latest-release manifest branch will always reference the most recent release pushed to AOSP. For more information, see Changes to AOSP.
测试命令调度程序
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
在 Tradefed 中,每个测试请求都要经过命令调度程序才能运行。因此,命令调度程序是运行测试所需的自动化测试框架的关键组件。
Lifecycle
将测试请求提交给 Tradefed 时(例如,从控制台输入),该请求会在运行之前依次执行以下事件:
- 解析测试请求 - 测试请求通常由 XML Tradefed 配置引用和后跟的选项组成。
例如:
> run host --class com.android.tradefed.build.BuildInfoTest
- 请求设备管理器查找与测试请求匹配的设备 - 设备管理器将分配与测试请求匹配的设备。例如,如果请求 Pixel 设备,则设备管理器将查找可用的 Pixel 设备。
- 测试请求 + 设备以调用的形式启动 - 开始测试。
- 释放设备 - 调用完成后,分配的设备将被释放,并可分配给其他测试。
Tradefed 调用
Tradefed 中的调用是指当前正在执行测试命令。
调用中包含的设备标记为 allocated,其他测试无法使用这些设备来运行。
TF 将按此顺序执行以下步骤:
- 构建和测试工件下载
- 目标准备
- 测试执行
- 目标清理
- 结果报告
在“架构”部分中,更详细地介绍了各个步骤。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-06-18。
[[["易于理解","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"]],["最后更新时间 (UTC):2026-06-18。"],[],[]]