BuildInfo

public class BuildInfo
extends Object implements IBuildInfo

java.lang.Object
   ↳ com.android.tradefed.build.BuildInfo


IBuildInfo का सामान्य तौर पर लागू किया गया वर्शन, जिसे ITestDevice से जोड़ा जाना चाहिए.

खास जानकारी

सार्वजनिक कंस्ट्रक्टर

BuildInfo()

यह डिफ़ॉल्ट एट्रिब्यूट वैल्यू का इस्तेमाल करके, BuildInfo बनाता है.

BuildInfo(String buildId, String buildTargetName)

इस फ़ंक्शन से एक BuildInfo बनता है

पब्लिक मेथड

void addAppPackageFile(File appPackageFile, String version)

यह कमांड, लोकल APK फ़ाइल और उससे जुड़ा वर्शन जोड़ती है.

void addBuildAttribute(String attributeName, String attributeValue)

बिल्ड एट्रिब्यूट जोड़ें.

void addBuildAttributes(Map<String, String> buildAttributes)

बिल्ड एट्रिब्यूट जोड़ना

void allowStagingRemoteFile(boolean stageRemoteFile)

यह कुकी, रिमोट फ़ाइलों को स्टेज करने की अनुमति सेट करती है.

void cleanUp()

कुछ समय तक सेव रहने वाली बिल्ड फ़ाइलों को मिटाएं

void cleanUp(List<File> doNotClean)

cleanUp() का वह वर्शन जिसमें कुछ फ़ाइलें नहीं मिटाई गई हैं.

IBuildInfo clone()

final void copyAllFileFrom(BuildInfo build)

किसी बिल्ड से सभी VersionedFile को इस बिल्ड में कॉपी करें.

boolean equals(Object obj)

static IBuildInfo fromProto(BuildInformation.BuildInfo protoBuild)

इंस्टेंस को वापस पाने के लिए, toProto() की उलटी कार्रवाई करें.

List<VersionedFile> getAppPackageFiles()

यह कुकी, ऐप्लिकेशन की APK फ़ाइल(लों) और उनके वर्शन के सेट की कॉपी को सेव करती है.

Map<String, String> getBuildAttributes()

बिल्ड के बारे में बताने वाले अतिरिक्त एट्रिब्यूट के नाम और वैल्यू वाले जोड़े का सेट पाएं.

String getBuildBranch()

यह तरीका ज़रूरी नहीं है. इससे उस सोर्स कंट्रोल ब्रांच को वापस लाया जा सकता है जिससे टेस्ट किया जा रहा बिल्ड बनाया गया था.

String getBuildFlavor()

यह तरीका, टेस्ट किए जा रहे बिल्ड का टाइप दिखाता है. हालांकि, इसका इस्तेमाल करना ज़रूरी नहीं है.

String getBuildId()

यह फ़ंक्शन, टेस्ट किए जा रहे बिल्ड का यूनीक आइडेंटिफ़ायर दिखाता है.

String getBuildTargetName()

जाँच की जा रही बिल्ड का पूरा नाम दिखाता है.

String getDeviceSerial()

File getFile(String name)

यह हेल्पर तरीका, दिए गए नाम वाली फ़ाइल को वापस पाने के लिए है.

File getFile(BuildInfoKey.BuildInfoFileKey key)

यह हेल्पर तरीका, दिए गए BuildInfoFileKey के साथ किसी फ़ाइल को वापस पाने के लिए है.

Collection<VersionedFile> getFiles()

इस BuildInfo में सेव किए गए सभी VersionedFile दिखाता है.

Set<IBuildInfo.BuildInfoProperties> getProperties()

यह IBuildInfo पर सेट की गई मौजूदा प्रॉपर्टी की कॉपी दिखाता है.

Set<File> getRemoteFiles()

उन बिल्ड आर्टफ़ैक्ट के पाथ पाएं जिन्हें डाउनलोड करने में समय लगता है.

