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.
Tradefed'de cihaz ayırma
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bir test (ör. araç testi) başlatırken testin düzgün şekilde çalışabilmesi için cihaza ihtiyaç duyulabilir. Testin (ör. bazı Java birim testleri) cihaza hiç ihtiyacı olmayabilir. Bazı testler için birden fazla cihaz (ör. telefon + kol saati testleri) gerekebilir. Tüm bu durumlarda, testin düzgün şekilde çalışabilmesi için gerekli cihazları teste ayırmaktan Cihaz Yöneticisi sorumludur. Bu aşamaya cihaz atama veya cihaz seçme adımını deriz.
Atama, bir testin bir cihazdan ihtiyaç duyduğu tüm özellikleri tanımlamasına olanak tanıyan DeviceSelectionOptions tarafından yönlendirilir. Örneğin:
- Pil seviyesi
- Cihaz türü
- Ürün türü
- Seri numarası
Gerçek cihazlar kullanın
Bu, herhangi bir cihaz özelliği belirtmeyen tüm testlere atanacak varsayılan ayardır. KULLANILABİLİR olarak işaretlenmiş rastgele bir fiziksel cihaz seçilir ve teste atanır.
Cihaz kullanmayın
Test için cihaz gerekmediğinde komut satırında --null-device
veya -n
ya da yapılandırma XML'inde <option name="null-device" value="true" />
belirtilebilir. Bu işlem, hiçbir cihazın ayrılmadığını gösteren bir NullDevice yer tutucu ayırır.
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,["# Device allocation in Tradefed\n\nWhen starting a test (for example, an instrumentation test), it might need a\ndevice to be able to run properly. Or the test (such as some Java unit tests)\nmight not need a device at all. Still others or might even need multi-devices\n(like phone + watch tests). In all those cases, the Device Manager is\nresponsible for allocating the required devices to the test so it runs\nproperly. We call this phase the *device allocation* or *device selection* step.\n\nThe allocation is driven by\n[DeviceSelectionOptions](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/src/com/android/tradefed/device/DeviceSelectionOptions.java)\nthat allow a test to declare any properties it needs from a device, including:\n\n- Battery level\n- Device type\n- Product type\n- Serial number\n\nUse real devices\n----------------\n\nThis is the default setting that will be allocated to all tests that don't\nspecify any device properties. A physical random device marked\n[AVAILABLE](/docs/core/tests/tradefed/architecture/device-manager#allocation_states)\nwill be picked and assigned to the test.\n\nUse no devices\n--------------\n\nWhen no devices are needed by the test, it can specify `--null-device` or `-n`\non its command line, or `\u003coption name=\"null-device\" value=\"true\" /\u003e` in its\nconfiguration XML. This allocates a stub placeholder NullDevice that\nrepresents no device was allocated."]]