FeatureFlagTargetPreparer

public class FeatureFlagTargetPreparer
extends BaseTargetPreparer

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


מעדכן את DeviceConfig (דגלי תכונה מכוונים על ידי שירות מרוחק).

זה יכול לשמש כדי לשחזר את המצב של התקן (על ידי השלכת כל ערכי הדגל לקובץ באמצעות `adb shell device_config list`) או להפעלה/השבתה של דגלים בכמות גדולה (בדיקות הכל-על/הכל-כבוי).

שימוש לדוגמה:

  • לשימוש עבור בדיקת הכל-על/הכל-כבוי, ציין את קובץ הדגל הדרוש:
    --flag-file=flag_file_path
  • כדי לעקוף דגל אחד או יותר, ציין את הערכים שלהם (ניתן לשלב עם קובצי דגל):
    --flag-file=flag_file_path --flag-value=namespace/name=value
  • כדי להשתמש לבדיקת הפיכות, ציין את קובץ הכל-על ואחריו קובץ הכל-כבוי, ואפשר אתחול מחדש בין שני הקבצים:
    --flag-file=all_on_file_path --flag-file=all_off_file_path --reboot-between-flag-files
           

יש להשתמש בשילוב עם DeviceSetup כדי להשבית את סנכרון DeviceConfig במהלך הבדיקה, מה שעלול לדרוס את השינויים שבוצעו על ידי מכין זה.

סיכום

בנאים ציבוריים

FeatureFlagTargetPreparer ()

שיטות ציבוריות

void setUp ( TestInformation testInformation)
void tearDown ( TestInformation testInformation, Throwable e)

בנאים ציבוריים

FeatureFlagTargetPreparer

public FeatureFlagTargetPreparer ()

שיטות ציבוריות

להכין

public void setUp (TestInformation testInformation)

פרמטרים
testInformation TestInformation

זורק
BuildError
DeviceNotAvailableException
TargetSetupError

לקרוע

public void tearDown (TestInformation testInformation, 
                Throwable e)

פרמטרים
testInformation TestInformation

e Throwable

זורק
DeviceNotAvailableException