Commit 044b6030 authored by tony@chromium.org's avatar tony@chromium.org

2010-12-10 Tony Chang <tony@chromium.org>

        Reviewed by Ojan Vafai.

        [chromium] remove --use-drt and add --use-test-shell
        https://bugs.webkit.org/show_bug.cgi?id=50701

        Remove drt_expectations.txt since we don't need it anymore.

        * platform/chromium/drt_expectations.txt: Removed.
2010-12-10  Tony Chang  <tony@chromium.org>

        Reviewed by Ojan Vafai.

        [chromium] remove --use-drt and add --use-test-shell
        https://bugs.webkit.org/show_bug.cgi?id=50701

        * Scripts/webkitpy/common/config/ports.py:
        * Scripts/webkitpy/common/config/ports_unittest.py:
        * Scripts/webkitpy/layout_tests/port/chromium.py:
        * Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
        * Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py:
        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
        * Scripts/webkitpy/layout_tests/port/webkit.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
        * Scripts/webkitpy/style/checkers/test_expectations.py:
        * Scripts/webkitpy/tool/commands/queries.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73748 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 530062bd
2010-12-10 Tony Chang <tony@chromium.org>
Reviewed by Ojan Vafai.
[chromium] remove --use-drt and add --use-test-shell
https://bugs.webkit.org/show_bug.cgi?id=50701
Remove drt_expectations.txt since we don't need it anymore.
* platform/chromium/drt_expectations.txt: Removed.
2010-12-10 Alejandro G. Castro <alex@igalia.com>
Unreviewed, rolling out r73743.
......
// We are switching from test_shell to DRT soon and this file will go away.
// Please add DRT expectations to test_expectations.txt instead.
2010-12-10 Tony Chang <tony@chromium.org>
Reviewed by Ojan Vafai.
[chromium] remove --use-drt and add --use-test-shell
https://bugs.webkit.org/show_bug.cgi?id=50701
* Scripts/webkitpy/common/config/ports.py:
* Scripts/webkitpy/common/config/ports_unittest.py:
* Scripts/webkitpy/layout_tests/port/chromium.py:
* Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
* Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py:
* Scripts/webkitpy/layout_tests/port/chromium_linux.py:
* Scripts/webkitpy/layout_tests/port/chromium_mac.py:
* Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
* Scripts/webkitpy/layout_tests/port/chromium_win.py:
* Scripts/webkitpy/layout_tests/port/webkit.py:
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
* Scripts/webkitpy/style/checkers/test_expectations.py:
* Scripts/webkitpy/tool/commands/queries.py:
2010-12-10 John Knottenbelt <jknotten@chromium.org>
Reviewed by Steve Block.
......
......@@ -229,7 +229,6 @@ class ChromiumPort(WebKitPort):
return [
cls.script_path("new-run-webkit-tests"),
"--chromium",
"--use-drt",
"--no-pixel-tests",
]
......
......@@ -64,13 +64,13 @@ class WebKitPortTest(unittest.TestCase):
def test_chromium_port(self):
self.assertEquals(ChromiumPort.name(), "Chromium")
self.assertEquals(ChromiumPort.flag(), "--port=chromium")
self.assertEquals(ChromiumPort.run_webkit_tests_command(), [WebKitPort.script_path("new-run-webkit-tests"), "--chromium", "--use-drt", "--no-pixel-tests"])
self.assertEquals(ChromiumPort.run_webkit_tests_command(), [WebKitPort.script_path("new-run-webkit-tests"), "--chromium", "--no-pixel-tests"])
self.assertEquals(ChromiumPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--chromium", "--update-chromium"])
self.assertEquals(ChromiumPort.build_webkit_command(build_style="debug"), [WebKitPort.script_path("build-webkit"), "--debug", "--chromium", "--update-chromium"])
self.assertEquals(ChromiumPort.update_webkit_command(), [WebKitPort.script_path("update-webkit"), "--chromium"])
def test_chromium_xvfb_port(self):
self.assertEquals(ChromiumXVFBPort.run_webkit_tests_command(), ["xvfb-run", "WebKitTools/Scripts/new-run-webkit-tests", "--chromium", "--use-drt", "--no-pixel-tests"])
self.assertEquals(ChromiumXVFBPort.run_webkit_tests_command(), ["xvfb-run", "WebKitTools/Scripts/new-run-webkit-tests", "--chromium", "--no-pixel-tests"])
if __name__ == '__main__':
unittest.main()
......@@ -175,9 +175,9 @@ class ChromiumPort(base.Port):
return result
def driver_name(self):
if self._options.use_drt:
return "DumpRenderTree"
return "test_shell"
if self._options.use_test_shell:
return "test_shell"
return "DumpRenderTree"
def path_from_chromium_base(self, *comps):
"""Returns the full path to path made by joining the top of the
......@@ -216,7 +216,7 @@ class ChromiumPort(base.Port):
def create_driver(self, worker_number):
"""Starts a new Driver and returns a handle to it."""
if self.get_option('use_drt') and sys.platform == 'darwin':
if not self.get_option('use_test_shell') and sys.platform == 'darwin':
return webkit.WebKitDriver(self, worker_number)
return ChromiumDriver(self, worker_number)
......@@ -253,16 +253,6 @@ class ChromiumPort(base.Port):
return file.read()
def test_expectations_overrides(self):
# FIXME: This drt_overrides handling should be removed when we switch
# from tes_shell to DRT.
drt_overrides = ''
if self.get_option('use_drt'):
drt_overrides_path = self.path_from_webkit_base('LayoutTests',
'platform', 'chromium', 'drt_expectations.txt')
if os.path.exists(drt_overrides_path):
with codecs.open(drt_overrides_path, "r", "utf-8") as file:
drt_overrides = file.read()
try:
overrides_path = self.path_from_chromium_base('webkit', 'tools',
'layout_tests', 'test_expectations.txt')
......@@ -271,7 +261,7 @@ class ChromiumPort(base.Port):
if not os.path.exists(overrides_path):
return None
with codecs.open(overrides_path, "r", "utf-8") as file:
return file.read() + drt_overrides
return file.read()
def skipped_layout_tests(self, extra_test_files=None):
expectations_str = self.test_expectations()
......@@ -350,9 +340,9 @@ class ChromiumPort(base.Port):
return path
def _path_to_image_diff(self):
binary_name = 'image_diff'
if self.get_option('use_drt'):
binary_name = 'ImageDiff'
binary_name = 'ImageDiff'
if self.get_option('use_test_shell'):
binary_name = 'image_diff'
return self._build_path(self.get_option('configuration'), binary_name)
......@@ -376,10 +366,10 @@ class ChromiumDriver(base.Driver):
cmd.append("--pixel-tests=" +
self._port._convert_path(self._image_path))
if self._port.get_option('use_drt'):
cmd.append('--test-shell')
else:
if self._port.get_option('use_test_shell'):
cmd.append('--layout-tests')
else:
cmd.append('--test-shell')
if self._port.get_option('startup_dialog'):
cmd.append('--testshell-startup-dialog')
......@@ -393,11 +383,12 @@ class ChromiumDriver(base.Driver):
if self._port.get_option('multiple_loads') > 0:
cmd.append('--multiple-loads=' + str(self._port.get_option('multiple_loads')))
if self._port.get_option('accelerated_compositing'):
cmd.append('--enable-accelerated-compositing')
if self._port.get_option('accelerated_2d_canvas'):
cmd.append('--enable-accelerated-2d-canvas')
# test_shell does not support accelerated compositing.
if not self._port.get_option("use_test_shell"):
if self._port.get_option('accelerated_compositing'):
cmd.append('--enable-accelerated-compositing')
if self._port.get_option('accelerated_2d_canvas'):
cmd.append('--enable-accelerated-2d-canvas')
return cmd
def start(self):
......
......@@ -69,8 +69,6 @@ def _set_gpu_options(options):
options.accelerated_compositing = True
if options.accelerated_2d_canvas is None:
options.accelerated_2d_canvas = True
if options.use_drt is None:
options.use_drt = True
# FIXME: Remove this after http://codereview.chromium.org/5133001/ is enabled
# on the bots.
......
......@@ -46,12 +46,10 @@ class ChromiumGpuTest(unittest.TestCase):
mock_options = mocktool.MockOptions(accelerated_compositing=None,
accelerated_2d_canvas=None,
builder_name='foo',
use_drt=None,
child_processes=None)
port = chromium_gpu.get(port_name=port_name, options=mock_options)
self.assertTrue(port._options.accelerated_compositing)
self.assertTrue(port._options.accelerated_2d_canvas)
self.assertTrue(port._options.use_drt)
self.assertEqual(port.default_child_processes(), 1)
self.assertEqual(port._options.builder_name, 'foo - GPU')
......
......@@ -81,7 +81,7 @@ class ChromiumLinuxPort(chromium.ChromiumPort):
base = self.path_from_chromium_base()
if os.path.exists(os.path.join(base, 'sconsbuild')):
return os.path.join(base, 'sconsbuild', *comps)
if os.path.exists(os.path.join(base, 'out', *comps)) or not self.get_option('use_drt'):
if os.path.exists(os.path.join(base, 'out', *comps)) or self.get_option('use_test_shell'):
return os.path.join(base, 'out', *comps)
base = self.path_from_webkit_base()
if os.path.exists(os.path.join(base, 'sconsbuild')):
......@@ -148,9 +148,9 @@ class ChromiumLinuxPort(chromium.ChromiumPort):
def _path_to_driver(self, configuration=None):
if not configuration:
configuration = self.get_option('configuration')
binary_name = 'test_shell'
if self.get_option('use_drt'):
binary_name = 'DumpRenderTree'
binary_name = 'DumpRenderTree'
if self.get_option('use_test_shell'):
binary_name = 'test_shell'
return self._build_path(configuration, binary_name)
def _path_to_helper(self):
......
......@@ -79,9 +79,9 @@ class ChromiumMacPort(chromium.ChromiumPort):
def driver_name(self):
"""name for this port's equivalent of DumpRenderTree."""
if self.get_option('use_drt'):
return "DumpRenderTree"
return "TestShell"
if self.get_option('use_test_shell'):
return "TestShell"
return "DumpRenderTree"
def test_platform_name(self):
# We use 'mac' instead of 'chromium-mac'
......@@ -106,7 +106,7 @@ class ChromiumMacPort(chromium.ChromiumPort):
def _build_path(self, *comps):
path = self.path_from_chromium_base('xcodebuild', *comps)
if os.path.exists(path) or not self.get_option('use_drt'):
if os.path.exists(path) or self.get_option('use_test_shell'):
return path
return self.path_from_webkit_base('WebKit', 'chromium', 'xcodebuild',
*comps)
......@@ -149,9 +149,9 @@ class ChromiumMacPort(chromium.ChromiumPort):
'Contents', 'MacOS', self.driver_name())
def _path_to_helper(self):
binary_name = 'layout_test_helper'
if self.get_option('use_drt'):
binary_name = 'LayoutTestHelper'
binary_name = 'LayoutTestHelper'
if self.get_option('use_test_shell'):
binary_name = 'layout_test_helper'
return self._build_path(self.get_option('configuration'), binary_name)
def _path_to_wdiff(self):
......
......@@ -105,18 +105,25 @@ class ChromiumPortTest(unittest.TestCase):
return 'default'
def test_path_to_image_diff(self):
mock_options = mocktool.MockOptions(use_drt=True)
mock_options = mocktool.MockOptions()
port = ChromiumPortTest.TestLinuxPort(options=mock_options)
self.assertTrue(port._path_to_image_diff().endswith(
'/out/default/ImageDiff'), msg=port._path_to_image_diff())
port = ChromiumPortTest.TestMacPort(options=mock_options)
self.assertTrue(port._path_to_image_diff().endswith(
'/xcodebuild/default/ImageDiff'))
mock_options = mocktool.MockOptions(use_test_shell=True)
port = ChromiumPortTest.TestLinuxPort(options=mock_options)
self.assertTrue(port._path_to_image_diff().endswith(
'/out/default/image_diff'), msg=port._path_to_image_diff())
port = ChromiumPortTest.TestMacPort(options=mock_options)
self.assertTrue(port._path_to_image_diff().endswith(
'/xcodebuild/default/image_diff'))
# FIXME: Figure out how this is going to work on Windows.
#port = chromium_win.ChromiumWinPort('test-port', options=MockOptions())
def test_skipped_layout_tests(self):
mock_options = mocktool.MockOptions(use_drt=True)
mock_options = mocktool.MockOptions()
port = ChromiumPortTest.TestLinuxPort(options=mock_options)
fake_test = os.path.join(port.layout_tests_dir(), "fast/js/not-good.js")
......@@ -162,7 +169,7 @@ LINUX WIN : fast/js/very-good.js = TIMEOUT PASS"""
return self._result
return ''
mock_options = mocktool.MockOptions(use_drt=False)
mock_options = mocktool.MockOptions()
port = ChromiumPortTest.TestLinuxPort(mock_options)
# Images are different.
......
......@@ -105,13 +105,12 @@ class ChromiumWinPort(chromium.ChromiumPort):
#
# PROTECTED ROUTINES
#
def _build_path(self, *comps):
p = self.path_from_chromium_base('webkit', *comps)
if os.path.exists(p):
return p
p = self.path_from_chromium_base('chrome', *comps)
if os.path.exists(p) or not self.get_option('use_drt'):
if os.path.exists(p) or self.get_option('use_test_shell'):
return p
return os.path.join(self.path_from_webkit_base(), 'WebKit', 'chromium',
*comps)
......@@ -140,21 +139,21 @@ class ChromiumWinPort(chromium.ChromiumPort):
def _path_to_driver(self, configuration=None):
if not configuration:
configuration = self.get_option('configuration')
binary_name = 'test_shell.exe'
if self.get_option('use_drt'):
binary_name = 'DumpRenderTree.exe'
binary_name = 'DumpRenderTree.exe'
if self.get_option('use_test_shell'):
binary_name = 'test_shell.exe'
return self._build_path(configuration, binary_name)
def _path_to_helper(self):
binary_name = 'layout_test_helper.exe'
if self.get_option('use_drt'):
binary_name = 'LayoutTestHelper.exe'
binary_name = 'LayoutTestHelper.exe'
if self.get_option('use_test_shell'):
binary_name = 'layout_test_helper.exe'
return self._build_path(self.get_option('configuration'), binary_name)
def _path_to_image_diff(self):
binary_name = 'image_diff.exe'
if self.get_option('use_drt'):
binary_name = 'ImageDiff.exe'
binary_name = 'ImageDiff.exe'
if self.get_option('use_test_shell'):
binary_name = 'image_diff.exe'
return self._build_path(self.get_option('configuration'), binary_name)
def _path_to_wdiff(self):
......
......@@ -401,13 +401,6 @@ class WebKitDriver(base.Driver):
if self._port.get_option('pixel_tests'):
cmd.append('--pixel-tests')
if self._port.get_option('use_drt'):
if self._port.get_option('accelerated_compositing'):
cmd.append('--enable-accelerated-compositing')
if self._port.get_option('accelerated_2d_canvas'):
cmd.append('--enable-accelerated-2d-canvas')
return cmd
def start(self):
......
......@@ -1438,9 +1438,9 @@ def parse_args(args=None):
optparse.make_option("--nocheck-sys-deps", action="store_true",
default=False,
help="Don't check the system dependencies (themes)"),
optparse.make_option("--use-drt", action="store_true",
default=True,
help="(DEPRECATED)"),
optparse.make_option("--use-test-shell", action="store_true",
default=False,
help="Use test_shell instead of DRT"),
optparse.make_option("--accelerated-compositing",
action="store_true",
help="Use hardware-accelated compositing for rendering"),
......
......@@ -48,7 +48,6 @@ class ChromiumOptions(object):
"""
def __init__(self):
self.chromium = True
self.use_drt = True
class TestExpectationsChecker(object):
......
......@@ -376,12 +376,8 @@ out what ports are skipping the test(s). Categories are taken in account too."""
argument_names = "TEST_NAME"
def execute(self, options, args, tool):
class Options:
# Required for chromium port.
use_drt = True
results = dict([(test_name, []) for test_name in args])
for port_name, port_object in tool.port_factory.get_all(options=Options).iteritems():
for port_name, port_object in tool.port_factory.get_all().iteritems():
for test_name in args:
if port_object.skips_layout_test(test_name):
results[test_name].append(port_name)
......
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