DeviceFlashPreparer
public
abstract
class
DeviceFlashPreparer
extends BaseTargetPreparer
implements
IConfigurationReceiver,
ITestLoggerReceiver
| java.lang.Object | ||
| ↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
| ↳ | com.android.tradefed.targetprep.DeviceFlashPreparer | |
실제 Android 하드웨어에 이미지를 플래시하는 ITargetPreparer입니다.
요약
공개 생성자 | |
|---|---|
DeviceFlashPreparer()
|
|
공개 메서드 | |
|---|---|
void
|
addAllowedBranchForTransitionInIncremental(String branch)
|
void
|
addBranchTransitionInIncremental(String origin, String destination)
|
IBuildInfo
|
getBuild(TestInformation testInfo)
특정 시나리오에서 재정의할 수 있도록 getBuildInfo를 래핑합니다. |
ITestLogger
|
getTestLogger()
|
boolean
|
isIncrementalFlashingEnabled()
|
boolean
|
isIncrementalFlashingForceDisabled()
|
void
|
setAllowCrossReleaseFlashing(boolean allowCrossReleaseFlashing)
|
void
|
setAllowUnzipBaseline(boolean allowUnzipBaseline)
|
void
|
setApplySnapshot(boolean applySnapshot)
|
void
|
setConfiguration(IConfiguration configuration)
사용 중인 |
void
|
setIgnoreHostOptions(boolean ignoreHostOptions)
|
void
|
setTestLogger(ITestLogger testLogger)
|
void
|
setUp(TestInformation testInfo)
|
void
|
setUpdateBootloaderFromUserspace(boolean updateBootloaderFromUserspace)
|
void
|
setUseIncrementalNewFlow(boolean useIncrementalNewFlow)
|
void
|
setUserDataFlashOption(IDeviceFlasher.UserDataFlashOption flashOption)
userdata-flash 옵션 설정 |
void
|
setWipeAfterApplySnapshot(boolean wipeAfterApplySnapshot)
|
void
|
tearDown(TestInformation testInfo, Throwable e)
|
void
|
useMerkleTreeComparison(boolean enableMerkleTreeComparison)
|
보호된 메서드 | |
|---|---|
void
|
checkDeviceProductType(ITestDevice device, IDeviceBuildInfo deviceBuild)
플래시하기 전에 기기가 빌드 정보와 예상대로 동작하는지 확인할 수 있습니다. |
abstract
IDeviceFlasher
|
createFlasher(ITestDevice device)
사용할 |
long
|
getDeviceBootWaitTime()
기기 부팅 대기 시간을 가져옵니다. |
IHostOptions
|
getHostOptions()
사용할 |
void
|
reportFlashMetrics(String branch, String buildFlavor, String buildId, String serial, long queueTime, long flashingTime, CommandStatus flashingStatus)
기기 플래시 타이밍 데이터를 측정항목 백엔드에 보고합니다. |
void
|
setSkipPostFlashBuildIdCheck(boolean skipPostFlashBuildIdCheck)
|
void
|
setUseIncrementalFlashing(boolean incrementalFlashing)
|
공개 생성자
DeviceFlashPreparer
public DeviceFlashPreparer ()
공개 메서드
addAllowedBranchForTransitionInIncremental
public void addAllowedBranchForTransitionInIncremental (String branch)
| 매개변수 | |
|---|---|
branch |
String |
addBranchTransitionInIncremental
public void addBranchTransitionInIncremental (String origin,
String destination)| 매개변수 | |
|---|---|
origin |
String |
destination |
String |
getBuild
public IBuildInfo getBuild (TestInformation testInfo)
특정 시나리오에서 재정의할 수 있도록 getBuildInfo를 래핑합니다.
| 매개변수 | |
|---|---|
testInfo |
TestInformation |
| 반환 값 | |
|---|---|
IBuildInfo |
|
isIncrementalFlashingEnabled
public boolean isIncrementalFlashingEnabled ()
| 반환 값 | |
|---|---|
boolean |
|
isIncrementalFlashingForceDisabled
public boolean isIncrementalFlashingForceDisabled ()
| 반환 값 | |
|---|---|
boolean |
|
setAllowCrossReleaseFlashing
public void setAllowCrossReleaseFlashing (boolean allowCrossReleaseFlashing)
| 매개변수 | |
|---|---|
allowCrossReleaseFlashing |
boolean |
setAllowUnzipBaseline
public void setAllowUnzipBaseline (boolean allowUnzipBaseline)
| 매개변수 | |
|---|---|
allowUnzipBaseline |
boolean |
setApplySnapshot
public void setApplySnapshot (boolean applySnapshot)
| 매개변수 | |
|---|---|
applySnapshot |
boolean |
setConfiguration
public void setConfiguration (IConfiguration configuration)
사용 중인 IConfiguration를 삽입합니다.
| 매개변수 | |
|---|---|
configuration |
IConfiguration |
setIgnoreHostOptions
public void setIgnoreHostOptions (boolean ignoreHostOptions)
| 매개변수 | |
|---|---|
ignoreHostOptions |
boolean |
setTestLogger
public void setTestLogger (ITestLogger testLogger)
ITestLogger 인스턴스를 삽입합니다.
| 매개변수 | |
|---|---|
testLogger |
ITestLogger |
setUp
public void setUp (TestInformation testInfo)
| 매개변수 | |
|---|---|
testInfo |
TestInformation |
| 생성 값 | |
|---|---|
BuildError |
|
DeviceNotAvailableException |
|
TargetSetupError |
|
setUpdateBootloaderFromUserspace
public void setUpdateBootloaderFromUserspace (boolean updateBootloaderFromUserspace)
| 매개변수 | |
|---|---|
updateBootloaderFromUserspace |
boolean |
setUseIncrementalNewFlow
public void setUseIncrementalNewFlow (boolean useIncrementalNewFlow)
| 매개변수 | |
|---|---|
useIncrementalNewFlow |
boolean |
setUserDataFlashOption
public void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)
userdata-flash 옵션 설정
setWipeAfterApplySnapshot
public void setWipeAfterApplySnapshot (boolean wipeAfterApplySnapshot)
| 매개변수 | |
|---|---|
wipeAfterApplySnapshot |
boolean |
tearDown
public void tearDown (TestInformation testInfo, Throwable e)
| 매개변수 | |
|---|---|
testInfo |
TestInformation |
e |
Throwable |
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
|
useMerkleTreeComparison
public void useMerkleTreeComparison (boolean enableMerkleTreeComparison)
| 매개변수 | |
|---|---|
enableMerkleTreeComparison |
boolean |
보호된 메서드
checkDeviceProductType
protected void checkDeviceProductType (ITestDevice device, IDeviceBuildInfo deviceBuild)
플래시하기 전에 기기가 빌드 정보와 예상대로 동작하는지 확인할 수 있습니다.
| 매개변수 | |
|---|---|
device |
ITestDevice: 플래시할 ITestDevice입니다. |
deviceBuild |
IDeviceBuildInfo: 플래시하는 데 사용되는 IDeviceBuildInfo입니다. |
| 생성 값 | |
|---|---|
|
com.android.tradefed.targetprep.BuildError |
|
com.android.tradefed.device.DeviceNotAvailableException |
BuildError |
|
DeviceNotAvailableException |
|
createFlasher
protected abstract IDeviceFlasher createFlasher (ITestDevice device)
사용할 IDeviceFlasher를 만듭니다. 서브클래스는 재정의할 수 있습니다.
| 매개변수 | |
|---|---|
device |
ITestDevice |
| 반환 값 | |
|---|---|
IDeviceFlasher |
|
| 생성 값 | |
|---|---|
|
com.android.tradefed.device.DeviceNotAvailableException |
DeviceNotAvailableException |
|
getDeviceBootWaitTime
protected long getDeviceBootWaitTime ()
기기 부팅 대기 시간을 가져옵니다.
| 반환 값 | |
|---|---|
long |
|
getHostOptions
protected IHostOptions getHostOptions ()
사용할 IHostOptions 인스턴스를 가져옵니다.
단위 테스트용으로 노출됨
| 반환 값 | |
|---|---|
IHostOptions |
|
reportFlashMetrics
protected void reportFlashMetrics (String branch,
String buildFlavor,
String buildId,
String serial,
long queueTime,
long flashingTime,
CommandStatus flashingStatus)기기 플래시 타이밍 데이터를 측정항목 백엔드에 보고합니다.
| 매개변수 | |
|---|---|
branch |
String: 기기 빌드가 시작된 브랜치입니다. |
buildFlavor |
String: 기기 빌드의 빌드 버전입니다. |
buildId |
String: 기기 빌드의 빌드 번호입니다. |
serial |
String: 기기의 일련번호 |
queueTime |
long: 플래시 제한을 사용할 수 있을 때까지 대기한 시간입니다. |
flashingTime |
long: 기기 이미지 zip을 플래시하는 데 걸린 시간입니다. |
flashingStatus |
CommandStatus: 플래싱 명령어의 실행 상태입니다. |
setSkipPostFlashBuildIdCheck
protected void setSkipPostFlashBuildIdCheck (boolean skipPostFlashBuildIdCheck)
| 매개변수 | |
|---|---|
skipPostFlashBuildIdCheck |
boolean |
setUseIncrementalFlashing
protected void setUseIncrementalFlashing (boolean incrementalFlashing)
| 매개변수 | |
|---|---|
incrementalFlashing |
boolean |