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

Unified Diff: tools/profile_chrome/main.py

Issue 902763002: Parallelize telemetry unit tests on Android bots (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove fyi bot config (will create another CL for it) Created 5 years, 10 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 | tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/profile_chrome/main.py
diff --git a/tools/profile_chrome/main.py b/tools/profile_chrome/main.py
index e493b9c83d61512ae7b5beda68d3c364a5954eec..7d015e6126fa5981cae2c228315a5eaa876f02b7 100755
--- a/tools/profile_chrome/main.py
+++ b/tools/profile_chrome/main.py
@@ -143,6 +143,9 @@ def _CreateOptionParser():
action='store_true')
parser.add_option('-z', '--compress', help='Compress the resulting trace '
'with gzip. ', action='store_true')
+ parser.add_option('-d', '--device', help='The Android device ID to use.'
+ 'If not specified, only 0 or 1 connected devices are '
+ 'supported.', default=None)
return parser
@@ -162,9 +165,10 @@ When in doubt, just try out --trace-frame-viewer.
logging.getLogger().setLevel(logging.DEBUG)
devices = android_commands.GetAttachedDevices()
- if len(devices) != 1:
+ if not options.device and len(devices) != 1:
parser.error('Exactly 1 device must be attached.')
- device = device_utils.DeviceUtils(devices[0])
+ device = device_utils.DeviceUtils(
+ next((d for d in devices if d == options.device), devices[0]))
package_info = profiler.GetSupportedBrowsers()[options.browser]
if options.chrome_categories in ['list', 'help']:
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/backends/android_command_line_backend_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698