summaryrefslogtreecommitdiffstats
path: root/testrunner
diff options
context:
space:
mode:
authorBrett Chabot <brettchabot@android.com>2011-06-07 10:10:38 -0700
committerBrett Chabot <brettchabot@android.com>2011-06-07 10:16:02 -0700
commitcdfaae1a3409d380fab8228545d1b0d28ca070f7 (patch)
tree8e03a16b75234f262fa8bd29721d0f745274274b /testrunner
parent8207c8935bb7f4046656dc9730ce9b7cf848584d (diff)
downloadandroid_development-cdfaae1a3409d380fab8228545d1b0d28ca070f7.tar.gz
android_development-cdfaae1a3409d380fab8228545d1b0d28ca070f7.tar.bz2
android_development-cdfaae1a3409d380fab8228545d1b0d28ca070f7.zip
Make runtest reboot and root more robust.
Add a couple sleep statements to allow time for device to go offline. Change-Id: I3a5fffc948f6c7b67bcdec4526990a6becd2d02f
Diffstat (limited to 'testrunner')
-rwxr-xr-xtestrunner/adb_interface.py1
-rwxr-xr-xtestrunner/runtest.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/testrunner/adb_interface.py b/testrunner/adb_interface.py
index 3bd4396f4..feb1c893b 100755
--- a/testrunner/adb_interface.py
+++ b/testrunner/adb_interface.py
@@ -155,6 +155,7 @@ class AdbInterface:
return True
elif "restarting adbd as root" in output:
# device will disappear from adb, wait for it to come back
+ time.sleep(2)
self.SendCommand("wait-for-device")
return True
else:
diff --git a/testrunner/runtest.py b/testrunner/runtest.py
index 3ecc77b22..d80bfe6d0 100755
--- a/testrunner/runtest.py
+++ b/testrunner/runtest.py
@@ -35,6 +35,7 @@ import optparse
import os
from sets import Set
import sys
+import time
# local imports
import adb_interface
@@ -388,6 +389,8 @@ class TestRunner(object):
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()