BootstrapBuildProvider
public
class
BootstrapBuildProvider
extends Object
implements
IDeviceBuildProvider
java.lang.Object | |
↳ | com.android.tradefed.build.BootstrapBuildProvider |
A IDeviceBuildProvider
that bootstraps build info from the test device
This is typically used for devices with an externally supplied build, i.e. not generated by in-house build system. Certain information, specifically the branch, is not actually available from the device, therefore it's artificially generated.
All build meta data info comes from various ro.* property fields on device
Currently this build provider generates meta data as follows:
- branch:
$(ro.product.brand)-$(ro.product.name)-$(ro.product.device)-$(ro.build.version.release),
for example:
- for Google Play edition Samsung S4 running Android 4.2: samsung-jgedlteue-jgedlte-4.2
- for Nexus 7 running 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()
Summary
Public constructors
BootstrapBuildProvider()
Public methods
void
buildNotTested(IBuildInfo info)
Mark the given build as untested.
void
cleanUp(IBuildInfo info)
Clean up any temporary build files.
IBuildInfo
getBuild()
Retrieve the data for build under test.
IBuildInfo
getBuild(ITestDevice device)
Retrieve the data for build under test
Public constructors
BootstrapBuildProvider
public BootstrapBuildProvider ()
Public methods
buildNotTested
public void buildNotTested (IBuildInfo info)
Mark the given build as untested.
Called in cases where TradeFederation has failed to complete testing on the build due to an environment problem.Parameters info
IBuildInfo
: theIBuildInfo
to resetcleanUp
public void cleanUp (IBuildInfo info)
Clean up any temporary build files.
Parameters info
IBuildInfo
getBuild
public IBuildInfo getBuild ()
Retrieve the data for build under test.
Returns IBuildInfo
the IBuildInfo
for build under test ornull
if no build is available for testingThrows BuildRetrievalError
getBuild
public IBuildInfo getBuild (ITestDevice device)
Retrieve the data for build under test
Parameters device
ITestDevice
: theITestDevice
allocated for testReturns IBuildInfo
the IBuildInfo
for build under test ornull
if no build is available for testingThrows BuildRetrievalError
DeviceNotAvailableException