Workaround for package-private framework tests in runtest.

Checks if the test to run is a framework test based on path, and if so
disables the davlik verifier by writing to /data/local.prop and
rebooting device.

Change-Id: Ibf94fb921662b5ddf6136dd12360d5de83a3a284
This commit is contained in:
Brett Chabot
2010-06-14 15:19:25 -07:00
parent fcefaf88ab
commit ccae47d0c0
2 changed files with 51 additions and 0 deletions

View File

@@ -148,6 +148,19 @@ class AdbInterface:
return False
return True
def EnableAdbRoot(self):
"""Enable adb root on device."""
output = self.SendCommand("root")
if "adbd is already running as root" in output:
return True
elif "restarting adbd as root" in output:
# device will disappear from adb, wait for it to come back
self.SendCommand("wait-for-device")
return True
else:
logger.Log("Unrecognized output from adb root: %s" % output)
return False
def StartInstrumentationForPackage(
self, package_name, runner_name, timeout_time=60*10,
no_window_animation=False, instrumentation_args={}):