summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornavabi@chromium.org <navabi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-28 23:42:38 +0000
committernavabi@chromium.org <navabi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-28 23:42:38 +0000
commit25a7816bbb926e2397479d75347f67d0a000139b (patch)
tree5635bd731602c5dbcaa040679def8d34b64c82cc
parentd02fdfc46c67c2957a52ff81bd7b518cf975442d (diff)
downloadchromium_src-25a7816bbb926e2397479d75347f67d0a000139b.zip
chromium_src-25a7816bbb926e2397479d75347f67d0a000139b.tar.gz
chromium_src-25a7816bbb926e2397479d75347f67d0a000139b.tar.bz2
Automatically wipe data from devices.
Wiping data from the device for each build will keep the INSTALL_FAILED_INSUFFICIENT_STORAGE error from happening. Sleeping 75 seconds was determined by minimizing how much time was needed to sleep for the provision and wipe to work on a Nexus 4. BUG=335549 R=jbudorick@chromium.org, tonyg@chromium.org Review URL: https://codereview.chromium.org/297233009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273402 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xbuild/android/provision_devices.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py
index 834c631..063cb73 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -21,7 +21,6 @@ import time
from pylib import android_commands
from pylib import constants
from pylib import device_settings
-from pylib.cmd_helper import GetCmdOutput
from pylib.device import device_utils
sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT,
@@ -128,14 +127,16 @@ def ProvisionDevices(options):
for device_serial in devices:
device = device_utils.DeviceUtils(device_serial)
device.old_interface.EnableAdbRoot()
- install_output = GetCmdOutput(
- ['%s/build/android/adb_install_apk.py' % constants.DIR_SOURCE_ROOT,
- '--apk',
- '%s/build/android/CheckInstallApk-debug.apk' % constants.DIR_SOURCE_ROOT
- ])
- failure_string = 'Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]'
- if failure_string in install_output:
- WipeDeviceData(device)
+ WipeDeviceData(device)
+ try:
+ (device_utils.DeviceUtils.parallel(devices)
+ .old_interface.Reboot(True))
+ except errors.DeviceUnresponsiveError:
+ pass
+ for device_serial in devices:
+ device = device_utils.DeviceUtils(device_serial)
+ device.WaitUntilFullyBooted(timeout=90)
+ device.old_interface.EnableAdbRoot()
_ConfigureLocalProperties(device)
device_settings.ConfigureContentSettingsDict(
device, device_settings.DETERMINISTIC_DEVICE_SETTINGS)