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

Side by Side Diff: appengine/swarming/swarming_bot/api/platforms/android.py

Issue 2405613002: swarming: Enable USB resets in python-adb on the staging instance. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | appengine/third_party/python-adb/adb/contrib/adb_commands_safe.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The LUCI Authors. All rights reserved. 1 # Copyright 2015 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """Android specific utility functions. 5 """Android specific utility functions.
6 6
7 This file serves as an API to bot_config.py. bot_config.py can be replaced on 7 This file serves as an API to bot_config.py. bot_config.py can be replaced on
8 the server to allow additional server-specific functionality. 8 the server to allow additional server-specific functionality.
9 """ 9 """
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 ] 102 ]
103 103
104 104
105 def initialize(pub_key, priv_key): 105 def initialize(pub_key, priv_key):
106 return high.Initialize(pub_key, priv_key) 106 return high.Initialize(pub_key, priv_key)
107 107
108 108
109 def get_devices(bot, endpoints=None): 109 def get_devices(bot, endpoints=None):
110 devices = [] 110 devices = []
111 if not gce.is_gce(): 111 if not gce.is_gce():
112 # TODO(bpastene) Remove this check and all associated logic after
113 # experiment from crbug.com/642440 is complete.
114 enable_resets = bot.server and '-dev' in bot.server
bpastene 2016/10/07 22:57:58 Anyone know a better is_staging check?
ghost stip (do not use) 2016/10/07 23:50:26 IIRC this is correct but double-check with maruel
M-A Ruel 2016/10/11 19:34:02 Make it a flag, use bot_config.is_staging() to pas
bpastene 2016/10/11 20:09:53 Done: https://chromereviews.googleplex.com/5194470
112 devices += high.GetLocalDevices( 115 devices += high.GetLocalDevices(
113 'swarming', 10000, 10000, on_error=bot.post_error if bot else None, 116 'swarming', 10000, 10000, on_error=bot.post_error if bot else None,
114 as_root=False) 117 as_root=False, enable_resets=enable_resets)
115 118
116 if endpoints: 119 if endpoints:
117 devices += high.GetRemoteDevices( 120 devices += high.GetRemoteDevices(
118 'swarming', endpoints, 10000, 10000, 121 'swarming', endpoints, 10000, 10000,
119 on_error=bot.post_error if bot else None, as_root=False) 122 on_error=bot.post_error if bot else None, as_root=False)
120 123
121 return devices 124 return devices
122 125
123 126
124 def close_devices(devices): 127 def close_devices(devices):
125 return high.CloseDevices(devices) 128 return high.CloseDevices(devices)
126 129
127 130
128 def kill_adb(): 131 def kill_adb():
129 return adb_commands_safe.KillADB() 132 return adb_commands_safe.KillADB()
OLDNEW
« no previous file with comments | « no previous file | appengine/third_party/python-adb/adb/contrib/adb_commands_safe.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698