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

Side by Side Diff: tools/telemetry/telemetry/core/chrome/desktop_browser_finder.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 """Finds desktop browsers that can be controlled by telemetry.""" 4 """Finds desktop browsers that can be controlled by telemetry."""
5 5
6 import logging 6 import logging
7 import os 7 import os
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 10
11 from telemetry import browser 11 from telemetry.core import browser
12 from telemetry import desktop_browser_backend 12 from telemetry.core import possible_browser
13 from telemetry import platform 13 from telemetry.core.chrome import desktop_browser_backend
14 from telemetry import possible_browser 14 from telemetry.core.chrome import platform
15 15
16 ALL_BROWSER_TYPES = ','.join([ 16 ALL_BROWSER_TYPES = ','.join([
17 'exact', 17 'exact',
18 'release', 18 'release',
19 'debug', 19 'debug',
20 'canary', 20 'canary',
21 'content-shell-debug', 21 'content-shell-debug',
22 'content-shell-release', 22 'content-shell-release',
23 'system']) 23 'system'])
24 24
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 browsers.append(PossibleDesktopBrowser('exact', options, 61 browsers.append(PossibleDesktopBrowser('exact', options,
62 normalized_executable, False)) 62 normalized_executable, False))
63 else: 63 else:
64 logging.warning('%s specified by browser_executable does not exist', 64 logging.warning('%s specified by browser_executable does not exist',
65 normalized_executable) 65 normalized_executable)
66 66
67 # Look for a browser in the standard chrome build locations. 67 # Look for a browser in the standard chrome build locations.
68 if options.chrome_root: 68 if options.chrome_root:
69 chrome_root = options.chrome_root 69 chrome_root = options.chrome_root
70 else: 70 else:
71 chrome_root = os.path.join(os.path.dirname(__file__), '..', '..', '..') 71 chrome_root = os.path.join(os.path.dirname(__file__),
72 '..', '..', '..', '..', '..')
72 73
73 if sys.platform == 'darwin': 74 if sys.platform == 'darwin':
74 chromium_app_name = 'Chromium.app/Contents/MacOS/Chromium' 75 chromium_app_name = 'Chromium.app/Contents/MacOS/Chromium'
75 content_shell_app_name = 'Content Shell.app/Contents/MacOS/Content Shell' 76 content_shell_app_name = 'Content Shell.app/Contents/MacOS/Content Shell'
76 elif sys.platform.startswith('linux'): 77 elif sys.platform.startswith('linux'):
77 chromium_app_name = 'chrome' 78 chromium_app_name = 'chrome'
78 content_shell_app_name = 'content_shell' 79 content_shell_app_name = 'content_shell'
79 elif sys.platform.startswith('win'): 80 elif sys.platform.startswith('win'):
80 chromium_app_name = 'chrome.exe' 81 chromium_app_name = 'chrome.exe'
81 content_shell_app_name = 'content_shell.exe' 82 content_shell_app_name = 'content_shell.exe'
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 chromium_app_name, False): 153 chromium_app_name, False):
153 break 154 break
154 155
155 if len(browsers) and not has_display: 156 if len(browsers) and not has_display:
156 logging.warning( 157 logging.warning(
157 'Found (%s), but you do not have a DISPLAY environment set.' % 158 'Found (%s), but you do not have a DISPLAY environment set.' %
158 ','.join([b.browser_type for b in browsers])) 159 ','.join([b.browser_type for b in browsers]))
159 return [] 160 return []
160 161
161 return browsers 162 return browsers
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698