ApexModuleTargetPreparer 설치

public class InstallApexModuleTargetPreparer
extends SuiteApkInstaller

java.lang.Object
com.android.tradefed.targetprep.BaseTargetPreparer
com.android.tradefed.targetprep.TestAppInstallSetup
com.android.tradefed.targetprep.suite.SuiteApkInstaller
com.android.tradefed.targetprep.InstallApexModuleTargetPreparer


요약

필드

protected static final String APEX_OPTION

protected static final String APEX_SUFFIX

protected static final String APK_SUFFIX

protected static final String APK_ZIP_OPTION

protected static final String CHILD_SESSION_CREATION_CMD

protected static final String PARENT_SESSION_CREATION_CMD

protected static final String SPLIT_APKS_SUFFIX

protected File mTrainFolderPath

공개 생성자

InstallApexModuleTargetPreparer ()

공개 메소드

getModulesToInstall ( TestInformation testInfo)

장치에 사전 로드된 모듈을 기반으로 열차에 설치해야 하는 모듈을 가져옵니다.

void setIgnoreIfNotPreloaded (boolean skip)
void setSkipApexTearDown (boolean skip)
void setUp ( TestInformation testInfo)

void tearDown ( TestInformation testInfo, Throwable e)

보호된 방법

void addApksToTestFiles ()
void addStagedReadyTimeoutForAdb ( cmd) addStagedReadyTimeoutForAdb ( cmd)
void addTimeoutMillisForBundletool ( extraArgs) addTimeoutMillisForBundletool ( extraArgs)
void checkApexActivation ( ITestDevice device)

모든 정점이 활성화되었는지 확인합니다.

collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo) collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo)

활성화 확인을 위해 Apex 모듈에서 Apex 정보를 수집합니다.

getApkInstalled ()
String getBundletoolFileName ()
BundletoolUtil getBundletoolUtil ()
String getModuleKeywordFromApexPackageName (String packageName)

apex 패키지 이름에서 키워드(예: com.android.tzdata.apex의 경우 'tzdata')를 가져옵니다.

getModulesFailToActivate ( activatedApexes) getModulesFailToActivate ( activatedApexes)

활성화에 실패한 모듈을 가져옵니다.

getSplitsForApks ( TestInformation testInfo, File moduleFile)

지정된 APK에 대한 분할을 추출하고 반환합니다.

void initBundletoolUtil ( TestInformation testInfo)

이 클래스에 대한 Bundletool 유틸리티를 초기화합니다.

void installTrain ( TestInformation testInfo, moduleFilenames) installTrain ( TestInformation testInfo, moduleFilenames)

장치에 정점을 포함하는 본선 열차를 설치하려고 시도합니다.

void installUsingBundleTool ( TestInformation testInfo, testAppFileNames) installUsingBundleTool ( TestInformation testInfo, testAppFileNames)

Bundletool을 사용하여 메인라인 모듈을 설치하려고 시도합니다.

void installer ( TestInformation testInfo, testAppFileNames) installer ( TestInformation testInfo, testAppFileNames)

장치에 패키지 또는 분할 패키지를 설치해 보십시오.

ITestDevice.ApexInfo retrieveApexInfo (File testApexFile, DeviceDescriptor deviceDescriptor)

지정된 apex 파일에서 packageName 및 versionCode가 포함된 ApexInfo를 검색합니다.

필드

APEX_OPTION

protected static final String APEX_OPTION

APEX_SUFFIX

protected static final String APEX_SUFFIX

APK_SUFFIX

protected static final String APK_SUFFIX

APK_ZIP_OPTION

protected static final String APK_ZIP_OPTION

CHILD_SESSION_CREATION_CMD

protected static final String CHILD_SESSION_CREATION_CMD

PARENT_SESSION_CREATION_CMD

protected static final String PARENT_SESSION_CREATION_CMD

SPLIT_APKS_SUFFIX

protected static final String SPLIT_APKS_SUFFIX

mTrainFolderPath

protected File mTrainFolderPath

공개 생성자

ApexModuleTargetPreparer 설치

public InstallApexModuleTargetPreparer ()

공개 메소드

getModulesTo설치

public  getModulesToInstall (TestInformation testInfo)

장치에 사전 로드된 모듈을 기반으로 열차에 설치해야 하는 모듈을 가져옵니다. 사전 로드되지 않은 모듈은 설치되지 않습니다.

매개변수
testInfo TestInformation : TestInformation

보고
목록 장치에 설치해야 하는 모듈의 수입니다.

던지기
DeviceNotAvailableException 장치를 사용할 수 없을 때.
TargetSetupError 필수 모듈이 설치되어 있지 않거나, 모듈을 설치할 수 없는 경우.

setIgnoreIfNotPreloaded

public void setIgnoreIfNotPreloaded (boolean skip)

매개변수
skip boolean

setSkipApexTearDown

public void setSkipApexTearDown (boolean skip)

매개변수
skip boolean

