AFlagsTargetPreparer
public
class
AFlagsTargetPreparer
extends BaseTargetPreparer
Uses aflags to override flags prior to running a test. If any flags were changed, the
device will be rebooted in order for the new values to take effect.
On teardown, any flags will be reverted to their previous state. If the flag was changed from
a default value, the override will be cleared (in order for the default value to take hold, and
to allow it to be server-overridable again). If the flag was previously overridden to a different
value, it will be set back to that value again.
If the current flag state matches the target state, the flag will not be overridden. If an
override is still desired in this case (e.g. to prevent a default-set flag being
server-overridden), the --force-set option can be used.
Example usage: --flag-value namespace/flag_name=true --flag-value
other_namespace/another_flag=false.
Summary
Public constructors
AFlagsTargetPreparer
public AFlagsTargetPreparer ()
Public methods
public void setUp (TestInformation testInformation)
| Parameters |
testInformation |
TestInformation |
public void tearDown (TestInformation testInformation,
Throwable e)
| Parameters |
testInformation |
TestInformation |
e |
Throwable |