Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1818)

Unified Diff: build/android/provision_devices.py

Issue 297233009: Automatically wipe data from devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nit and increased timeout. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/provision_devices.py
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py
index 834c6313e7430c834a38468c8cbefa5732a71f03..063cb736ab9abbd304b769475444834e63a5d2f7 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698