हमारा सुझाव है कि 27 मार्च, 2025 से AOSP को बनाने और उसमें योगदान देने के लिए, aosp-main
के बजाय android-latest-release
का इस्तेमाल करें. ज़्यादा जानकारी के लिए, AOSP में हुए बदलाव लेख पढ़ें.
Tradefed में डिवाइस का बंटवारा
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
किसी टेस्ट (उदाहरण के लिए, इंस्ट्रूमेंटेशन टेस्ट) को शुरू करने के लिए, हो सकता है कि उसे ठीक से चलने के लिए डिवाइस की ज़रूरत पड़े. इसके अलावा, हो सकता है कि टेस्ट के लिए किसी डिवाइस की ज़रूरत न हो. जैसे, कुछ Java यूनिट टेस्ट. कुछ अन्य मामलों में, एक से ज़्यादा डिवाइसों की ज़रूरत पड़ सकती है. जैसे, फ़ोन और स्मार्टवॉच की जांच. इन सभी मामलों में, डिवाइस मैनेजर की ज़िम्मेदारी है कि वह टेस्ट के लिए ज़रूरी डिवाइसों को असाइन करे, ताकि टेस्ट सही तरीके से चल सके. हम इस चरण को डिवाइस का ऐलोकेशन या डिवाइस का सिलेक्शन चरण कहते हैं.
डिवाइस का ऐलोकेशन, DeviceSelectionOptions के हिसाब से होता है. इससे किसी टेस्ट को किसी डिवाइस से ज़रूरी प्रॉपर्टी का एलान करने में मदद मिलती है. इनमें ये प्रॉपर्टी शामिल हैं:
- बैटरी लेवल
- डिवाइस किस तरह का है
- प्रॉडक्ट टाइप
- सीरियल नंबर
असली डिवाइसों का इस्तेमाल करना
यह डिफ़ॉल्ट सेटिंग उन सभी टेस्ट के लिए तय की जाएगी जिनमें किसी डिवाइस प्रॉपर्टी के बारे में जानकारी नहीं दी गई है. उपलब्ध है के तौर पर मार्क किया गया कोई भी डिवाइस चुना जाएगा और उसे टेस्ट के लिए असाइन किया जाएगा.
किसी भी डिवाइस का इस्तेमाल न करना
जब टेस्ट के लिए किसी डिवाइस की ज़रूरत नहीं होती है, तो वह अपनी कमांड लाइन पर --null-device
या -n
या अपने कॉन्फ़िगरेशन एक्सएमएल में <option name="null-device" value="true" />
बता सकता है. इससे एक स्टब प्लेसहोल्डर NullDevice को ऐलोकेट किया जाता है, जिससे पता चलता है कि कोई डिवाइस ऐलोकेट नहीं किया गया था.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, Oracle और/या इससे जुड़ी हुई कंपनियों के ट्रेडमार्क या रजिस्टर किए हुए ट्रेडमार्क हैं.
आखिरी बार 2025-07-27 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 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."]]