String getTestTag()

यह कुकी, चालू किए गए टेस्ट के लिए कोई यूनीक नाम दिखाती है.

String getVersion(BuildInfoKey.BuildInfoFileKey key)

यह हेल्पर तरीका, दिए गए BuildInfoFileKey के साथ फ़ाइल का वर्शन वापस पाने में मदद करता है.

String getVersion(String name)

यह हेल्पर तरीका, दिए गए नाम के हिसाब से फ़ाइल का वर्शन वापस पाने में मदद करता है.

VersionedFile getVersionedFile(BuildInfoKey.BuildInfoFileKey key)

यह हेल्पर मेथड, दिए गए BuildInfoFileKey के साथ VersionedFile को वापस पाने के लिए है.

final VersionedFile getVersionedFile(String name)

यह हेल्पर तरीका, दिए गए नाम के हिसाब से VersionedFile को वापस पाने के लिए है.

Set<String> getVersionedFileKeys()

यह फ़ंक्शन, getFile(BuildInfoFileKey) के ज़रिए VersionedFile से क्वेरी करने के लिए उपलब्ध कुंजियों का सेट दिखाता है.

final List<VersionedFile> getVersionedFiles(BuildInfoKey.BuildInfoFileKey key)

यह हेल्पर तरीका, किसी दिए गए BuildInfoFileKey से जुड़े VersionedFile की सूची वापस पाने के लिए है.

int hashCode()

void removeBuildAttribute(String attributeName)

ट्रैकिंग से दिए गए attributeName को हटाता है.

void setBuildBranch(String branch)

बिल्ड ब्रांच सेट करना

void setBuildFlavor(String buildFlavor)

बिल्ड फ़्लेवर सेट करें.

void setBuildId(String buildId)

यह कुकी, टेस्ट किए जा रहे बिल्ड का यूनीक आइडेंटिफ़ायर सेट करती है.

void setDeviceSerial(String serial)

इस बिल्ड से जुड़ा ITestDevice सीरियल सेट करें.

void setFile(BuildInfoKey.BuildInfoFileKey key, File file, String version)

यह कुकी, इस बिल्ड की जानकारी में मौजूद BuildInfoFileKey के हिसाब से फ़ाइल सेव करती है.

void setFile(String name, File file, String version)

यह कुकी, इस बिल्ड की जानकारी में दिए गए नाम की फ़ाइल सेव करती है.

void setProperties(BuildInfoProperties... properties)

IBuildInfo इंस्टेंस के लिए BuildInfoProperties सेट करें.

void setTestTag(String testTag)

यह कुकी, चलाए जा रहे टेस्ट के लिए यूनीक नाम सेट करती है.

File stageRemoteFile(String fileName, File workingDir)

बिल्ड की जानकारी के रूट डायरेक्ट्री में मौजूद रिमोट फ़ाइलों का हिस्सा बनने वाली फ़ाइल को स्टेज करें.

BuildInformation.BuildInfo toProto()

BuildInfo इंस्टेंस को प्रोटोबफ़ में सीरियलाइज़ करता है.

String toString()

प्रोटेक्टेड मेथड

void addAllBuildAttributes(BuildInfo build)

यह हेल्पर मेथड, दूसरे बिल्ड से बिल्ड एट्रिब्यूट, ब्रांच, और फ़्लेवर कॉपी करने के लिए है.

void addAllFiles(BuildInfo build)

यह हेल्पर मेथड, दूसरे बिल्ड से सभी फ़ाइलों को कॉपी करने के लिए है.

boolean applyBuildProperties(VersionedFile origFileConsidered, IBuildInfo build, IBuildInfo receiver)

IBuildInfo.BuildInfoProperties में से कुछ को लागू करने की अनुमति देता है. साथ ही, हो सकता है कि इसे अलग तरीके से हैंडल किया जाए.

