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

Unified Diff: build/android/provision_devices.py

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/install_emulator_deps.py ('k') | build/android/pylib/android_commands.py » ('j') | 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 560d1d08080a891001f4576ed5c7f31bf42c89e9..0dc8c817dce6432fc87257b73794bb528e788c1b 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -31,12 +31,12 @@ sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT,
import errors
def KillHostHeartbeat():
- ps = subprocess.Popen(['ps', 'aux'], stdout = subprocess.PIPE)
+ ps = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)
stdout, _ = ps.communicate()
matches = re.findall('\\n.*host_heartbeat.*', stdout)
for match in matches:
logging.info('An instance of host heart beart running... will kill')
- pid = re.findall('(\S+)', match)[1]
+ pid = re.findall(r'(\S+)', match)[1]
subprocess.call(['kill', str(pid)])
@@ -190,8 +190,9 @@ def ProvisionDevice(device, options, is_perf):
battery_info.get('level', 0))
time.sleep(60)
battery_info = device.old_interface.GetBatteryInfo()
- # TODO(jbudorick): Tune the timeout per OS version.
- device.Reboot(True, timeout=600, retries=0)
+ if not options.skip_wipe:
+ # TODO(jbudorick): Tune the timeout per OS version.
+ device.Reboot(True, timeout=600, retries=0)
device.RunShellCommand('date -s %s' % time.strftime('%Y%m%d.%H%M%S',
time.gmtime()),
as_root=True)
@@ -206,7 +207,7 @@ def ProvisionDevice(device, options, is_perf):
str(device))
# Device black list is reset by bb_device_status_check.py per build.
device_blacklist.ExtendBlacklist([str(device)])
- except (device_errors.CommandFailedError):
+ except device_errors.CommandFailedError:
logging.exception('Failed to provision device %s. Adding to blacklist.',
str(device))
device_blacklist.ExtendBlacklist([str(device)])
« no previous file with comments | « build/android/install_emulator_deps.py ('k') | build/android/pylib/android_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698