À partir du 27 mars 2025, nous vous recommandons d'utiliser android-latest-release
au lieu de aosp-main
pour créer et contribuer à AOSP. Pour en savoir plus, consultez la section Modifications apportées à AOSP.
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
BootstrapBuildProvider
public
class
BootstrapBuildProvider
extends Object
implements
IDeviceBuildProvider
java.lang.Object
|
↳ |
com.android.tradefed.build.BootstrapBuildProvider
|
Un IDeviceBuildProvider
qui démarre les informations de compilation à partir de l'appareil de test
Cette option est généralement utilisée pour les appareils avec un build fourni en externe, c'est-à-dire non généré par le système de compilation interne. Certaines informations, en particulier la branche, ne sont pas réellement disponibles sur l'appareil. Elles sont donc générées artificiellement.
Toutes les informations de métadonnées de compilation proviennent de divers champs de propriété ro.* sur l'appareil.
Actuellement, ce fournisseur de compilation génère des métadonnées comme suit:
- branch:
$(ro.product.brand)-$(ro.product.name)-$(ro.product.device)-$(ro.build.version.release),
par exemple :
- Pour le Samsung S4 édition Google Play exécutant Android 4.2: samsung-jgedlteue-jgedlte-4.2
- Pour le Nexus 7 équipé d'Android 4.2: google-nakasi-grouper-4.2
- build flavor: as provided by
ITestDevice.getBuildFlavor()
- build alias: as provided by
ITestDevice.getBuildAlias()
- build id: as provided by
ITestDevice.getBuildId()
Résumé
Constructeurs publics
BootstrapBuildProvider
public BootstrapBuildProvider ()
Méthodes publiques
cleanUp
public void cleanUp (IBuildInfo info)
Nettoyez les fichiers de compilation temporaires.
Paramètres |
info |
IBuildInfo |
getBuild
public IBuildInfo getBuild ()
Récupérez les données pour le build en cours de test.
Renvoie |
IBuildInfo |
IBuildInfo pour le build en cours de test ou null si aucun build n'est disponible pour les tests |
getBuild
public IBuildInfo getBuild (ITestDevice device)
Récupérer les données pour le build en cours de test
Paramètres |
device |
ITestDevice : ITestDevice alloué pour le test |
Renvoie |
IBuildInfo |
IBuildInfo pour le build en cours de test ou null si aucun build n'est disponible pour les tests |
getTestsDir
public final File getTestsDir ()
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/27 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/27 (UTC)."],[],[],null,["# BootstrapBuildProvider\n======================\n\n\n`\npublic\n\n\nclass\nBootstrapBuildProvider\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\nimplements\n\n`[IDeviceBuildProvider](../../../../../../reference/tradefed/com/android/tradefed/build/IDeviceBuildProvider.html)`\n\n\n`\n\n|---|---------------------------------------------------|\n| java.lang.Object ||\n| ↳ | com.android.tradefed.build.BootstrapBuildProvider |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA [IDeviceBuildProvider](../../../../../../reference/tradefed/com/android/tradefed/build/IDeviceBuildProvider.html) that bootstraps build info from the test device\n\n\nThis is typically used for devices with an externally supplied build, i.e. not generated by\nin-house build system. Certain information, specifically the branch, is not actually available\nfrom the device, therefore it's artificially generated.\n\nAll build meta data info comes from various ro.\\* property fields on device\n\nCurrently this build provider generates meta data as follows:\n\n- branch: $(ro.product.brand)-$(ro.product.name)-$(ro.product.device)-$(ro.build.version.release), for example:\n - for Google Play edition Samsung S4 running Android 4.2: samsung-jgedlteue-jgedlte-4.2\n - for Nexus 7 running Android 4.2: google-nakasi-grouper-4.2\n- build flavor: as provided by [ITestDevice.getBuildFlavor()](../../../../../../reference/tradefed/com/android/tradefed/device/INativeDevice.html#getBuildFlavor())\n- build alias: as provided by [ITestDevice.getBuildAlias()](../../../../../../reference/tradefed/com/android/tradefed/device/INativeDevice.html#getBuildAlias())\n- build id: as provided by [ITestDevice.getBuildId()](../../../../../../reference/tradefed/com/android/tradefed/device/INativeDevice.html#getBuildId())\n\n \u003cbr /\u003e\n\n Summary\n -------\n\n | ### Public constructors ||\n |--------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n | ` `[BootstrapBuildProvider](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#BootstrapBuildProvider())`() ` |\n\n | ### Public methods ||\n |--------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` void` | ` `[cleanUp](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#cleanUp(com.android.tradefed.build.IBuildInfo))`(`[IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html)` info) ` Clean up any temporary build files. |\n | ` `[IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) | ` `[getBuild](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#getBuild())`() ` Retrieve the data for build under test. |\n | ` `[IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) | ` `[getBuild](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#getBuild(com.android.tradefed.device.ITestDevice))`(`[ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html)` device) ` Retrieve the data for build under test |\n | ` final File` | ` `[getTestsDir](../../../../../../reference/tradefed/com/android/tradefed/build/BootstrapBuildProvider.html#getTestsDir())`() ` |\n\n Public constructors\n -------------------\n\n ### BootstrapBuildProvider\n\n ```\n public BootstrapBuildProvider ()\n ```\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n Public methods\n --------------\n\n ### cleanUp\n\n ```\n public void cleanUp (IBuildInfo info)\n ```\n\n Clean up any temporary build files.\n\n \u003cbr /\u003e\n\n | Parameters ||\n |--------|---------------------|\n | `info` | `IBuildInfo` \u003cbr /\u003e |\n\n ### getBuild\n\n ```\n public IBuildInfo getBuild ()\n ```\n\n Retrieve the data for build under test.\n\n \u003cbr /\u003e\n\n | Returns ||\n |-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | [IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) | the [IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) for build under test or `null` if no build is available for testing \u003cbr /\u003e |\n\n | Throws ||\n |-----------------------------------------------------------------------------------------------------------------|---|\n | [BuildRetrievalError](../../../../../../reference/tradefed/com/android/tradefed/build/BuildRetrievalError.html) | |\n\n ### getBuild\n\n ```\n public IBuildInfo getBuild (ITestDevice device)\n ```\n\n Retrieve the data for build under test\n\n \u003cbr /\u003e\n\n | Parameters ||\n |----------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n | `device` | `ITestDevice`: the [ITestDevice](../../../../../../reference/tradefed/com/android/tradefed/device/ITestDevice.html) allocated for test \u003cbr /\u003e |\n\n | Returns ||\n |-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | [IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) | the [IBuildInfo](../../../../../../reference/tradefed/com/android/tradefed/build/IBuildInfo.html) for build under test or `null` if no build is available for testing \u003cbr /\u003e |\n\n | Throws ||\n |----------------------------------------------------------------------------------------------------------------------------------|---|\n | [BuildRetrievalError](../../../../../../reference/tradefed/com/android/tradefed/build/BuildRetrievalError.html) | |\n | [DeviceNotAvailableException](../../../../../../reference/tradefed/com/android/tradefed/device/DeviceNotAvailableException.html) | |\n\n ### getTestsDir\n\n ```\n public final File getTestsDir ()\n ```\n\n \u003cbr /\u003e\n\n \u003cbr /\u003e\n\n | Returns ||\n |--------|--------|\n | `File` | \u003cbr /\u003e |"]]