MultiMap<String, String> getAttributesMultiMap()
Map<String, VersionedFile> getVersionedFileMap()
MultiMap<String, VersionedFile> getVersionedFileMapFull()

सार्वजनिक कंस्ट्रक्टर

BuildInfo

public BuildInfo ()

यह डिफ़ॉल्ट एट्रिब्यूट वैल्यू का इस्तेमाल करके, BuildInfo बनाता है.

BuildInfo

public BuildInfo (String buildId, 
                String buildTargetName)

इस फ़ंक्शन से एक BuildInfo बनता है

पैरामीटर
buildId String: बिल्ड आईडी

buildTargetName String: बिल्ड टारगेट का नाम

पब्लिक मेथड

addAppPackageFile

public void addAppPackageFile (File appPackageFile, 
                String version)

यह कमांड, लोकल APK फ़ाइल और उससे जुड़ा वर्शन जोड़ती है. ध्यान दें कि इस तरीके से जोड़े गए APK, getAppPackageFiles() से उसी क्रम में वापस लाए जाएंगे जिस क्रम में उन्हें जोड़ा गया था.

पैरामीटर
appPackageFile File

version String

addBuildAttribute

public void addBuildAttribute (String attributeName, 
                String attributeValue)

बिल्ड एट्रिब्यूट जोड़ें. इससे मौजूदा attributeName को बदलने की अनुमति नहीं मिलती.

पैरामीटर
attributeName String: यूनीक एट्रिब्यूट का नाम

attributeValue String: एट्रिब्यूट की वैल्यू

addBuildAttributes

public void addBuildAttributes (Map<String, String> buildAttributes)

बिल्ड एट्रिब्यूट जोड़ना

पैरामीटर
buildAttributes Map: जोड़े जाने वाले एट्रिब्यूट का मैप

allowStagingRemoteFile

public void allowStagingRemoteFile (boolean stageRemoteFile)

यह कुकी, रिमोट फ़ाइलों को स्टेज करने की अनुमति सेट करती है.

पैरामीटर
stageRemoteFile boolean

cleanUp

public void cleanUp ()

कुछ समय तक सेव रहने वाली बिल्ड फ़ाइलों को मिटाएं

cleanUp

public void cleanUp (List<File> doNotClean)

cleanUp() का वह वर्शन जिसमें कुछ फ़ाइलें नहीं मिटाई गई हैं.

पैरामीटर
doNotClean List

क्लोन

public IBuildInfo clone ()

रिटर्न
IBuildInfo

copyAllFileFrom

public final void copyAllFileFrom (BuildInfo build)

किसी बिल्ड से सभी VersionedFile को इस बिल्ड में कॉपी करें.

पैरामीटर
build BuildInfo

इसके बराबर है

public boolean equals (Object obj)

पैरामीटर
obj Object

रिटर्न
boolean

fromProto

public static IBuildInfo fromProto (BuildInformation.BuildInfo protoBuild)

इंस्टेंस को वापस पाने के लिए, toProto() की उलटी कार्रवाई करें.

पैरामीटर
protoBuild BuildInformation.BuildInfo

रिटर्न
IBuildInfo

getAppPackageFiles

public List<VersionedFile> getAppPackageFiles ()

यह कुकी, ऐप्लिकेशन की APK फ़ाइल(लों) और उनके वर्शन के सेट की कॉपी को सेव करती है. लौटाए गए ऑर्डर में, उसी क्रम में एपीके शामिल होने चाहिए जिस क्रम में उन्हें IAppBuildInfo में जोड़ा गया था.

रिटर्न
List<VersionedFile>

getBuildAttributes

public Map<String, String> getBuildAttributes ()

बिल्ड के बारे में बताने वाले अतिरिक्त एट्रिब्यूट के नाम और वैल्यू वाले जोड़े का सेट पाएं.

रिटर्न
Map<String, String> बिल्ड एट्रिब्यूट का Map. null नहीं होगा, लेकिन खाली हो सकता है.

