Merge "Revert "Revert "Force gtest to use adb unroot if required_root is false or not set"""

This commit is contained in:
Treehugger Robot 2019-09-18 00:20:16 +00:00 committed by Gerrit Code Review
commit f7e6870f81

View file

@ -317,6 +317,10 @@ func (test *testBinary) install(ctx ModuleContext, file android.Path) {
var configs []tradefed.Config
if Bool(test.Properties.Require_root) {
configs = append(configs, tradefed.Preparer{"com.android.tradefed.targetprep.RootTargetPreparer", nil})
} else {
var options []tradefed.Option
options = append(options, tradefed.Option{"force-root", "false"})
configs = append(configs, tradefed.Preparer{"com.android.tradefed.targetprep.RootTargetPreparer", options})
}
if Bool(test.Properties.Disable_framework) {
var options []tradefed.Option