FeatureFlagTargetPreparer

public class FeatureFlagTargetPreparer
extends BaseTargetPreparer

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


此类已弃用。
请改用 AFlagsTargetPreparer

更新 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 ()

公共方法

setUp

public void setUp (TestInformation testInformation)

参数
testInformation TestInformation

抛出
BuildError
DeviceNotAvailableException
TargetSetupError

tearDown

public void tearDown (TestInformation testInformation, 
                Throwable e)

参数
testInformation TestInformation

e Throwable

抛出
DeviceNotAvailableException