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.
Test Komut Planlayıcı
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Tradefed'de her test isteği, çalıştırılmak için Komut Planlayıcı'dan geçer. Bu nedenle Komut Planlayıcı, test çalıştırmak için gereken donanımların önemli bir bileşenidir.
Yaşam döngüsü
Tradefed'e sunulan bir test isteği (ör. konsoldan gelen giriş), çalıştırılmadan önce aşağıdaki etkinliklerden geçer:
- Test isteği ayrıştırılır: Test isteği genellikle bir XML Tradefed yapılandırma referansından ve ardından seçeneklerden oluşur.
Örneğin:
> run host --class com.android.tradefed.build.BuildInfoTest
- Test isteğiyle eşleşen cihazlar için Cihaz Yöneticisi'nden istek alınır: Cihaz Yöneticisi, test istekleriyle eşleşen bir cihaz ayırır. Örneğin, bir Pixel cihaz istenirse Cihaz Yöneticisi, kullanılabilir bir Pixel cihaz arar.
- Test isteği + cihazlar çağrı olarak başlatılıyor: Test başlıyor.
- Cihazın serbest bırakılması: Çağırma işlemi tamamlandıktan sonra, ayrılan cihaz serbest bırakılır ve diğer testler için ayrılabilir.
Tradefed çağrısı
Tradefed'de çağrı, bir test komutunun şu anda yürütülmekte olduğu zamanı ifade eder.
Çağrıya dahil edilen cihazlar allocated
olarak işaretlenir ve çalıştırılacak diğer testler tarafından kullanılamaz.
TF aşağıdaki adımları bu sırayla yürütür:
- Yapı derleme ve test yapılarını indirme
- Hedef hazırlama
- Test yürütme
- Hedef temizleme
- Sonuç raporlama
Her adım, Mimari bölümünde daha ayrıntılı olarak açıklanmıştı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,["# Test Command Scheduler\n\nIn Tradefed, every single test request goes through the\n[Command Scheduler](https://android.googlesource.com/platform/tools/tradefederation/+/refs/heads/android16-release/src/com/android/tradefed/command/CommandScheduler.java)\nto be run. So the Command Scheduler is a key component of the harness needed to\nrun tests.\n\nLifecycle\n---------\n\nWhen a test request is presented to Tradefed (for example, input from the\nconsole), it will go through the following events before being run:\n\n1. *Test request is parsed* - A test request is usually composed of an XML Tradefed configuration reference followed by options. For example: `\u003e run host --class com.android.tradefed.build.BuildInfoTest`\n2. *Device Manager is requested for device(s) matching the test request* - Device Manager [allocates a device](/docs/core/tests/tradefed/architecture/device-manager/device-allocation) that matches the test requests. For example, if a Pixel device is requested then Device Manager will look for an available Pixel device.\n3. *Test request + device(s) starts as an invocation* - Testing is starting.\n4. *Device release* - Once the invocation is finished, the device allocated will be released and can be allocated for other tests.\n\nTradefed invocation\n-------------------\n\nAn invocation in Tradefed refers to when a test command is currently executing.\nDevices included in the invocation are marked as `allocated` and cannot be used\nby other tests to run.\n\nTF will execute the following steps in this order:\n\n1. [Build and test artifacts download](/docs/core/tests/tradefed/architecture/build-provider)\n2. [Target preparation](/docs/core/tests/tradefed/architecture/target-preparer)\n3. [Test execution](/docs/core/tests/tradefed/architecture/advanced/test-runner)\n4. [Target clean up](/docs/core/tests/tradefed/architecture/target-preparer)\n5. [Result reporting](/docs/core/tests/tradefed/architecture/result-reporter)\n\nEach step is described in more detail within the\n[Architecture section](/docs/core/tests/tradefed/architecture)."]]