SuiteModuleLoader
public
class
SuiteModuleLoader
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.suite.SuiteModuleLoader |
يستردّ تعريفات وحدة اختبار التوافق من المستودع. TODO: Add the expansion of suite when loading a module.
ملخّص
الصفوف المتداخلة | |
|---|---|
class |
SuiteModuleLoader.ConfigFilter
|
الثوابت | |
|---|---|
String |
CONFIG_EXT
|
طُرق وضع التصميم العامة | |
|---|---|
SuiteModuleLoader(Map<String, LinkedHashSet<SuiteTestFilter>> includeFilters, Map<String, LinkedHashSet<SuiteTestFilter>> excludeFilters, List<String> testArgs, List<String> moduleArgs)
دالة إنشاء SuiteModuleLoader. |
|
الإجراءات العامة | |
|---|---|
static
void
|
addFilters(Set<String> stringFilters, Map<String, LinkedHashSet<SuiteTestFilter>> filters, Set<IAbi> abis, Set<DeviceFoldableState> foldableStates)
طريقة مساعدة تتيح تحليل وإنشاء بنية باستخدام فلاتر الخيارات. |
void
|
addFiltersToTest(IRemoteTest test, IAbi abi, String moduleId, Map<String, LinkedHashSet<SuiteTestFilter>> includeFilters, Map<String, LinkedHashSet<SuiteTestFilter>> excludeFilters)
مرِّر الفلاتر إلى |
static
Set<File>
|
getModuleNamesMatching(File directory, String suitePrefix, String pattern)
|
LinkedHashMap<String, IConfiguration>
|
loadConfigsFromDirectory(List<File> testsDirs, Set<IAbi> abis, String suitePrefix, String suiteTag, List<String> patterns)
التحميل الرئيسي للإعدادات، والبحث في مجلد |
LinkedHashMap<String, IConfiguration>
|
loadConfigsFromJars(Set<IAbi> abis, String suitePrefix, String suiteTag)
التحميل الرئيسي للإعدادات، والبحث في الموارد على مسار الفئة |
LinkedHashMap<String, IConfiguration>
|
loadConfigsFromSpecifiedPaths(List<File> listConfigFiles, Set<IAbi> abis, String suiteTag)
التحميل الرئيسي لعمليات الإعداد، والبحث في الملفات المحدّدة |
LinkedHashMap<String, IConfiguration>
|
loadTfConfigsFromSpecifiedPaths(List<String> configs, Set<IAbi> abis, String suiteTag)
التحميل الرئيسي للإعدادات، والبحث في الموارد المحدّدة في مسار الفئة |
final
void
|
setExcludedModuleParameters(Set<ModuleParameters> excludedParams)
تضبط هذه السمة مجموعة |
final
void
|
setFoldableStates(Set<DeviceFoldableState> foldableStates)
تضبط هذه السمة مجموعة |
final
void
|
setIgnoreNonPreloadedMainlineModule(boolean ignore)
تحدّد هذه السمة ما إذا كان سيتم تجاهل تثبيت الوحدة إذا لم يتم تحميلها مسبقًا. |
final
void
|
setInvocationContext(IInvocationContext context)
|
final
void
|
setLoadConfigsWithIncludeFilters(boolean allowed)
تضبط هذه السمة ما إذا كان سيتم تحميل إعدادات الاختبار استنادًا إلى فلتر التضمين المحدّد أم لا. |
final
void
|
setMainlineParameterizedModules(boolean allowed)
تحدّد هذه السمة ما إذا كان سيتم السماح باستخدام وحدات رئيسية تتضمّن مَعلمات أم لا. |
final
void
|
setModuleParameter(ModuleParameters param)
تضبط هذه السمة نوع |
final
void
|
setOptimizeMainlineTest(boolean allowed)
يحدّد ما إذا كان سيتم تحسين اختبار الإعلان الرئيسي أم لا. |
final
void
|
setOptionalParameterizedModules(boolean allowed)
تحدّد هذه السمة ما إذا كان سيتم السماح بالوحدات المَعلمة الاختيارية أم لا. |
final
void
|
setParameterizedModules(boolean allowed)
تحدّد هذه السمة ما إذا كان سيتم السماح بالوحدات التي تتضمّن مَعلمات أم لا. |
final
void
|
setUseIncludeFilterOrder(boolean useIncludeFilterOrder)
تُحدّد ما إذا كان سيتم تنظيم تنفيذ الاختبار حسب الترتيب المحدّد في فلتر include أم لا. |
الثوابت
CONFIG_EXT
public static final String CONFIG_EXT
Constant Value: ".config"
طُرق وضع التصميم العامة
SuiteModuleLoader
public SuiteModuleLoader (Map<String, LinkedHashSet<SuiteTestFilter>> includeFilters, Map<String, LinkedHashSet<SuiteTestFilter>> excludeFilters, List<String> testArgs, List<String> moduleArgs)
دالة إنشاء SuiteModuleLoader.
| المعلَمات | |
|---|---|
includeFilters |
Map: الفلاتر المنسّقة والمحلَّلة |
excludeFilters |
Map: فلاتر الاستبعاد المنسَّقة والمحلَّلة |
testArgs |
List: قائمة وسيطات الاختبار (IRemoteTest) |
moduleArgs |
List: قائمة وسيطات الوحدة |
الإجراءات العامة
addFilters
public static void addFilters (Set<String> stringFilters,
Map<String, LinkedHashSet<SuiteTestFilter>> filters,
Set<IAbi> abis,
Set<DeviceFoldableState> foldableStates)طريقة مساعدة تتيح تحليل وإنشاء بنية باستخدام فلاتر الخيارات.
| المعلَمات | |
|---|---|
stringFilters |
Set: تمثّل هذه السمة تنسيق خيارات المنتج الأصلية. |
filters |
Map: الفلاتر التي تم تحليلها من تنسيق السلسلة |
abis |
Set: Abis التي يجب أخذها في الاعتبار عند الفلترة |
foldableStates |
Set |
addFiltersToTest
public void addFiltersToTest (IRemoteTest test, IAbi abi, String moduleId, Map<String, LinkedHashSet<SuiteTestFilter>> includeFilters, Map<String, LinkedHashSet<SuiteTestFilter>> excludeFilters)
مرِّر الفلاتر إلى IRemoteTest. السلوك التلقائي هو التجاهل إذا لم تنفّذ واجهة IRemoteTest ITestFileFilterReceiver. ويمكن إلغاء هذا الإعداد لإنشاء سلوك أكثر تقييدًا.
| المعلَمات | |
|---|---|
test |
IRemoteTest: IRemoteTest الذي يتم النظر فيه. |
abi |
IAbi: هذا هو Abi الذي نعمل عليه حاليًا. |
moduleId |
String: رقم تعريف الوحدة (عادةً ما يكون abi + اسم الوحدة). |
includeFilters |
Map: الفلاتر المنسّقة والمحلَّلة |
excludeFilters |
Map: فلاتر الاستبعاد المنسَّقة والمحلَّلة |
getModuleNamesMatching
public static Set<File> getModuleNamesMatching (File directory,
String suitePrefix,
String pattern)| المعلَمات | |
|---|---|
directory |
File |
suitePrefix |
String |
pattern |
String |
| المرتجعات | |
|---|---|
Set<File> |
Set الوحدات التي يتضمّن اسمها النمط المحدّد |
loadConfigsFromDirectory
public LinkedHashMap<String, IConfiguration> loadConfigsFromDirectory (List<File> testsDirs, Set<IAbi> abis, String suitePrefix, String suiteTag, List<String> patterns)
التحميل الرئيسي للإعدادات، والبحث في مجلد
| المعلَمات | |
|---|---|
testsDirs |
List |
abis |
Set |
suitePrefix |
String |
suiteTag |
String |
patterns |
List |
| المرتجعات | |
|---|---|
LinkedHashMap<String, IConfiguration> |
|
loadConfigsFromJars
public LinkedHashMap<String, IConfiguration> loadConfigsFromJars (Set<IAbi> abis, String suitePrefix, String suiteTag)
التحميل الرئيسي للإعدادات، والبحث في الموارد على مسار الفئة (إعدادات TF للمثال ).
| المعلَمات | |
|---|---|
abis |
Set |
suitePrefix |
String |
suiteTag |
String |
| المرتجعات | |
|---|---|
LinkedHashMap<String, IConfiguration> |
|
loadConfigsFromSpecifiedPaths
public LinkedHashMap<String, IConfiguration> loadConfigsFromSpecifiedPaths (List<File> listConfigFiles, Set<IAbi> abis, String suiteTag)
التحميل الرئيسي لعمليات الإعداد، والبحث في الملفات المحدّدة
| المعلَمات | |
|---|---|
listConfigFiles |
List |
abis |
Set |
suiteTag |
String |
| المرتجعات | |
|---|---|
LinkedHashMap<String, IConfiguration> |
|
loadTfConfigsFromSpecifiedPaths
public LinkedHashMap<String, IConfiguration> loadTfConfigsFromSpecifiedPaths (List<String> configs, Set<IAbi> abis, String suiteTag)
التحميل الرئيسي للإعدادات، والبحث في الموارد المحدّدة في مسار الفئة
| المعلَمات | |
|---|---|
configs |
List |
abis |
Set |
suiteTag |
String |
| المرتجعات | |
|---|---|
LinkedHashMap<String, IConfiguration> |
|
setExcludedModuleParameters
public final void setExcludedModuleParameters (Set<ModuleParameters> excludedParams)
تضبط هذه السمة مجموعة ModuleParameters التي يجب عدم أخذها في الاعتبار على الإطلاق.
| المعلَمات | |
|---|---|
excludedParams |
Set |
setFoldableStates
public final void setFoldableStates (Set<DeviceFoldableState> foldableStates)
تضبط هذه السمة مجموعة DeviceFoldableState التي يجب تنفيذها.
| المعلَمات | |
|---|---|
foldableStates |
Set |
setIgnoreNonPreloadedMainlineModule
public final void setIgnoreNonPreloadedMainlineModule (boolean ignore)
تحدّد هذه السمة ما إذا كان سيتم تجاهل تثبيت الوحدة إذا لم يتم تحميلها مسبقًا.
| المعلَمات | |
|---|---|
ignore |
boolean |
setInvocationContext
public final void setInvocationContext (IInvocationContext context)
| المعلَمات | |
|---|---|
context |
IInvocationContext |
setLoadConfigsWithIncludeFilters
public final void setLoadConfigsWithIncludeFilters (boolean allowed)
تضبط هذه السمة ما إذا كان سيتم تحميل إعدادات الاختبار استنادًا إلى فلتر التضمين المحدّد أم لا.
| المعلَمات | |
|---|---|
allowed |
boolean |
setMainlineParameterizedModules
public final void setMainlineParameterizedModules (boolean allowed)
تحدّد هذه السمة ما إذا كان سيتم السماح باستخدام وحدات رئيسية تتضمّن مَعلمات أم لا.
| المعلَمات | |
|---|---|
allowed |
boolean |
setModuleParameter
public final void setModuleParameter (ModuleParameters param)
تضبط هذه السمة نوع ModuleParameters الوحيد الذي يجب تنفيذه.
| المعلَمات | |
|---|---|
param |
ModuleParameters |
setOptimizeMainlineTest
public final void setOptimizeMainlineTest (boolean allowed)
يحدّد ما إذا كان سيتم تحسين اختبار الإعلان الرئيسي أم لا.
| المعلَمات | |
|---|---|
allowed |
boolean |
setOptionalParameterizedModules
public final void setOptionalParameterizedModules (boolean allowed)
تحدّد ما إذا كان سيتم السماح بالوحدات الاختيارية التي تتضمّن مَعلمات أم لا.
| المعلَمات | |
|---|---|
allowed |
boolean |
setParameterizedModules
public final void setParameterizedModules (boolean allowed)
تحدّد هذه السمة ما إذا كان سيتم السماح بالوحدات ذات المَعلمات أم لا.
| المعلَمات | |
|---|---|
allowed |
boolean |
setUseIncludeFilterOrder
public final void setUseIncludeFilterOrder (boolean useIncludeFilterOrder)
تُحدّد ما إذا كان سيتم تنظيم تنفيذ الاختبار حسب الترتيب المحدّد في فلتر include أم لا.
| المعلَمات | |
|---|---|
useIncludeFilterOrder |
boolean |