PushFilePreparer

public class PushFilePreparer
extends BaseTargetPreparer implements IAbiReceiver, IDiscoverDependencies, IInvocationContextReceiver

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)

公用建構函式

PushFilePreparer

public PushFilePreparer ()

公用方法

getAbi

public IAbi getAbi ()

傳回
IAbi

getPushSpecs

public final  getPushSpecs (ITestDevice device)

建立要推送的檔案清單。

參數
device ITestDevice

傳回

擲回
TargetSetupError

isCleanUpEnabled

public boolean isCleanUpEnabled ()

傳回
boolean

reportDependencies

public  reportDependencies ()

傳回

routeRelativeFilePath

public File resolveRelativeFilePath (IBuildInfo buildInfo, 
                String fileName)

透過 IBuildInfo 和測試案例目錄解析相對檔案路徑。

參數
buildInfo IBuildInfo:建構構件資訊

fileName String:要解析的相對檔案路徑

傳回
File 請從建構資訊或測試案例目錄中找到該檔案

SetAbi

public void setAbi (IAbi abi)

參數
abi IAbi

setInvocationContext

public void setInvocationContext (IInvocationContext invocationContext)

參數
invocationContext IInvocationContext

設定

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