InstallApexModuleTargetPreparer

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)

يجمع معلومات القمة من الوحدات النمطية الرئيسية لفحص التنشيط.

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

يحصل على الكلمة الأساسية (على سبيل المثال ، "tzdata" لـ com.android.tzdata.apex) من اسم حزمة apex.

getModulesFailToActivate ( activatedApexes) getModulesFailToActivate ( activatedApexes)

الحصول على الوحدات التي فشل تنشيطها.

getSplitsForApks ( TestInformation testInfo, File moduleFile)

يستخرج ويعيد الانقسامات إلى ملفات apk المحددة.

void initBundletoolUtil ( TestInformation testInfo)

يقوم بتهيئة أداة الحزمة المستخدمة لهذه الفئة.

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)

يسترجع 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

المنشأت العامة

InstallApexModuleTargetPreparer

public InstallApexModuleTargetPreparer ()

الأساليب العامة

getModulesToInstall

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

checkApexActivation

protected void checkApexActivation (ITestDevice device)

تحقق مما إذا تم تنشيط جميع الرؤوس الرئيسية.

حدود
device ITestDevice : قيد الاختبار.

رميات
TargetSetupError إذا فشل التنشيط.
DeviceNotAvailableException

collectApexInfoFromApexModules

protected  collectApexInfoFromApexModules ( testAppFileNames, 
                TestInformation testInfo)

يجمع معلومات القمة من الوحدات النمطية الرئيسية لفحص التنشيط.

حدود
testAppFileNames : قائمة أسماء ملفات الوحدات المراد تثبيتها

testInfo TestInformation : TestInformation

عائدات
قائمة تحتوي على المعلومات الرئيسية للوحدات النمطية الرئيسية في قوائم ملف الإدخال

رميات
TargetSetupError

تثبيت

protected  getApkInstalled ()

عائدات

getBundletoolFileName

protected String getBundletoolFileName ()

عائدات
String

getBundletoolUtil

protected BundletoolUtil getBundletoolUtil ()

عائدات
BundletoolUtil

getModuleKeywordFromApexPackageName

protected String getModuleKeywordFromApexPackageName (String packageName)

يحصل على الكلمة الأساسية (على سبيل المثال ، "tzdata" لـ com.android.tzdata.apex) من اسم حزمة apex.

حدود
packageName String : اسم حزمة الملف الرئيسي.

عائدات
String سلسلة الكلمة الأساسية لاسم حزمة القمة.

getModulesFailToActivate

protected  getModulesFailToActivate ( activatedApexes)

الحصول على الوحدات التي فشل تنشيطها.

حدود
activatedApexes : مجموعة الرؤوس النشطة على الجهاز

عائدات
قائمة تحتوي على المعلومات الرئيسية لوحدات قمة الإدخال التي فشل تنشيطها.

رميات
DeviceNotAvailableException
TargetSetupError

getSplitsForApks

protected  getSplitsForApks (TestInformation testInfo, 
                File moduleFile)

يستخرج ويعيد الانقسامات إلى ملفات apk المحددة.

حدود
testInfo TestInformation : TestInformation

moduleFile File : ملف الوحدة النمطية لاستخراج الانقسامات منه.

عائدات
ملف [] يحتوي على الانقسامات.

رميات
TargetSetupError إذا تعذر العثور على bundletool أو فشل إنشاء ملف مواصفات الجهاز.

initBundletoolUtil

protected void initBundletoolUtil (TestInformation testInfo)

يقوم بتهيئة أداة الحزمة المستخدمة لهذه الفئة.

حدود
testInfo TestInformation : TestInformation للاستدعاء.

رميات
TargetSetupError إذا تعذر العثور على bundletool.

installTrain

protected void installTrain (TestInformation testInfo, 
                 moduleFilenames)

محاولات لتثبيت قطار رئيسي يحتوي على قمة على الجهاز.

حدود
testInfo TestInformation : TestInformation

moduleFilenames : قائمة الخيط. قائمة أسماء الملفات للوحدات النمطية الرئيسية المراد تثبيتها.

رميات
DeviceNotAvailableException
TargetSetupError

installUsingBundleTool

protected void installUsingBundleTool (TestInformation testInfo, 
                 testAppFileNames)

محاولات لتثبيت وحدة (وحدات) الخط الرئيسي باستخدام bundletool.

حدود
testInfo TestInformation : TestInformation

testAppFileNames : أسماء ملفات الوحدات مسبقة التحميل المراد تثبيتها.

رميات
DeviceNotAvailableException
TargetSetupError

المثبت

protected void installer (TestInformation testInfo, 
                 testAppFileNames)

محاولة تثبيت حزمة أو تقسيم الحزمة على الجهاز.

حدود
testInfo TestInformation : TestInformation للاستدعاء

testAppFileNames : التطبيقات وحزمتها المراد تثبيتها.

رميات
DeviceNotAvailableException
TargetSetupError

استرجاع ملف ApexInfo

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

يسترجع ApexInfo الذي يحتوي على اسم الحزمة ورمز الإصدار من الملف الرئيسي المحدد.

حدود
testApexFile File : الملف الرئيسي الذي نسترجع المعلومات منه.

deviceDescriptor DeviceDescriptor

عائدات
ITestDevice.ApexInfo ApexInfo يحتوي على اسم الحزمة ورمز الإصدار للملف المحدد

رميات
TargetSetupError إذا فشل المحلل اللغوي aapt في تحليل الملف.