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 getBuildFlavor()
  • build alias: as provided by getBuildAlias()
  • build id: as provided by 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

    BootstrapBuildProvider ()

    Public methods

    buildNotTested

    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: the IBuildInfo to reset

    cleanUp

    void cleanUp (IBuildInfo info)

    Clean up any temporary build files.

    Parameters
    info IBuildInfo

    getBuild

    IBuildInfo getBuild ()

    Retrieve the data for build under test.

    Returns
    IBuildInfo the IBuildInfo for build under test or null if no build is available for testing

    Throws
    BuildRetrievalError

    getBuild

    IBuildInfo getBuild (ITestDevice device)

    Retrieve the data for build under test

    Parameters
    device ITestDevice: the ITestDevice allocated for test

    Returns
    IBuildInfo the IBuildInfo for build under test or null if no build is available for testing

    Throws
    BuildRetrievalError
    DeviceNotAvailableException