2011-02-22 Dirk Pranke <dpranke@chromium.org>
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2011 02:09:18 +0000 (02:09 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2011 02:09:18 +0000 (02:09 +0000)
        Reviewed by James Robinson.

        nrwt: --platform chromium-gpu doesn't work with --worker-model=processes
        https://bugs.webkit.org/show_bug.cgi?id=55009

        * Scripts/webkitpy/layout_tests/port/chromium_gpu.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79380 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py

index 7b2c2cc..449cf00 100644 (file)
@@ -1,3 +1,12 @@
+2011-02-22  Dirk Pranke  <dpranke@chromium.org>
+
+        Reviewed by James Robinson.
+
+        nrwt: --platform chromium-gpu doesn't work with --worker-model=processes
+        https://bugs.webkit.org/show_bug.cgi?id=55009
+
+        * Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
+
 2011-02-18  Mihai Parparita  <mihaip@chromium.org>
 
         Reviewed by Ojan Vafai.
index e8c75c4..db33d50 100644 (file)
@@ -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)
 
@@ -89,6 +89,10 @@ class ChromiumGpuLinuxPort(chromium_linux.ChromiumLinuxPort):
         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']) +
@@ -110,6 +114,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))
@@ -130,6 +138,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))
index b72b1e6..9c5dae7 100644 (file)
@@ -29,6 +29,7 @@ import unittest
 from webkitpy.tool import mocktool
 import chromium_gpu
 
+from webkitpy.layout_tests.port import factory
 
 class ChromiumGpuTest(unittest.TestCase):
     def test_get_chromium_gpu_linux(self):
@@ -95,6 +96,31 @@ class ChromiumGpuTest(unittest.TestCase):
             self.assertTrue(port._filesystem.exists(path))
             self.assertFalse(path in files)
 
+    def test_chromium_gpu__vista(self):
+        port = factory.get('chromium-gpu-win-vista')
+        self.assertEquals(port.name(), 'chromium-gpu-win-vista')
+        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-gpu-win'))
+
+    def test_chromium_gpu__xp(self):
+        port = factory.get('chromium-gpu-win-xp')
+        self.assertEquals(port.name(), 'chromium-gpu-win-xp')
+        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-gpu-win'))
+
+    def test_chromium_gpu__win7(self):
+        port = factory.get('chromium-gpu-win-win7')
+        self.assertEquals(port.name(), 'chromium-gpu-win-win7')
+        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-gpu-win'))
+
+    def test_chromium_gpu__leopard(self):
+        port = factory.get('chromium-gpu-mac-leopard')
+        self.assertEquals(port.name(), 'chromium-gpu-mac-leopard')
+        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-gpu-mac'))
+
+    def test_chromium_gpu__snowleopard(self):
+        port = factory.get('chromium-gpu-mac-snowleopard')
+        self.assertEquals(port.name(), 'chromium-gpu-mac-snowleopard')
+        self.assertEquals(port.baseline_path(), port._webkit_baseline_path('chromium-gpu-mac'))
+
 
 if __name__ == '__main__':
     unittest.main()