설정

public void setUp (TestInformation testInfo)

매개변수
testInfo TestInformation

던지기
BuildError
DeviceNotAvailableException
TargetSetupError

분해

public void tearDown (TestInformation testInfo, 
                Throwable e)

매개변수
testInfo TestInformation

e Throwable

던지기
DeviceNotAvailableException

보호된 방법

addApksToTestFiles

protected void addApksToTestFiles ()

addStagedReadyTimeoutForAdb

protected void addStagedReadyTimeoutForAdb ( cmd)

매개변수
cmd

addTimeoutMillisForBundletool

protected void addTimeoutMillisForBundletool ( extraArgs)

매개변수
extraArgs

checkApex활성화

protected void checkApexActivation (ITestDevice device)

모든 정점이 활성화되었는지 확인합니다.

매개변수
device ITestDevice : 테스트 중입니다.

던지기
TargetSetupError 활성화에 실패한 경우.
DeviceNotAvailableException

CollectApexInfoFromApexModules

protected  collectApexInfoFromApexModules ( testAppFileNames, 
                TestInformation testInfo)

활성화 확인을 위해 Apex 모듈에서 Apex 정보를 수집합니다.

매개변수
testAppFileNames : 설치할 모듈의 파일 이름 목록

testInfo TestInformation : TestInformation

보고
입력 파일 목록에 있는 apex 모듈의 apexinfo를 포함하는 목록

던지기
TargetSetupError

getApk설치됨

protected  getApkInstalled ()

보고

getBundletool파일 이름

protected String getBundletoolFileName ()

보고
String

getBundletoolUtil

protected BundletoolUtil getBundletoolUtil ()

보고
BundletoolUtil

getModuleKeywordFromApexPackageName

protected String getModuleKeywordFromApexPackageName (String packageName)

apex 패키지 이름에서 키워드(예: com.android.tzdata.apex의 경우 'tzdata')를 가져옵니다.

매개변수
packageName String : apex 파일의 패키지 이름입니다.

보고
String a string apex 패키지 이름의 키워드입니다.

getModulesFailTo활성화

protected  getModulesFailToActivate ( activatedApexes)

활성화에 실패한 모듈을 가져옵니다.

매개변수
activatedApexes : 장치의 활성 근관 세트

보고
활성화에 실패한 입력 Apex 모듈의 apexinfo가 포함된 목록입니다.

던지기
DeviceNotAvailableException
TargetSetupError

getSplitsForAks

protected  getSplitsForApks (TestInformation testInfo, 
                File moduleFile)

지정된 APK에 대한 분할을 추출하고 반환합니다.

매개변수
testInfo TestInformation : TestInformation

moduleFile File : 분할을 추출할 모듈 파일입니다.

보고
분할을 포함하는 File[]

던지기
TargetSetupError Bundletool을 찾을 수 없거나 장치 사양 파일을 생성하지 못하는 경우.

initBundletoolUtil

protected void initBundletoolUtil (TestInformation testInfo)

이 클래스에 대한 Bundletool 유틸리티를 초기화합니다.

매개변수
testInfo TestInformation : 호출에 대한 TestInformation .

던지기
TargetSetupError Bundletool을 찾을 수 없는 경우.

installTrain

protected void installTrain (TestInformation testInfo, 
                 moduleFilenames)

장치에 정점을 포함하는 본선 열차를 설치하려고 시도합니다.

매개변수
testInfo TestInformation : TestInformation

moduleFilenames : 문자열 목록입니다. 설치할 메인라인 모듈의 파일 이름 목록입니다.

던지기
DeviceNotAvailableException
TargetSetupError

설치UsingBundleTool

protected void installUsingBundleTool (TestInformation testInfo, 
                 testAppFileNames)

Bundletool을 사용하여 메인라인 모듈을 설치하려고 시도합니다.

매개변수
testInfo TestInformation : TestInformation

testAppFileNames : 설치할 미리 로드된 모듈의 파일 이름입니다.

던지기
DeviceNotAvailableException
TargetSetupError

설치 프로그램

protected void installer (TestInformation testInfo, 
                 testAppFileNames)

장치에 패키지 또는 분할 패키지를 설치해 보십시오.

매개변수
testInfo TestInformation : 호출에 대한 TestInformation

testAppFileNames : 설치할 APK 및 해당 패키지입니다.

던지기
DeviceNotAvailableException
TargetSetupError

검색Apex정보

protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile, 
                DeviceDescriptor deviceDescriptor)

지정된 apex 파일에서 packageName 및 versionCode가 포함된 ApexInfo를 검색합니다.

매개변수
testApexFile File : 정보를 검색하는 apex 파일입니다.

deviceDescriptor DeviceDescriptor

보고
ITestDevice.ApexInfo 해당 파일의 packageName 및 versionCode를 포함하는 ApexInfo

던지기
TargetSetupError aapt 파서가 파일을 구문 분석하지 못한 경우.