GkiDeviceFlashPreparer

public class GkiDeviceFlashPreparer
extends BaseTargetPreparer implements ILabPreparer

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


Android 공통 커널 일반 이미지로 기기를 플래시하는 타겟 준비자입니다. 자세한 내용은 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 ()

공개 메서드

setUp

public void setUp (TestInformation testInfo)

테스트를 위해 타겟 설정을 실행합니다.

매개변수
testInfo TestInformation: 호출의 TestInformation입니다.

생성 값
BuildError
DeviceNotAvailableException
TargetSetupError

validateGkiBootImg

public void validateGkiBootImg (ITestDevice device, 
                IBuildInfo buildInfo)

GKI 부팅 이미지가 예상대로 있는지 확인합니다. (지원 중단됨. tmpDir을 제공하여 호출하세요.)

매개변수
device ITestDevice: ITestDevice

buildInfo IBuildInfo: IBuildInfo 빌드 정보

생성 값
TargetSetupError 유효한 gki boot.img가 없는 경우

보호된 메서드

addHashFooter

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 콘텐츠가 포함된 파일입니다.

생성 값
IOException

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

getRequestedFile

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

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

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

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

매개변수
device ITestDevice: ITestDevice

requestedFileName String: 요청된 파일 이름 문자열

sourceFile File: 소스 파일

tmpDir File

반환 값
File 요청된 파일 이름으로 지정된 파일

생성 값
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

getRunUtil

protected IRunUtil getRunUtil ()

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

반환 값
IRunUtil 사용할 IRunUtil

validateGkiBootImg

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가 없는 경우