Commit 9468c5e0 authored by tiago.vignatti's avatar tiago.vignatti Committed by Commit bot

Add support in Telemetry for other Ozone based targets

Prior to this commit, Telemetry on Linux Desktop was X11 oriented. The changes
introduced here allow other graphics architectures through Ozone as well for
testing, by recognizing a specific extra browser arguments "--ozone-platform".

For example one can use it as following:

./run_benchmark --browser=exact --browser-executable=./out/Release/chrome --extra-browser-args="--ozone-platform=gbm" <benchmark>

BUG=None

Review URL: https://codereview.chromium.org/901143006

Cr-Commit-Position: refs/heads/master@{#317671}
parent b9a230ea
...@@ -124,10 +124,10 @@ def FindAllAvailableBrowsers(finder_options, device): ...@@ -124,10 +124,10 @@ def FindAllAvailableBrowsers(finder_options, device):
if not CanFindAvailableBrowsers(): if not CanFindAvailableBrowsers():
return [] return []
has_display = True has_x11_display = True
if (sys.platform.startswith('linux') and if (sys.platform.startswith('linux') and
os.getenv('DISPLAY') == None): os.getenv('DISPLAY') == None):
has_display = False has_x11_display = False
# Look for a browser in the standard chrome build locations. # Look for a browser in the standard chrome build locations.
if finder_options.chrome_root: if finder_options.chrome_root:
...@@ -259,7 +259,12 @@ def FindAllAvailableBrowsers(finder_options, device): ...@@ -259,7 +259,12 @@ def FindAllAvailableBrowsers(finder_options, device):
browser_name, finder_options, app_path, browser_name, finder_options, app_path,
None, False, os.path.dirname(app_path))) None, False, os.path.dirname(app_path)))
if len(browsers) and not has_display: has_ozone_platform = False
for arg in finder_options.browser_options.extra_browser_args:
if "--ozone-platform" in arg:
has_ozone_platform = True
if len(browsers) and not has_x11_display and not has_ozone_platform:
logging.warning( logging.warning(
'Found (%s), but you do not have a DISPLAY environment set.' % 'Found (%s), but you do not have a DISPLAY environment set.' %
','.join([b.browser_type for b in browsers])) ','.join([b.browser_type for b in browsers]))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment