Merge "Revert "Revert "Force gtest to use adb unroot if required_root is false or not set""" am: f7e6870f81 am: 4d4d939d76

am: c3ffcfbbc4

Change-Id: I3db01265f50da21b72dfda2e9a5140b6b6dba10e
This commit is contained in:
Dan Shi
2019-09-17 17:46:39 -07:00
committed by android-build-merger

View File

@@ -317,6 +317,10 @@ func (test *testBinary) install(ctx ModuleContext, file android.Path) {
var configs []tradefed.Config var configs []tradefed.Config
if Bool(test.Properties.Require_root) { if Bool(test.Properties.Require_root) {
configs = append(configs, tradefed.Preparer{"com.android.tradefed.targetprep.RootTargetPreparer", nil}) 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) { if Bool(test.Properties.Disable_framework) {
var options []tradefed.Option var options []tradefed.Option