推送文件准备器

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

getPushSpecs

public final  getPushSpecs (ITestDevice device)

创建要推送的文件列表。

参数
device ITestDevice

退货

投掷
TargetSetupError

isCleanUpEnabled

public boolean isCleanUpEnabled ()

退货
boolean

报告依赖关系

public  reportDependencies ()

退货

解析相对文件路径

public File resolveRelativeFilePath (IBuildInfo buildInfo, 
                String fileName)

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

参数
buildInfo IBuildInfo :构建工件信息

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

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

设置Abi

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