getBuildBranch

public String getBuildBranch ()

यह तरीका ज़रूरी नहीं है. इससे उस सोर्स कंट्रोल ब्रांच को वापस लाया जा सकता है जिससे टेस्ट किया जा रहा बिल्ड बनाया गया था.

रिटर्न
String बिल्ड ब्रांच या null अगर सेट नहीं है/लागू नहीं होती है

getBuildFlavor

public String getBuildFlavor ()

यह तरीका, टेस्ट किए जा रहे बिल्ड का टाइप दिखाता है. हालांकि, इसका इस्तेमाल करना ज़रूरी नहीं है.

Android प्लैटफ़ॉर्म के बिल्ड के लिए, सामान्य तौर पर (बिल्ड प्रॉडक्ट)-(बिल्ड ओएस)-(बिल्ड का वैरिएंट) को वापस लाया जाता है. ie generic-linux-userdebug

रिटर्न
String बिल्ड फ़्लेवर या null, अगर सेट नहीं है/लागू नहीं होता है

getBuildId

public String getBuildId ()

यह फ़ंक्शन, टेस्ट किए जा रहे बिल्ड का यूनीक आइडेंटिफ़ायर दिखाता है. यह कभी भी शून्य नहीं होना चाहिए. डिफ़ॉल्ट रूप से, यह UNKNOWN_BUILD_ID पर सेट होता है.

रिटर्न
String

getBuildTargetName

public String getBuildTargetName ()

जाँच की जा रही बिल्ड का पूरा नाम दिखाता है.

आम तौर पर, बिल्ड टारगेट का नाम, बिल्ड फ़्लेवर और ब्रांच के नाम को मिलाकर बनाया जाता है. [ie (branch name)-(build flavor)]

रिटर्न
String

getDeviceSerial

public String getDeviceSerial ()

रिटर्न
String

getFile

public File getFile (String name)

यह हेल्पर तरीका, दिए गए नाम वाली फ़ाइल को वापस पाने के लिए है.

रिटर्न
File इमेज फ़ाइल या null अगर नहीं मिली

getFile

public File getFile (BuildInfoKey.BuildInfoFileKey key)

यह हेल्पर तरीका, दिए गए BuildInfoFileKey के साथ किसी फ़ाइल को वापस पाने के लिए है.

पैरामीटर
key BuildInfoKey.BuildInfoFileKey: वह BuildInfoFileKey जिसके लिए अनुरोध किया गया है.

रिटर्न
File इमेज फ़ाइल या null अगर नहीं मिली

getFiles

public Collection<VersionedFile> getFiles ()

इस BuildInfo में सेव किए गए सभी VersionedFile दिखाता है.

रिटर्न
Collection<VersionedFile>

getProperties

public Set<IBuildInfo.BuildInfoProperties> getProperties ()

यह IBuildInfo पर सेट की गई मौजूदा प्रॉपर्टी की कॉपी दिखाता है.

रिटर्न
Set<IBuildInfo.BuildInfoProperties>

getRemoteFiles

public Set<File> getRemoteFiles ()

उन बिल्ड आर्टफ़ैक्ट के पाथ पाएं जिन्हें डाउनलोड करने में समय लगता है.

रिटर्न
Set<File>

getTestTag

public String getTestTag ()

यह कुकी, चालू किए गए टेस्ट के लिए कोई यूनीक नाम दिखाती है.

रिटर्न
String

getVersion

public String getVersion (BuildInfoKey.BuildInfoFileKey key)

यह हेल्पर तरीका, दिए गए BuildInfoFileKey के साथ फ़ाइल का वर्शन वापस पाने में मदद करता है.

पैरामीटर
key BuildInfoKey.BuildInfoFileKey: यह BuildInfoFileKey के लिए किया गया अनुरोध है.

रिटर्न
String इमेज वर्शन या null अगर नहीं मिला

getVersion

public String getVersion (String name)

