自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
Tradefed 中的 build 提供程序
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
TF 中的 build 提供程序由 IBuildProvider
接口表示。
该接口的任何实现都可以在测试配置中使用。凭借这种灵活的设计,可以与任何类型的系统进行交互。
build 提供程序可以创建 build 信息,其中填充有设置和测试需要的所有资源。
本地 build 提供程序
在本地运行时,存在几种可能的配置:
配置
使用对象标记 build_provider
。例如:
<build_provider class="com.android.tradefed.build.BootstrapBuildProvider" />
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-04-04。
[null,null,["最后更新时间 (UTC):2025-04-04。"],[],[],null,["# Build providers in Tradefed\n\nBuild providers in TF are represented by the [`IBuildProvider`\ninterface](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/src/com/android/tradefed/build/IBuildProvider.java).\n\nAny implementation of the interface can be used in a test configuration. This\nflexible design allows interacting with any type of system.\n\nA build provider creates [build\ninfo](/docs/core/tests/tradefed/architecture/build-provider/build-info)\npopulated with all the resources needed by the setup and tests.\n\nLocal build providers\n---------------------\n\nWhen running locally, several possible configurations exist:\n\n- Find and use a locally built device image: [`LocalDeviceBuildProvider`](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/src/com/android/tradefed/build/LocalDeviceBuildProvider.java). This is typically used to flash a locally built Android image before running its tests.\n- Find and use locally built test cases: [`BootstrapBuildProvider`](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/src/com/android/tradefed/build/BootstrapBuildProvider.java). This is typically used to run tests against an already flashed and ready device. This is the provider used by [Atest](/docs/core/tests/development/atest) during local testing.\n\nConfiguration\n-------------\n\nUse the object tag `build_provider`. For example: \n\n \u003cbuild_provider class=\"com.android.tradefed.build.BootstrapBuildProvider\" /\u003e"]]