PushFilePreparer
public
class
PushFilePreparer
extends BaseTargetPreparer
implements
ITargetCleaner,
IAbiReceiver,
IInvocationContextReceiver
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()
|
File
|
resolveRelativeFilePath(IBuildInfo buildInfo, String fileName)
Resolve relative file path via |
void
|
setAbi(IAbi abi)
|
void
|
setInvocationContext(IInvocationContext invocationContext)
|
void
|
setUp(ITestDevice device, IBuildInfo buildInfo)
Perform the target setup for testing. |
void
|
tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e)
Perform the target cleanup/teardown after testing. |
Public constructors
PushFilePreparer
public PushFilePreparer ()
Public methods
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 |
setInvocationContext
public void setInvocationContext (IInvocationContext invocationContext)
Parameters | |
---|---|
invocationContext |
IInvocationContext |
setUp
public void setUp (ITestDevice device, IBuildInfo buildInfo)
Perform the target setup for testing.
Parameters | |
---|---|
device |
ITestDevice : the ITestDevice to prepare. |
buildInfo |
IBuildInfo : data about the build under test. |
Throws | |
---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
tearDown
public void tearDown (ITestDevice device, IBuildInfo buildInfo, Throwable e)
Perform the target cleanup/teardown after testing.
Parameters | |
---|---|
device |
ITestDevice : the ITestDevice to prepare. |
buildInfo |
IBuildInfo : data about the build under test. |
e |
Throwable : if the invocation ended with an exception, this will be the exception that was
caught at the Invocation level. Otherwise, will be null . |
Throws | |
---|---|
DeviceNotAvailableException |