GkiDeviceFlashPreparer

public class GkiDeviceFlashPreparer
extends BaseTargetPreparer implements ILabPreparer

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


안드로이드 공통 커널 일반 이미지로 장치를 플래시하는 대상 준비자입니다. 자세한 내용은 https://source.android.com/devices/architecture/kernel/android-common을 참조하세요.

요약

공개 생성자

GkiDeviceFlashPreparer ()

공개 메소드

void setUp ( TestInformation testInfo)

테스트를 위한 타겟 설정을 수행합니다.

void validateGkiBootImg ( ITestDevice device, IBuildInfo buildInfo)

GKI 부팅 이미지가 필요한지 확인하세요.

보호된 방법

void addHashFooter ( ITestDevice device, IBuildInfo buildInfo, File tmpDir)

GKI 부팅 이미지가 필요한지 확인하세요.

void buildGkiSystemDlkmImg ( ITestDevice device, IBuildInfo buildInfo, File tmpDir)

system_dlkm 아카이브가 제공되는 경우 GKI system_dlkm 이미지를 빌드합니다.

File extractSystemDlkmTarGzip (File systemDlkmArchive)

system_dlkm tar gzip 파일을 system_dlkm_staging 폴더에 추출합니다.

void flattenSystemDlkm ( ITestDevice device, File systemDlkmStagingDir)

모든 커널 모듈이 /lib/modules 바로 아래에 있도록 system_dlkm 준비 디렉터리를 평면화합니다.

IHostOptions getHostOptions ()

IHostOptions 에 대한 참조 가져오기

File getRequestedFile ( ITestDevice device, String requestedFileName, File sourceFile, File tmpDir)

요청한 파일 이름으로 소스 파일(zip 또는 폴더)에서 요청한 파일을 가져옵니다.

IRunUtil getRunUtil ()

사용할 IRunUtil 인스턴스를 가져옵니다.

void validateGkiBootImg ( ITestDevice device, IBuildInfo buildInfo, File tmpDir)

GKI 부팅 이미지가 필요한지 확인하세요.

공개 생성자

GkiDeviceFlashPreparer

public GkiDeviceFlashPreparer ()

공개 메소드

설정

public void setUp (TestInformation testInfo)

테스트를 위한 타겟 설정을 수행합니다.

매개변수
testInfo TestInformation : 호출의 TestInformation .

던지기
BuildError
DeviceNotAvailableException
TargetSetupError

검증GkiBootImg

public void validateGkiBootImg (ITestDevice device, 
                IBuildInfo buildInfo)

GKI 부팅 이미지가 필요한지 확인하세요. (더 이상 사용되지 않습니다. 제공된 tmpDir을 사용하여 호출하세요)

매개변수
device ITestDevice : ITestDevice

buildInfo IBuildInfo : IBuildInfo 빌드 정보

던지기
TargetSetupError 유효한 gki boot.img가 없는 경우

보호된 방법

addHash바닥글

protected void addHashFooter (ITestDevice device, 
                IBuildInfo buildInfo, 
                File tmpDir)

GKI 부팅 이미지가 필요한지 확인하세요. 유효한 boot.img가 없으면 예외가 발생합니다.

매개변수
device ITestDevice : ITestDevice

buildInfo IBuildInfo : IBuildInfo 빌드 정보

tmpDir File : 임시 디렉터리 ERROR(/File)

던지기
TargetSetupError 유효한 gki boot.img가 없는 경우
DeviceNotAvailableException

buildGkiSystemDlkmImg

protected void buildGkiSystemDlkmImg (ITestDevice device, 
                IBuildInfo buildInfo, 
                File tmpDir)

system_dlkm 아카이브가 제공되는 경우 GKI system_dlkm 이미지를 빌드합니다.

매개변수
device ITestDevice : ITestDevice

buildInfo IBuildInfo : IBuildInfo 빌드 정보

tmpDir File : 임시 디렉터리 ERROR(/File)

던지기
TargetSetupError 이미지 파일을 빌드하는 중에 오류가 발생한 경우

extractSystemDlkmTarGzip

protected File extractSystemDlkmTarGzip (File systemDlkmArchive)

system_dlkm tar gzip 파일을 system_dlkm_staging 폴더에 추출합니다. 이 함수는 단위 테스트를 위한 압축 해제를 제거하기 위한 ERROR(/TarUtil.extractTarGzipToTemp) 주위의 래퍼입니다.

매개변수
systemDlkmArchive File : GKI 모듈이 포함된 system_dlkm tar gzip 파일입니다.

보고
File system_dlkm tar gzip 콘텐츠가 포함된 파일입니다.

던지기
IO예외

flattenSystemDlkm

protected void flattenSystemDlkm (ITestDevice device, 
                File systemDlkmStagingDir)

모든 커널 모듈이 /lib/modules 바로 아래에 있도록 system_dlkm 준비 디렉터리를 평면화합니다. 이는 플랫폼 빌드에 대해 예상되는 system_dlkm 파일 레이아웃을 일치시키는 데 필요합니다.

매개변수
device ITestDevice : ITestDevice

systemDlkmStagingDir File : system_dlkm 준비 디렉터리 ERROR(/File)

던지기
또는 system_dlkm을 평면화하는 중에 오류가 발생한 경우 TargetSetupError입니다.
TargetSetupError

getHostOptions

protected IHostOptions getHostOptions ()

IHostOptions 에 대한 참조 가져오기

보고
IHostOptions 사용할 IHostOptions

getRequested파일

protected File getRequestedFile (ITestDevice device, 
                String requestedFileName, 
                File sourceFile, 
                File tmpDir)

요청한 파일 이름으로 소스 파일(zip 또는 폴더)에서 요청한 파일을 가져옵니다.

제공되는 소스 파일은 zip 파일일 수 있습니다. 이 메서드는 임시 디렉터리에 압축을 풀고 제공된 파일 이름으로 요청된 파일을 찾습니다.

제공되는 소스 파일은 파일 폴더일 수 있습니다. 이 메서드는 제공된 파일 이름으로 요청된 파일을 찾습니다.

매개변수
device ITestDevice : ITestDevice

requestedFileName String : 요청한 파일 이름 String

sourceFile File : 소스 파일

tmpDir File

보고
File 요청된 파일 이름으로 지정된 파일

던지기
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

getRunUtil

protected IRunUtil getRunUtil ()

사용할 IRunUtil 인스턴스를 가져옵니다.

보고
IRunUtil 사용할 IRunUtil

검증GkiBootImg

protected void validateGkiBootImg (ITestDevice device, 
                IBuildInfo buildInfo, 
                File tmpDir)

GKI 부팅 이미지가 필요한지 확인하세요. 유효한 boot.img가 없으면 예외가 발생합니다.

매개변수
device ITestDevice : ITestDevice

buildInfo IBuildInfo : IBuildInfo 빌드 정보

tmpDir File : 임시 디렉터리 ERROR(/File)

던지기
TargetSetupError 유효한 gki boot.img가 없는 경우