Index: tools/telemetry/telemetry/core/browser_options.py |
diff --git a/tools/telemetry/telemetry/core/browser_options.py b/tools/telemetry/telemetry/core/browser_options.py |
index fca4385814aff1b087b2620bf891120253051efe..7d9cce167e96c4e9888d95b945a33a328717b419 100644 |
--- a/tools/telemetry/telemetry/core/browser_options.py |
+++ b/tools/telemetry/telemetry/core/browser_options.py |
@@ -11,6 +11,7 @@ import sys |
from telemetry.core import browser_finder |
from telemetry.core import browser_finder_exceptions |
+from telemetry.core import device_finder |
from telemetry.core import platform |
from telemetry.core import profile_types |
from telemetry.core import util |
@@ -31,7 +32,7 @@ class BrowserFinderOptions(optparse.Values): |
self.browser_type = browser_type |
self.browser_executable = None |
self.chrome_root = None |
- self.android_device = None |
+ self.device = None |
self.cros_ssh_identity = None |
self.extensions_to_load = [] |
@@ -75,9 +76,10 @@ class BrowserFinderOptions(optparse.Values): |
help='Where to look for chrome builds.' |
'Defaults to searching parent dirs by default.') |
group.add_option('--device', |
- dest='android_device', |
- help='The android device ID to use' |
- 'If not specified, only 0 or 1 connected devices are supported.') |
+ dest='device', |
+ help='The device to run on' |
tonyg
2014/12/04 02:29:15
Should this be:
'The target device identifier. If
|
+ 'If not specified, only 0 or 1 connected Android devices are ' |
+ 'supported.') |
group.add_option('--target-arch', |
dest='target_arch', |
help='The target architecture of the browser. Options available are: ' |
@@ -154,6 +156,11 @@ class BrowserFinderOptions(optparse.Values): |
if self.browser_executable and not self.browser_type: |
self.browser_type = 'exact' |
+ if self.device == 'list': |
+ devices = device_finder.GetAllAvailableDeviceNames(self) |
+ sys.stdout.write('Available devices:\n') |
+ sys.stdout.write(' %s\n' % '\n '.join(devices)) |
+ sys.exit(0) |
if self.browser_type == 'list': |
try: |
types = browser_finder.GetAllAvailableBrowserTypes(self) |