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

Unified Diff: build/android/provision_devices.py

Issue 18652008: Deploy adb reconnect on disconnect daemon on WebKit Android bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finally got the try bots to pass. Remove from try bots and commit for webkit bots. Created 7 years, 5 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_run_bot.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 15731829aa5aff5facab928f267b98d7f83e9ba8..19ab384c3b755de9796901a2caa95ed39492633d 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -20,15 +20,19 @@ import time
from pylib import android_commands
from pylib import constants
-
-def LaunchHostHeartbeat():
+def KillHostHeartbeat():
ps = subprocess.Popen(['ps', 'aux'], stdout = subprocess.PIPE)
stdout, _ = ps.communicate()
matches = re.findall('\\n.*host_heartbeat.*', stdout)
for match in matches:
- print 'An instance of host heart beart already running... will kill'
+ print 'An instance of host heart beart running... will kill'
pid = re.findall('(\d+)', match)[1]
subprocess.call(['kill', str(pid)])
+
+
+def LaunchHostHeartbeat():
+ # Kill if existing host_heartbeat
+ KillHostHeartbeat()
# Launch a new host_heartbeat
print 'Spawning host heartbeat...'
subprocess.Popen([os.path.join(constants.DIR_SOURCE_ROOT,
@@ -53,11 +57,11 @@ def PushAndLaunchAdbReboot(devices, target):
print ' Pushing adb_reboot ...'
adb_reboot = os.path.join(constants.DIR_SOURCE_ROOT,
'out/%s/adb_reboot' % target)
- android_cmd.PushIfNeeded(adb_reboot, '/data/local/')
+ android_cmd.PushIfNeeded(adb_reboot, '/data/local/tmp/')
# Launch adb_reboot
print ' Launching adb_reboot ...'
p = subprocess.Popen(['adb', '-s', device, 'shell'], stdin=subprocess.PIPE)
- p.communicate('/data/local/adb_reboot; exit\n')
+ p.communicate('/data/local/tmp/adb_reboot; exit\n')
LaunchHostHeartbeat()
« no previous file with comments | « build/android/buildbot/bb_run_bot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698