IBuildInfo

public interface IBuildInfo
implements Serializable

com.android.tradefed.build.IBuildInfo
Known Indirect Subclasses
AppBuildInfo A IBuildInfo that represents an Android application and its test package(s). 
AppDeviceBuildInfo A IDeviceBuildInfo that also contains a IAppBuildInfo
BuildInfo Generic implementation of a IBuildInfo that should be associated with a ITestDevice
DeviceBuildInfo A IBuildInfo that represents a complete Android device build and (optionally) its tests. 
DeviceFolderBuildInfo A IDeviceBuildInfo that also contains other build artifacts contained in a directory on the local filesystem. 
FolderBuildInfo Concrete implementation of a IFolderBuildInfo
IAppBuildInfo * A IBuildInfo that represents an Android application and its test package(s). 
IDeviceBuildInfo A IBuildInfo that represents a complete Android device build and (optionally) its tests. 
IFolderBuildInfo A simple abstract IBuildInfo whose build artifacts are containing in a local filesystem directory. 
IKernelBuildInfo A IBuildInfo that represents a kernel build. 
ISdkBuildInfo A IBuildInfo that represents an extracted Android SDK and tests. 
KernelBuildInfo A IBuildInfo that represents a kernel build. 
KernelDeviceBuildInfo A IBuildInfo that represents a kernel build paired with a complete Android build. 
OtaDeviceBuildInfo A IDeviceBuildInfo used for over-the-air update testing. 
OtaToolsDeviceBuildInfo An OtaDeviceBuildInfo that also contains an otatools directory. 
OtatoolsBuildInfo An IBuildInfo that contains otatools artifacts. 
SdkBuildInfo Implementation of a ISdkBuildInfo  
SdkFolderBuildInfo A IBuildInfo that represents an extracted Android SDK and tests and additional build artifacts that are contained in a local file system directory. 


Holds information about the build under test.

Summary

Constants

String UNKNOWN_BUILD_ID

Default value when build ID is unknown.

Public methods

abstract void addBuildAttribute(String attributeName, String attributeValue)

Add a build attribute

abstract void cleanUp()

Clean up any temporary build files

abstract IBuildInfo clone()

Clones the IBuildInfo object.

abstract Map<String, String> getBuildAttributes()

Get a set of name-value pairs of additional attributes describing the build.

abstract String getBuildBranch()

Optional method to return the source control branch that the build being tested was produced from.

abstract String getBuildFlavor()

Optional method to return the type of build being tested.

abstract String getBuildId()

Returns the unique identifier of build under test.

abstract String getBuildTargetName()

Return complete name for the build being tested.

abstract String getDeviceSerial()
abstract File getFile(String name)

Helper method to retrieve a file with given name.

abstract Collection<VersionedFile> getFiles()

Returns all VersionedFiles stored in this BuildInfo.

abstract String getTestTag()

Return a unique name for the tests being run.

abstract String getVersion(String name)

Helper method to retrieve a file version with given name.

abstract void setBuildBranch(String branch)

Set the build branch

abstract void setBuildFlavor(String buildFlavor)

Set the build flavor.

abstract void setBuildId(String buildId)

Sets the unique identifier of build under test.

abstract void setDeviceSerial(String serial)

Set the ITestDevice serial associated with this build.

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

Stores an file with given name in this build info.

abstract void setTestTag(String testTag)

Sets the unique name for the tests being run.

Constants

UNKNOWN_BUILD_ID

String UNKNOWN_BUILD_ID

Default value when build ID is unknown.

Constant Value: "-1"

Public methods

addBuildAttribute

void addBuildAttribute (String attributeName, 
                String attributeValue)

Add a build attribute

Parameters
attributeName String: the unique attribute name

attributeValue String: the attribute value

cleanUp

void cleanUp ()

Clean up any temporary build files

clone

IBuildInfo clone ()

Clones the IBuildInfo object.

Returns
IBuildInfo

getBuildAttributes

Map<String, String> getBuildAttributes ()

Get a set of name-value pairs of additional attributes describing the build.

Returns
Map<String, String> a Map of build attributes. Will not be null, but may be empty.

getBuildBranch

String getBuildBranch ()

Optional method to return the source control branch that the build being tested was produced from.

Returns
String the build branch or null if unset/not applicable

getBuildFlavor

String getBuildFlavor ()

Optional method to return the type of build being tested.

A common implementation for Android platform builds is to return (build product)-(build os)-(build variant). ie generic-linux-userdebug

Returns
String the build flavor or null if unset/not applicable

getBuildId

String getBuildId ()

Returns the unique identifier of build under test. Should never be null. Defaults to UNKNOWN_BUILD_ID.

Returns
String

getBuildTargetName

String getBuildTargetName ()

Return complete name for the build being tested.

A common implementation is to construct the build target name from a combination of the build flavor and branch name. [ie (branch name)-(build flavor)]

Returns
String

getDeviceSerial

String getDeviceSerial ()

Returns
String the ITestDevice serial that this build was executed on. Returns null if no device is associated with this build.

getFile

File getFile (String name)

Helper method to retrieve a file with given name.

Returns
File the image file or null if not found

getFiles

Collection<VersionedFile> getFiles ()

Returns all VersionedFiles stored in this BuildInfo.

Returns
Collection<VersionedFile>

getTestTag

String getTestTag ()

Return a unique name for the tests being run.

Returns
String

getVersion

String getVersion (String name)

Helper method to retrieve a file version with given name.

Returns
String the image version or null if not found

setBuildBranch

void setBuildBranch (String branch)

Set the build branch

Parameters
branch String: the branch name

setBuildFlavor

void setBuildFlavor (String buildFlavor)

Set the build flavor.

setBuildId

void setBuildId (String buildId)

Sets the unique identifier of build under test. Should never be null.

Parameters
buildId String

setDeviceSerial

void setDeviceSerial (String serial)

Set the ITestDevice serial associated with this build.

Parameters
serial String: the serial number of the ITestDevice that this build was executed with.

setFile

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

Stores an file with given name in this build info.

Parameters
name String: the unique name of the file

file File: the local File

version String: the file version

setTestTag

void setTestTag (String testTag)

Sets the unique name for the tests being run.

Parameters
testTag String