27 Mart 2025'ten itibaren AOSP'yi derlemek ve AOSP'ye katkıda bulunmak için aosp-main yerine android-latest-release kullanmanızı öneririz. Daha fazla bilgi için AOSP'de yapılan değişiklikler başlıklı makaleyi inceleyin.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
TF'deki BuildInfo, test kurulumu ve çalıştırma için kaynakları taşımak amacıyla yaygın olarak kullanılan bir nesnedir.
Cihaz resimlerinden test APK'larına kadar her şey BuildInfo'te depolanır veya bağlanır.
Bu sayede, test kaynaklarından test kaynaklarına tek bir yolla erişebilir ve testin test kaynaklarını almasını engelleyebilirsiniz.
BuildInfo mülkleri
BuildInfo nesnelerinin iki ana özelliği özellikler ve dosyalardır:
#addBuildAttribute() ile özellikler eklenebilir. Bu özellikler, derlemelerde etiketleri ve dize bilgilerini temsil eder. Özellikler, derlemeyle ilgili bilgileri depolamak için kullanılabilir.
setFile() ile dosya eklenebilir. Dosya, çağrı yaşam döngüsü sırasında BuildInfo tarafından izlenir ve yönetilir (örneğin, bölme sırasında uygun şekilde yönetilir). Bu sayede testin dosya sistemi hakkında bilgi sahibi olması gerekmez. Bunun yerine, kaynakları almak için soyut BuildInfo nesnesine güvenebilir.
Birden fazla cihazda BuildInfo
Birden fazla cihazla test yapılandırması oluşturulduğunda her cihaz için bir BuildInfo
nesnesi bulunur. Bu sayede, bir cihazdan diğerine dosya isteğinde bulunabilir ve dosya hedefleyebilirsiniz.
Çoklu derlemelerde BuildInfo
Birden fazla hedeften derlemeler isteyebilirsiniz. Bu durumlarda, hedef başına bir BuildInfo nesnesi bulunur. Bu sayede, herhangi bir hedeften dosya isteyebilir ve hedefleyebilirsiniz.
Proto biçimi
BuildInfo, gerekirse sistemler arasında kullanımını kolaylaştırmak için protobuf biçiminde serileştirilebilir.
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# BuildInfo in Tradefed\n\n[`BuildInfo`](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/src/com/android/tradefed/build/BuildInfo.java)\nin TF is a widely used object to carry resources for test setup and runs.\nEverything from device images to test APKs are stored or linked in `BuildInfo`.\nThis allows a unified way to access test resources from a test\nand decouple the test from getting test resources.\n\nBuildInfo properties\n--------------------\n\nThe two main properties of `BuildInfo` objects are attributes and files:\n\n- *Attributes* can be added with `#addBuildAttribute()`; they represent labels and string information to the builds. Attributes can be used to store information related to the build.\n- *Files* can be added with `setFile()`; the file is tracked and managed by `BuildInfo` during the invocation lifecycle (for example, properly handled during sharding). This avoids the need for the test to know anything about the file system and instead can rely on the abstracted `BuildInfo` object to get their resources.\n\n| **Note:** Files should always be stored in `Files` and not in `Attributes` as an absolute path. Attributes are treated as pure Java strings, and the reference could be invalidated during part of the invocation lifecycle.\n\nBuildInfo in multi-devices\n--------------------------\n\nWhen a test configuration is set up with multiple devices, one `BuildInfo`\nobject exists per device. This allows requesting and targeting files from one\ndevice to another.\n\nBuildInfo in multi-builds\n-------------------------\n\nIt's possible to require builds from several targets. In these cases, one\n`BuildInfo` object exists per target. This allows requesting and targeting\nfiles from any target.\n\nProto format\n------------\n\n`BuildInfo` is serializable in a protobuf format to make its usage easier across\nsystems if needed."]]