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
  • 要用于可逆性测试,指定 all-on 文件后跟 all-off 文件,并在两个文件之间启用重启:
    --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