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

Unified Diff: build/android/provision_devices.py

Issue 204353011: If install of test apk fails because of storage, wipe device data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update description to include removal from status check. Created 6 years, 9 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 | « build/android/buildbot/bb_device_status_check.py ('k') | 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 5cf1cc5d5cd36a262244d06366ced7b78caf9fce..748151a29d38b04d3c03a2829d5d0c29139e241f 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -21,6 +21,7 @@ import time
from pylib import android_commands
from pylib import constants
from pylib import device_settings
+from pylib.cmd_helper import GetCmdOutput
def KillHostHeartbeat():
@@ -90,6 +91,15 @@ def ProvisionDevices(options):
devices = android_commands.GetAttachedDevices()
for device in devices:
android_cmd = android_commands.AndroidCommands(device)
+ 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 not in install_output:
navabi 2014/03/21 00:12:14 oops, this was for testing. should be "failure_str
+ # Wipe data before provisioning device.
+ android_cmd.RunShellCommandWithSU('wipe data')
_ConfigureLocalProperties(android_cmd)
device_settings.ConfigureContentSettingsDict(
android_cmd, device_settings.DETERMINISTIC_DEVICE_SETTINGS)
« no previous file with comments | « build/android/buildbot/bb_device_status_check.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698