+2010-09-22 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Adds platform/chromium-gpu-* directories for holding the
+ GPU-accelerated baselines and expectations for Chromium.
+
+ https://bugs.webkit.org/show_bug.cgi?id=46225
+
+ * platform/chromium-gpu/test_expectations.txt: Added.
+ * platform/chromium-gpu-mac/README.txt: Added.
+ * platform/chromium-gpu-win/README.txt: Added.
+ * platform/chromium-gpu-linux/README.txt: Added.
+
2010-09-22 Abhishek Arya <inferno@chromium.org>
Reviewed by Dave Hyatt.
--- /dev/null
+This directory is a placeholder so that Git will create it; it should hold
+the baselines for the GPU accelerated tests for Chromium.
--- /dev/null
+This directory is a placeholder so that Git will create it; it should hold
+the baselines for the GPU accelerated tests for Chromium.
--- /dev/null
+This directory is a placeholder so that Git will create it; it should hold
+the baselines for the GPU accelerated tests for Chromium.
--- /dev/null
+// This file indicates the expectations for running Chromium under
+// the GPU-accelerated codepaths as defined in
+// WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
+//
+// We skip most of the tests in the repository because they don't trigger
+// the accelerated code paths. We actually only run the canvas and
+// compositing tests.
+WONTFIX SKIP : accessibility = PASS FAIL
+WONTFIX SKIP : animations = PASS FAIL
+WONTFIX SKIP : canvas = PASS FAIL
+WONTFIX SKIP : css1 = PASS FAIL
+WONTFIX SKIP : css2.1 = PASS FAIL
+WONTFIX SKIP : css3 = PASS FAIL
+WONTFIX SKIP : dom = PASS FAIL
+WONTFIX SKIP : editing = PASS FAIL
+WONTFIX SKIP : fast = PASS FAIL
+
+WONTFIX SKIP : fonts = PASS FAIL
+WONTFIX SKIP : fullscreen = PASS FAIL
+WONTFIX SKIP : html5lib = PASS FAIL
+WONTFIX SKIP : http = PASS FAIL
+WONTFIX SKIP : ietestcenter = PASS FAIL
+WONTFIX SKIP : inspector = PASS FAIL
+WONTFIX SKIP : java = PASS FAIL
+WONTFIX SKIP : loader = PASS FAIL
+WONTFIX SKIP : mathml = PASS FAIL
+WONTFIX SKIP : media = PASS FAIL
+WONTFIX SKIP : perf = PASS FAIL
+WONTFIX SKIP : platform = PASS FAIL
+WONTFIX SKIP : plugins = PASS FAIL
+WONTFIX SKIP : printing = PASS FAIL
+WONTFIX SKIP : resources = PASS FAIL
+WONTFIX SKIP : scrollbars = PASS FAIL
+WONTFIX SKIP : security = PASS FAIL
+WONTFIX SKIP : storage = PASS FAIL
+WONTFIX SKIP : svg = PASS FAIL
+WONTFIX SKIP : tables = PASS FAIL
+WONTFIX SKIP : transforms = PASS FAIL
+WONTFIX SKIP : transitions = PASS FAIL
+WONTFIX SKIP : traversal = PASS FAIL
+WONTFIX SKIP : userscripts = PASS FAIL
+WONTFIX SKIP : webarchive = PASS FAIL
+WONTFIX SKIP : websocket = PASS FAIL
+WONTFIX SKIP : wml = PASS FAIL
+
+// (These are the tests we actually run and expect to pass)
+BUGNONE : compositing = PASS FAIL
+BUGNONE : fast/canvas = PASS FAIL
+BUGNONE : canvas/philip = PASS FAIL
+
+//
+// Actual failure suppressions should go below this line
+//
+2010-09-22 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Add a 'chromium-gpu' set of ports that will test the accelerated
+ GPU paths. This patch adds:
+
+ - support for the '--accelerated-compositing' and
+ 'accelerated-2d-canvas' flags to new-run-webkit-tests (and the
+ 'no-' flags)
+ - adds a new set of Ports that will look under
+ platform/chromium-gpu-$OS/ for baselines before looking in the
+ regular chromium search path
+ - adds a new test_expectations.txt file in platform/chromium-gpu
+ that skips all but the tests we actually want to run with
+ acceleration.
+
+ This patch will allow us to run both with and without acceleration
+ and to change the defaults for both the regular and -gpu options
+ as the code evolves.
+
+ We plan to add both --chromium-$OS and --chromium-gpu-$OS runs to
+ each test bot.
+
+ https://bugs.webkit.org/show_bug.cgi?id=46225
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
+ * Scripts/webkitpy/layout_tests/port/factory.py:
+ * Scripts/webkitpy/layout_tests/port/webkit.py:
+
2010-09-22 Jamey Hicks <jamey.hicks@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
# FIXME: This drt_overrides handling should be removed when we switch
# from tes_shell to DRT.
drt_overrides = ''
- if self._options.use_drt:
+ if self._options and self._options.use_drt:
drt_overrides_path = self.path_from_webkit_base('LayoutTests',
'platform', 'chromium', 'drt_expectations.txt')
if os.path.exists(drt_overrides_path):
if self._options.gp_fault_error_box:
driver_args.append('--gp-fault-error-box')
+
+ if self._options.accelerated_compositing:
+ driver_args.append('--enable-accelerated-compositing')
+
+ if self._options.accelerated_2d_canvas:
+ driver_args.append('--enable-accelerated-2d-canvas')
return driver_args
def start(self):
--- /dev/null
+#!/usr/bin/env python
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import codecs
+import os
+import sys
+
+import chromium_linux
+import chromium_mac
+import chromium_win
+
+
+def get(**kwargs):
+ """Some tests have slightly different results when run while using
+ hardware acceleration. In those cases, we prepend an additional directory
+ to the baseline paths."""
+ port_name = kwargs.get('port_name', None)
+ if port_name == 'chromium-gpu':
+ if sys.platform in ('cygwin', 'win32'):
+ port_name = 'chromium-gpu-win'
+ elif sys.platform == 'linux2':
+ port_name = 'chromium-gpu-linux'
+ elif sys.platform == 'darwin':
+ port_name = 'chromium-gpu-mac'
+ else:
+ raise NotImplementedError('unsupported platform: %s' %
+ sys.platform)
+
+ if port_name == 'chromium-gpu-linux':
+ return ChromiumGpuLinuxPort(**kwargs)
+
+ if port_name.startswith('chromium-gpu-mac'):
+ return ChromiumGpuMacPort(**kwargs)
+
+ if port_name.startswith('chromium-gpu-win'):
+ return ChromiumGpuWinPort(**kwargs)
+
+ raise NotImplementedError('unsupported port: %s' % port_name)
+
+
+def _set_gpu_options(options):
+ if options:
+ if options.accelerated_compositing is None:
+ options.accelerated_composting = True
+ if options.accelerated_2d_canvas is None:
+ options.accelerated_2d_canvas = True
+
+
+def _gpu_overrides(port):
+ try:
+ overrides_path = port.path_from_chromium_base('webkit', 'tools',
+ 'layout_tests', 'test_expectations_gpu.txt')
+ except AssertionError:
+ return None
+ if not os.path.exists(overrides_path):
+ return None
+ with codecs.open(overrides_path, "r", "utf-8") as file:
+ return file.read()
+
+
+class ChromiumGpuLinuxPort(chromium_linux.ChromiumLinuxPort):
+ def __init__(self, **kwargs):
+ kwargs.setdefault('port_name', 'chromium-gpu-linux')
+ _set_gpu_options(kwargs.get('options'))
+ chromium_linux.ChromiumLinuxPort.__init__(self, **kwargs)
+
+ def baseline_search_path(self):
+ return ([self._webkit_baseline_path('chromium-gpu-linux')] +
+ chromium_linux.ChromiumLinuxPort.baseline_search_path(self))
+
+ def path_to_test_expectations_file(self):
+ return self.path_from_webkit_base('LayoutTests', 'platform',
+ 'chromium-gpu', 'test_expectations.txt')
+
+ def test_expectations_overrides(self):
+ return _gpu_overrides(self)
+
+
+class ChromiumGpuMacPort(chromium_mac.ChromiumMacPort):
+ def __init__(self, **kwargs):
+ kwargs.setdefault('port_name', 'chromium-gpu-mac')
+ _set_gpu_options(kwargs.get('options'))
+ chromium_mac.ChromiumMacPort.__init__(self, **kwargs)
+
+ def baseline_search_path(self):
+ return ([self._webkit_baseline_path('chromium-gpu-mac')] +
+ chromium_mac.ChromiumMacPort.baseline_search_path(self))
+
+ def path_to_test_expectations_file(self):
+ return self.path_from_webkit_base('LayoutTests', 'platform',
+ 'chromium-gpu', 'test_expectations.txt')
+
+ def test_expectations_overrides(self):
+ return _gpu_overrides(self)
+
+
+class ChromiumGpuWinPort(chromium_win.ChromiumWinPort):
+ def __init__(self, **kwargs):
+ kwargs.setdefault('port_name', 'chromium-gpu-win' + self.version())
+ _set_gpu_options(kwargs.get('options'))
+ chromium_win.ChromiumWinPort.__init__(self, **kwargs)
+
+ def baseline_search_path(self):
+ return ([self._webkit_baseline_path('chromium-gpu-win')] +
+ chromium_win.ChromiumWinPort.baseline_search_path(self))
+
+ def path_to_test_expectations_file(self):
+ return self.path_from_webkit_base('LayoutTests', 'platform',
+ 'chromium-gpu', 'test_expectations.txt')
+
+ def test_expectations_overrides(self):
+ return _gpu_overrides(self)
--- /dev/null
+#!/usr/bin/env python
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+import unittest
+import chromium_gpu
+
+
+class ChromiumGpuTest(unittest.TestCase):
+ def test_get_chromium_gpu_linux(self):
+ self.assertOverridesWorked('chromium-gpu-linux')
+
+ def test_get_chromium_gpu_mac(self):
+ self.assertOverridesWorked('chromium-gpu-mac')
+
+ def test_get_chromium_gpu_win(self):
+ self.assertOverridesWorked('chromium-gpu-win')
+
+ def assertOverridesWorked(self, port_name):
+ # test that we got the right port
+ port = chromium_gpu.get(port_name=port_name, options=None)
+
+ # we use startswith() instead of Equal to gloss over platform versions.
+ self.assertTrue(port.name().startswith(port_name))
+
+ # test that it has the right directory in front of the search path.
+ path = port.baseline_search_path()[0]
+ self.assertEqual(port._webkit_baseline_path(port_name), path)
+
+ # test that we have the right expectations file.
+ self.assertTrue('chromium-gpu' in
+ port.path_to_test_expectations_file())
+
+if __name__ == '__main__':
+ unittest.main()
if port_to_use == 'test':
import test
- cls = test.TestPort
+ maker = test.TestPort
elif port_to_use.startswith('dryrun'):
import dryrun
- cls = dryrun.DryRunPort
+ maker = dryrun.DryRunPort
elif port_to_use.startswith('mac'):
import mac
- cls = mac.MacPort
+ maker = mac.MacPort
elif port_to_use.startswith('win'):
import win
- cls = win.WinPort
+ maker = win.WinPort
elif port_to_use.startswith('gtk'):
import gtk
- cls = gtk.GtkPort
+ maker = gtk.GtkPort
elif port_to_use.startswith('qt'):
import qt
- cls = qt.QtPort
+ maker = qt.QtPort
+ elif port_to_use.startswith('chromium-gpu'):
+ import chromium_gpu
+ maker = chromium_gpu.get
elif port_to_use.startswith('chromium-mac'):
import chromium_mac
- cls = chromium_mac.ChromiumMacPort
+ maker = chromium_mac.ChromiumMacPort
elif port_to_use.startswith('chromium-linux'):
import chromium_linux
- cls = chromium_linux.ChromiumLinuxPort
+ maker = chromium_linux.ChromiumLinuxPort
elif port_to_use.startswith('chromium-win'):
import chromium_win
- cls = chromium_win.ChromiumWinPort
+ maker = chromium_win.ChromiumWinPort
elif port_to_use.startswith('google-chrome'):
import google_chrome
- cls = google_chrome.GetGoogleChromePort
+ maker = google_chrome.GetGoogleChromePort
else:
raise NotImplementedError('unsupported port: %s' % port_to_use)
- return cls(**kwargs)
+ return maker(**kwargs)
def get_all(options=None):
"""Returns all the objects implementing the Port interface."""
import sys
import unittest
+import chromium_gpu
import chromium_linux
import chromium_mac
import chromium_win
def test_qt(self):
self.assert_port("qt", qt.QtPort)
+ def test_chromium_gpu_linux(self):
+ self.assert_port("chromium-gpu-linux", chromium_gpu.ChromiumGpuLinuxPort)
+
+ def test_chromium_gpu_mac(self):
+ self.assert_port("chromium-gpu-mac", chromium_gpu.ChromiumGpuMacPort)
+
+ def test_chromium_gpu_win(self):
+ self.assert_port("chromium-gpu-win", chromium_gpu.ChromiumGpuWinPort)
+
def test_chromium_mac(self):
self.assert_port("chromium-mac", chromium_mac.ChromiumMacPort)
self.assert_platform_port("darwin", self.chromium_options,
if self._image_path:
driver_args.append('--pixel-tests')
+ if self._options.use_drt:
+ if self._options.accelerated_compositing:
+ driver_args.append('--enable-accelerated-compositing')
+
+ if self._options.accelerated_2d_canvas:
+ driver_args.append('--enable-accelerated-2d-canvas')
+
return driver_args
def start(self):
optparse.make_option("--use-drt", action="store_true",
default=False,
help="Use DumpRenderTree instead of test_shell"),
+ optparse.make_option("--accelerated-compositing",
+ action="store_true",
+ help="Use hardware-accelated compositing for rendering"),
+ optparse.make_option("--no-accelerated-compositing",
+ action="store_false",
+ dest="accelerated_compositing",
+ help="Don't use hardware-accelerated compositing for rendering"),
+ optparse.make_option("--accelerated-2d-canvas",
+ action="store_true",
+ help="Use hardware-accelerated 2D Canvas calls"),
+ optparse.make_option("--no-accelerated-2d-canvas",
+ action="store_false",
+ dest="accelerated_2d_canvas",
+ help="Don't use hardware-accelerated 2D Canvas calls"),
]
# Missing Mac-specific old-run-webkit-tests options:
class MainTest(unittest.TestCase):
+ def test_accelerated_compositing(self):
+ # This just tests that we recognize the command line args
+ self.assertTrue(passing_run(['--accelerated-compositing']))
+ self.assertTrue(passing_run(['--no-accelerated-compositing']))
+
+ def test_accelerated_2d_canvas(self):
+ # This just tests that we recognize the command line args
+ self.assertTrue(passing_run(['--accelerated-2d-canvas']))
+ self.assertTrue(passing_run(['--no-accelerated-2d-canvas']))
+
def test_basic(self):
self.assertTrue(passing_run())