Stay organized with collections Save and categorize content based on your preferences.

PushFilePreparer

public class PushFilePreparer
extends BaseTargetPreparer implements IAbiReceiver, IInvocationContextReceiver, IDiscoverDependencies

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.PushFilePreparer


A ITargetPreparer that attempts to push any number of files from any host path to any device path.

Should be performed *after* a new build is flashed, and *after* DeviceSetup is run (if enabled)

Summary

Public constructors

PushFilePreparer()

Public methods

IAbi getAbi()

final getPushSpecs(DeviceDescriptor descriptor)

Create the list of files to be pushed.

reportDependencies()
File resolveRelativeFilePath(IBuildInfo buildInfo, String fileName)

Resolve relative file path via IBuildInfo and test cases directories.

void setAbi(IAbi abi)

void setInvocationContext(IInvocationContext invocationContext)

void setUp(TestInformation testInfo)

boolean shouldAbortOnFailure()

Whether or not to abort on push failure.

void tearDown(TestInformation testInfo, Throwable e)

Public constructors

PushFilePreparer

public PushFilePreparer ()

Public methods

getAbi

public IAbi getAbi ()

Returns
IAbi

getPushSpecs

public final  getPushSpecs (DeviceDescriptor descriptor)

Create the list of files to be pushed.

Parameters
descriptor DeviceDescriptor

Returns

Throws
TargetSetupError

reportDependencies

public  reportDependencies ()

Returns

resolveRelativeFilePath

public File resolveRelativeFilePath (IBuildInfo buildInfo, 
                String fileName)

Resolve relative file path via IBuildInfo and test cases directories.

Parameters
buildInfo IBuildInfo: the build artifact information

fileName String: relative file path to be resolved

Returns
File the file from the build info or test cases directories

setAbi

public void setAbi (IAbi abi)

Parameters
abi IAbi

setInvocationContext

public void setInvocationContext (IInvocationContext invocationContext)

Parameters
invocationContext IInvocationContext

setUp

public void setUp (TestInformation testInfo)

Parameters
testInfo TestInformation

Throws
BuildError
DeviceNotAvailableException
TargetSetupError

shouldAbortOnFailure

public boolean shouldAbortOnFailure ()

Whether or not to abort on push failure.

Returns
boolean

tearDown

public void tearDown (TestInformation testInfo, 
                Throwable e)

Parameters
testInfo TestInformation

e Throwable

Throws
DeviceNotAvailableException