यह हेल्पर तरीका, दिए गए नाम के हिसाब से फ़ाइल का वर्शन वापस पाने में मदद करता है.

रिटर्न
String इमेज वर्शन या null अगर नहीं मिला

getVersionedFile

public VersionedFile getVersionedFile (BuildInfoKey.BuildInfoFileKey key)

यह हेल्पर मेथड, दिए गए BuildInfoFileKey के साथ VersionedFile को वापस पाने के लिए है.

पैरामीटर
key BuildInfoKey.BuildInfoFileKey: यह BuildInfoFileKey के लिए किया गया अनुरोध है.

रिटर्न
VersionedFile वर्शन वाली फ़ाइल या null, अगर नहीं मिली है

getVersionedFile

public final VersionedFile getVersionedFile (String name)

यह हेल्पर तरीका, दिए गए नाम के हिसाब से VersionedFile को वापस पाने के लिए है.

रिटर्न
VersionedFile वर्शन वाली फ़ाइल या null, अगर नहीं मिली है

getVersionedFileKeys

public Set<String> getVersionedFileKeys ()

यह फ़ंक्शन, getFile(BuildInfoFileKey) के ज़रिए VersionedFile से क्वेरी करने के लिए उपलब्ध कुंजियों का सेट दिखाता है.

रिटर्न
Set<String>

getVersionedFiles

public final List<VersionedFile> getVersionedFiles (BuildInfoKey.BuildInfoFileKey key)

यह हेल्पर तरीका, किसी दिए गए BuildInfoFileKey से जुड़े VersionedFile की सूची वापस पाने के लिए है. अगर कुंजी, सूची को सेव करने की अनुमति देती है.

पैरामीटर
key BuildInfoKey.BuildInfoFileKey: यह BuildInfoFileKey के लिए किया गया अनुरोध है.

रिटर्न
List<VersionedFile> वर्शन वाली फ़ाइल या null, अगर नहीं मिली है

hashCode

public int hashCode ()

रिटर्न
int

removeBuildAttribute

public void removeBuildAttribute (String attributeName)

ट्रैकिंग से दिए गए attributeName को हटाता है.

पैरामीटर
attributeName String: वह एट्रिब्यूट जिसे ट्रैक करना बंद करना है

setBuildBranch

public void setBuildBranch (String branch)

बिल्ड ब्रांच सेट करना

पैरामीटर
branch String: ब्रांच का नाम

setBuildFlavor

public void setBuildFlavor (String buildFlavor)

बिल्ड फ़्लेवर सेट करें.

setBuildId

public void setBuildId (String buildId)

यह कुकी, टेस्ट किए जा रहे बिल्ड का यूनीक आइडेंटिफ़ायर सेट करती है. यह कभी भी शून्य नहीं होना चाहिए.

पैरामीटर
buildId String

setDeviceSerial

public void setDeviceSerial (String serial)

इस बिल्ड से जुड़ा ITestDevice सीरियल सेट करें.

पैरामीटर
serial String: ITestDevice का सीरियल नंबर, जिससे इस बिल्ड को एक्ज़ीक्यूट किया गया था.

setFile

public void setFile (BuildInfoKey.BuildInfoFileKey key, 
                File file, 
                String version)

यह कुकी, इस बिल्ड की जानकारी में मौजूद BuildInfoFileKey के हिसाब से फ़ाइल सेव करती है.

पैरामीटर
key BuildInfoKey.BuildInfoFileKey: BuildInfoFileKey के आधार पर फ़ाइल का यूनीक नाम.

file File: the local File

version String: फ़ाइल का वर्शन

setFile

public void setFile (String name, 
                File file, 
                String version)

यह कुकी, इस बिल्ड की जानकारी में दिए गए नाम की फ़ाइल सेव करती है.

पैरामीटर
name String: फ़ाइल का यूनीक नाम

file File: the local File

version String: फ़ाइल का वर्शन

