summaryrefslogtreecommitdiffstats
path: root/testrunner
diff options
context:
space:
mode:
authorBrett Chabot <brettchabot@android.com>2012-02-22 12:43:18 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-22 12:43:18 -0800
commit860d73c398a1452f57cd3ccdacfff198a51c88d9 (patch)
tree8013ce3d7761691376820149d18aa778e11f15d8 /testrunner
parent64ee2e44ef61186edefa4b4c6c314e146444b3e5 (diff)
parent25dfd79b2e1e11f175f93722d0ebbda65fc56d1d (diff)
downloadandroid_development-860d73c398a1452f57cd3ccdacfff198a51c88d9.tar.gz
android_development-860d73c398a1452f57cd3ccdacfff198a51c88d9.tar.bz2
android_development-860d73c398a1452f57cd3ccdacfff198a51c88d9.zip
Merge "Fix runtest local.prop handling."
Diffstat (limited to 'testrunner')
-rwxr-xr-xtestrunner/runtest.py27
1 files changed, 21 insertions, 6 deletions
diff --git a/testrunner/runtest.py b/testrunner/runtest.py
index 1691c16d1..5730928ea 100755
--- a/testrunner/runtest.py
+++ b/testrunner/runtest.py
@@ -385,18 +385,33 @@ class TestRunner(object):
if self._options.preview:
logger.Log("adb shell \"echo %s >> /data/local.prop\""
% self._DALVIK_VERIFIER_OFF_PROP)
+ logger.Log("adb shell chmod 644 /data/local.prop")
logger.Log("adb reboot")
logger.Log("adb wait-for-device")
else:
logger.Log("Turning off dalvik verifier and rebooting")
self._adb.SendShellCommand("\"echo %s >> /data/local.prop\""
% self._DALVIK_VERIFIER_OFF_PROP)
- self._adb.SendCommand("reboot")
- # wait for device to go offline
- time.sleep(10)
- self._adb.SendCommand("wait-for-device", timeout_time=60,
- retry_count=3)
- self._adb.EnableAdbRoot()
+
+ self._ChmodReboot()
+ elif not self._options.preview:
+ # check the permissions on the file
+ permout = self._adb.SendShellCommand("ls -l /data/local.prop")
+ if not "-rw-r--r--" in permout:
+ logger.Log("Fixing permissions on /data/local.prop and rebooting")
+ self._ChmodReboot()
+
+ def _ChmodReboot(self):
+ """Perform a chmod of /data/local.prop and reboot.
+ """
+ self._adb.SendShellCommand("chmod 644 /data/local.prop")
+ self._adb.SendCommand("reboot")
+ # wait for device to go offline
+ time.sleep(10)
+ self._adb.SendCommand("wait-for-device", timeout_time=60,
+ retry_count=3)
+ self._adb.EnableAdbRoot()
+
def RunTests(self):
"""Main entry method - executes the tests according to command line args."""