Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release
thay vì aosp-main
để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Trình cung cấp bản dựng trong Tradefed
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Nhà cung cấp bản dựng trong TF được biểu thị bằng giao diện IBuildProvider
.
Bạn có thể sử dụng bất kỳ cách triển khai giao diện nào trong cấu hình kiểm thử. Thiết kế linh hoạt này cho phép tương tác với mọi loại hệ thống.
Nhà cung cấp bản dựng tạo thông tin bản dựng được điền sẵn tất cả tài nguyên cần thiết cho quá trình thiết lập và kiểm thử.
Nhà cung cấp bản dựng cục bộ
Khi chạy cục bộ, có một số cấu hình có thể xảy ra:
- Tìm và sử dụng hình ảnh thiết bị được tạo cục bộ:
LocalDeviceBuildProvider
.
Phương thức này thường được dùng để cài đặt ROM cho hình ảnh Android được tạo cục bộ trước khi chạy các bài kiểm thử.
- Tìm và sử dụng các trường hợp kiểm thử được tạo cục bộ:
BootstrapBuildProvider
.
Phương thức này thường được dùng để chạy kiểm thử trên một thiết bị đã được cài đặt ROM và sẵn sàng. Đây là nhà cung cấp mà Atest sử dụng trong quá trình kiểm thử cục bộ.
Cấu hình
Sử dụng thẻ đối tượng build_provider
. Ví dụ:
<build_provider class="com.android.tradefed.build.BootstrapBuildProvider" />
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],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"]]