setProperties

public void setProperties (BuildInfoProperties... properties)

IBuildInfo इंस्टेंस के लिए BuildInfoProperties सेट करें. पहले से सेट की गई किसी भी मौजूदा प्रॉपर्टी को बदलें.

पैरामीटर
properties BuildInfoProperties: जोड़ने के लिए प्रॉपर्टी की सूची.

setTestTag

public void setTestTag (String testTag)

यह कुकी, चलाए जा रहे टेस्ट के लिए यूनीक नाम सेट करती है.

पैरामीटर
testTag String

stageRemoteFile

public File stageRemoteFile (String fileName, 
                File workingDir)

बिल्ड की जानकारी के रूट डायरेक्ट्री में मौजूद रिमोट फ़ाइलों का हिस्सा बनने वाली फ़ाइल को स्टेज करें.

TODO(b/138416078): Remove this interface and its caller when modules required by a test can be properly built output to the test module's directory itself.

पैरामीटर
fileName String: रिमोट फ़ाइलों में मौजूद उस फ़ाइल का नाम जिसे ढूंढना है.

workingDir File: फ़ाइल को स्टेज करने के लिए, डायरेक्ट्री का File ऑब्जेक्ट.

रिटर्न
File लोकल वर्किंग डायरेक्ट्री में स्टेज की गई फ़ाइल का File ऑब्जेक्ट.

toProto

public BuildInformation.BuildInfo toProto ()

BuildInfo इंस्टेंस को प्रोटोबफ़ में सीरियलाइज़ करता है.

रिटर्न
BuildInformation.BuildInfo

toString

public String toString ()

रिटर्न
String

प्रोटेक्टेड मेथड

addAllBuildAttributes

protected void addAllBuildAttributes (BuildInfo build)

यह हेल्पर मेथड, दूसरे बिल्ड से बिल्ड एट्रिब्यूट, ब्रांच, और फ़्लेवर कॉपी करने के लिए है.

पैरामीटर
build BuildInfo

addAllFiles

protected void addAllFiles (BuildInfo build)

यह हेल्पर मेथड, दूसरे बिल्ड से सभी फ़ाइलों को कॉपी करने के लिए है.

यह फ़ाइलों के लिए नए हार्डलिंक बनाता है, ताकि हर बिल्ड में फ़ाइल का यूनीक फ़ाइल पाथ हो.

पैरामीटर
build BuildInfo

थ्रो
IOException अगर हार्डलिंक बनाते समय कोई अपवाद मिलता है.

applyBuildProperties

protected boolean applyBuildProperties (VersionedFile origFileConsidered, 
                IBuildInfo build, 
                IBuildInfo receiver)

IBuildInfo.BuildInfoProperties में से कुछ को लागू करने की अनुमति देता है. साथ ही, हो सकता है कि इसे अलग तरीके से हैंडल किया जाए.

पैरामीटर
origFileConsidered VersionedFile: फ़िलहाल, VersionedFile देखा जा रहा है.

build IBuildInfo: वह ओरिजनल बिल्ड जिसका क्लोन बनाया जा रहा है

receiver IBuildInfo: वह बिल्ड जिसे जानकारी मिल रही है.

रिटर्न
boolean अगर हमने प्रॉपर्टी लागू कर दी हैं और आगे की प्रोसेस को स्किप किया जाना चाहिए, तो यह वैल्यू 'सही' होती है. अगर ऐसा नहीं है, तो वैल्यू 'गलत' दिखती है.

getAttributesMultiMap

protected MultiMap<String, String> getAttributesMultiMap ()

रिटर्न
MultiMap<String, String>

getVersionedFileMap

protected Map<String, VersionedFile> getVersionedFileMap ()

रिटर्न
Map<String, VersionedFile>

getVersionedFileMapFull

protected MultiMap<String, VersionedFile> getVersionedFileMapFull ()

रिटर्न
MultiMap<String, VersionedFile>