推送文件准备器

public class PushFilePreparer
extends BaseTargetPreparer implements IAbiReceiver , IInvocationContextReceiver , IDiscoverDependencies

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


ITargetPreparer尝试将任意数量的文件从任何主机路径推送到任何设备路径。

应在刷新新版本并运行 DeviceSetup(如果启用)后执行

概括

公共构造函数

PushFilePreparer ()

公共方法

IAbi getAbi ()

final getPushSpecs ( ITestDevice device)

创建要推送的文件列表。

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

通过IBuildInfo和测试用例目录解析相对文件路径。

void setAbi ( IAbi abi)

void setInvocationContext ( IInvocationContext invocationContext)

void setUp ( TestInformation testInfo)

boolean shouldAbortOnFailure ()

推送失败时是否中止。

boolean shouldRemountSystem ()
boolean shouldRemountVendor ()
void tearDown ( TestInformation testInfo, Throwable e)

公共构造函数

推送文件准备器

public PushFilePreparer ()

公共方法

获取阿比

public IAbi getAbi ()

退货
IAbi

获取推送规格

public final  getPushSpecs (ITestDevice device)

创建要推送的文件列表。

参数
device ITestDevice

退货

投掷
TargetSetupError

是否启用清理

public boolean isCleanUpEnabled ()

退货
boolean

报告依赖关系

public  reportDependencies ()

退货

解析相对文件路径

public File resolveRelativeFilePath (IBuildInfo buildInfo, 
                String fileName)

通过IBuildInfo和测试用例目录解析相对文件路径。

参数
buildInfo IBuildInfo :构建工件信息

fileName String : 待解析的相对文件路径

退货
File构建信息或测试用例目录中的文件

设置阿比

public void setAbi (IAbi abi)

参数
abi IAbi

设置调用上下文

public void setInvocationContext (IInvocationContext invocationContext)

参数
invocationContext IInvocationContext

设置

public void setUp (TestInformation testInfo)

参数
testInfo TestInformation

投掷
BuildError
DeviceNotAvailableException
TargetSetupError

失败时应该中止

public boolean shouldAbortOnFailure ()

推送失败时是否中止。

退货
boolean

应该重新安装系统

public boolean shouldRemountSystem ()

退货
boolean

应该重新安装供应商

public boolean shouldRemountVendor ()

退货
boolean

拆除

public void tearDown (TestInformation testInfo, 
                Throwable e)

参数
testInfo TestInformation

e Throwable

投掷
DeviceNotAvailableException