PushFilePreparer
public
class
PushFilePreparer
extends BaseTargetPreparer
implements
IAbiReceiver,
IDiscoverDependencies,
IInvocationContextReceiver
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.PushFilePreparer | |
一个 ITargetPreparer,用于尝试将任意数量的文件从任意主机路径推送到任意设备路径。
应在刷写新 build 和运行 DeviceSetup(如果已启用)*之后*执行
摘要
公共构造函数 | |
|---|---|
PushFilePreparer()
|
|
公共方法 | |
|---|---|
IAbi
|
getAbi()
|
final
|
getPushSpecs(ITestDevice device)
创建要推送的文件列表。 |
boolean
|
isCleanUpEnabled()
|
|
reportDependencies()
|
File
|
resolveRelativeFilePath(IBuildInfo buildInfo, String fileName)
通过 |
void
|
setAbi(IAbi abi)
|
void
|
setInvocationContext(IInvocationContext invocationContext)
|
void
|
setUp(TestInformation testInfo)
|
boolean
|
shouldAbortOnFailure()
是否在推送失败时中止。 |
boolean
|
shouldRemountSystem()
|
boolean
|
shouldRemountVendor()
|
void
|
tearDown(TestInformation testInfo, Throwable e)
|
公共构造函数
PushFilePreparer
public PushFilePreparer ()
公共方法
getPushSpecs
public finalgetPushSpecs (ITestDevice device)
创建要推送的文件列表。
| 参数 | |
|---|---|
device |
ITestDevice |
| 返回 | |
|---|---|
|
|
| 抛出 | |
|---|---|
TargetSetupError |
|
isCleanUpEnabled
public boolean isCleanUpEnabled ()
| 返回 | |
|---|---|
boolean |
|
reportDependencies
publicreportDependencies ()
| 返回 | |
|---|---|
|
|
resolveRelativeFilePath
public File resolveRelativeFilePath (IBuildInfo buildInfo, String fileName)
通过 IBuildInfo 和测试用例目录解析相对文件路径。
| 参数 | |
|---|---|
buildInfo |
IBuildInfo:build 工件信息 |
fileName |
String:要解析的相对文件路径 |
| 返回 | |
|---|---|
File |
build 信息或测试用例目录中的文件 |
setInvocationContext
public void setInvocationContext (IInvocationContext invocationContext)
| 参数 | |
|---|---|
invocationContext |
IInvocationContext |
setUp
public void setUp (TestInformation testInfo)
| 参数 | |
|---|---|
testInfo |
TestInformation |
| 抛出 | |
|---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
shouldAbortOnFailure
public boolean shouldAbortOnFailure ()
是否在推送失败时中止。
| 返回 | |
|---|---|
boolean |
|
shouldRemountSystem
public boolean shouldRemountSystem ()
| 返回 | |
|---|---|
boolean |
|
shouldRemountVendor
public boolean shouldRemountVendor ()
| 返回 | |
|---|---|
boolean |
|
tearDown
public void tearDown (TestInformation testInfo, Throwable e)
| 参数 | |
|---|---|
testInfo |
TestInformation |
e |
Throwable |
| 抛出 | |
|---|---|
DeviceNotAvailableException |
|