summaryrefslogtreecommitdiffstats
path: root/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py')
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py56
1 files changed, 52 insertions, 4 deletions
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
index e8c75c4..167f23e 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
@@ -48,11 +48,11 @@ def get(platform=None, port_name='chromium-gpu', **kwargs):
else:
raise NotImplementedError('unsupported platform: %s' % platform)
- if port_name == 'chromium-gpu-linux':
+ if port_name.startswith('chromium-gpu-linux'):
return ChromiumGpuLinuxPort(port_name=port_name, **kwargs)
- if port_name == 'chromium-gpu-mac':
+ if port_name.startswith('chromium-gpu-mac'):
return ChromiumGpuMacPort(port_name=port_name, **kwargs)
- if port_name == 'chromium-gpu-win':
+ if port_name.startswith('chromium-gpu-win'):
return ChromiumGpuWinPort(port_name=port_name, **kwargs)
raise NotImplementedError('unsupported port: %s' % port_name)
@@ -73,7 +73,7 @@ def _set_gpu_options(port):
def _tests(port, paths):
if not paths:
- paths = ['compositing', 'platform/chromium/compositing']
+ paths = ['compositing', 'platform/chromium/compositing', 'media']
if not port.name().startswith('chromium-gpu-mac'):
# Canvas is not yet accelerated on the Mac, so there's no point
# in running the tests there.
@@ -84,11 +84,26 @@ def _tests(port, paths):
return test_files.find(port, paths)
+def _test_platform_names(self):
+ return ('mac', 'win', 'linux')
+
+
+def _test_platform_name_to_name(self, test_platform_name):
+ if test_platform_name in self.test_platform_names():
+ return 'chromium-gpu-' + test_platform_name
+ raise ValueError('Unsupported test_platform_name: %s' %
+ test_platform_name)
+
+
class ChromiumGpuLinuxPort(chromium_linux.ChromiumLinuxPort):
def __init__(self, port_name='chromium-gpu-linux', **kwargs):
chromium_linux.ChromiumLinuxPort.__init__(self, port_name=port_name, **kwargs)
_set_gpu_options(self)
+ def baseline_path(self):
+ # GPU baselines aren't yet versioned.
+ return self._webkit_baseline_path('chromium-gpu-linux')
+
def baseline_search_path(self):
# Mimic the Linux -> Win expectations fallback in the ordinary Chromium port.
return (map(self._webkit_baseline_path, ['chromium-gpu-linux', 'chromium-gpu-win', 'chromium-gpu']) +
@@ -103,6 +118,14 @@ class ChromiumGpuLinuxPort(chromium_linux.ChromiumLinuxPort):
def tests(self, paths):
return _tests(self, paths)
+ def test_platform_name(self):
+ return 'linux'
+
+ def test_platform_names(self):
+ return _test_platform_names(self)
+
+ def test_platform_name_to_name(self, name):
+ return _test_platform_name_to_name(self, name)
class ChromiumGpuMacPort(chromium_mac.ChromiumMacPort):
@@ -110,6 +133,10 @@ class ChromiumGpuMacPort(chromium_mac.ChromiumMacPort):
chromium_mac.ChromiumMacPort.__init__(self, port_name=port_name, **kwargs)
_set_gpu_options(self)
+ def baseline_path(self):
+ # GPU baselines aren't yet versioned.
+ return self._webkit_baseline_path('chromium-gpu-mac')
+
def baseline_search_path(self):
return (map(self._webkit_baseline_path, ['chromium-gpu-mac', 'chromium-gpu']) +
chromium_mac.ChromiumMacPort.baseline_search_path(self))
@@ -123,6 +150,14 @@ class ChromiumGpuMacPort(chromium_mac.ChromiumMacPort):
def tests(self, paths):
return _tests(self, paths)
+ def test_platform_name(self):
+ return 'mac'
+
+ def test_platform_names(self):
+ return _test_platform_names(self)
+
+ def test_platform_name_to_name(self, name):
+ return _test_platform_name_to_name(self, name)
class ChromiumGpuWinPort(chromium_win.ChromiumWinPort):
@@ -130,6 +165,10 @@ class ChromiumGpuWinPort(chromium_win.ChromiumWinPort):
chromium_win.ChromiumWinPort.__init__(self, port_name=port_name, **kwargs)
_set_gpu_options(self)
+ def baseline_path(self):
+ # GPU baselines aren't yet versioned.
+ return self._webkit_baseline_path('chromium-gpu-win')
+
def baseline_search_path(self):
return (map(self._webkit_baseline_path, ['chromium-gpu-win', 'chromium-gpu']) +
chromium_win.ChromiumWinPort.baseline_search_path(self))
@@ -142,3 +181,12 @@ class ChromiumGpuWinPort(chromium_win.ChromiumWinPort):
def tests(self, paths):
return _tests(self, paths)
+
+ def test_platform_name(self):
+ return 'win'
+
+ def test_platform_names(self):
+ return _test_platform_names(self)
+
+ def test_platform_name_to_name(self, name):
+ return _test_platform_name_to_name(self, name)