From 70675e0d82266745f1697eda968f31e673311bac Mon Sep 17 00:00:00 2001 From: "dpranke@chromium.org" Date: Fri, 29 Jun 2012 02:46:55 +0000 Subject: [PATCH] nrwt: remove the 'google-chrome' port code https://bugs.webkit.org/show_bug.cgi?id=88824 Reviewed by Ojan Vafai. NRWT now supports passing additional baseline directories and expectations files on the command line, so there's no need to support the concept of a 'google-chrome' port directly. * Scripts/webkitpy/layout_tests/port/base.py: (Port.path_to_test_expectations_file): * Scripts/webkitpy/layout_tests/port/builders.py: * Scripts/webkitpy/layout_tests/port/chromium_mac.py: (ChromiumMacPort.__init__): * Scripts/webkitpy/layout_tests/port/chromium_win.py: (ChromiumWinPort.__init__): * Scripts/webkitpy/layout_tests/port/factory.py: (PortFactory): * Scripts/webkitpy/layout_tests/port/factory_unittest.py: (FactoryTest.test_win): * Scripts/webkitpy/layout_tests/port/google_chrome.py: Removed. * Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py: Removed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121512 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Tools/ChangeLog | 25 +++++ Tools/Scripts/webkitpy/layout_tests/port/base.py | 2 +- .../Scripts/webkitpy/layout_tests/port/builders.py | 2 - .../webkitpy/layout_tests/port/chromium_mac.py | 5 +- .../webkitpy/layout_tests/port/chromium_win.py | 5 +- .../Scripts/webkitpy/layout_tests/port/factory.py | 4 - .../webkitpy/layout_tests/port/factory_unittest.py | 21 ---- .../webkitpy/layout_tests/port/google_chrome.py | 107 --------------------- .../layout_tests/port/google_chrome_unittest.py | 59 ------------ 9 files changed, 28 insertions(+), 202 deletions(-) delete mode 100644 Tools/Scripts/webkitpy/layout_tests/port/google_chrome.py delete mode 100644 Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py diff --git a/Tools/ChangeLog b/Tools/ChangeLog index aa9553b..d2e216f 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,5 +1,30 @@ 2012-06-28 Dirk Pranke + nrwt: remove the 'google-chrome' port code + https://bugs.webkit.org/show_bug.cgi?id=88824 + + Reviewed by Ojan Vafai. + + NRWT now supports passing additional baseline directories + and expectations files on the command line, so there's no need + to support the concept of a 'google-chrome' port directly. + + * Scripts/webkitpy/layout_tests/port/base.py: + (Port.path_to_test_expectations_file): + * Scripts/webkitpy/layout_tests/port/builders.py: + * Scripts/webkitpy/layout_tests/port/chromium_mac.py: + (ChromiumMacPort.__init__): + * Scripts/webkitpy/layout_tests/port/chromium_win.py: + (ChromiumWinPort.__init__): + * Scripts/webkitpy/layout_tests/port/factory.py: + (PortFactory): + * Scripts/webkitpy/layout_tests/port/factory_unittest.py: + (FactoryTest.test_win): + * Scripts/webkitpy/layout_tests/port/google_chrome.py: Removed. + * Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py: Removed. + +2012-06-28 Dirk Pranke + nrwt: clean up how arguments are passed to workers https://bugs.webkit.org/show_bug.cgi?id=90126 diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py index ee24d1b..c186ac8 100755 --- a/Tools/Scripts/webkitpy/layout_tests/port/base.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py @@ -697,7 +697,7 @@ class Port(object): # test_expectations are always in mac/ not mac-leopard/ by convention, hence we use port_name instead of name(). port_name = self.port_name - if port_name.startswith('chromium') or port_name.startswith('google-chrome'): + if port_name.startswith('chromium'): port_name = 'chromium' return self._filesystem.join(self._webkit_baseline_path(port_name), 'TestExpectations') diff --git a/Tools/Scripts/webkitpy/layout_tests/port/builders.py b/Tools/Scripts/webkitpy/layout_tests/port/builders.py index b643a58..12a9927 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/builders.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/builders.py @@ -87,8 +87,6 @@ _fuzzy_matches = { _ports_without_builders = [ - "google-chrome-linux32", - "google-chrome-linux64", "qt-mac", "qt-win", "qt-wk2", diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py index a138e7e..f4a6a51 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py @@ -78,10 +78,7 @@ class ChromiumMacPort(chromium.ChromiumPort): def __init__(self, host, port_name, **kwargs): chromium.ChromiumPort.__init__(self, host, port_name, **kwargs) - - # We're a little generic here because this code is reused by the - # 'google-chrome' port as well as the 'mock-' and 'dryrun-' ports. - self._version = port_name[port_name.index('-mac-') + len('-mac-'):] + self._version = port_name[port_name.index('chromium-mac-') + len('chromium-mac-'):] assert self._version in self.SUPPORTED_OS_VERSIONS def baseline_search_path(self): diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py index 0731716..5161124 100755 --- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py @@ -75,10 +75,7 @@ class ChromiumWinPort(chromium.ChromiumPort): def __init__(self, host, port_name, **kwargs): chromium.ChromiumPort.__init__(self, host, port_name, **kwargs) - - # We're a little generic here because this code is reused by the - # 'google-chrome' port as well as the 'mock-' and 'dryrun-' ports. - self._version = port_name[port_name.index('-win-') + len('-win-'):] + self._version = port_name[port_name.index('chromium-win-') + len('chromium-win-'):] assert self._version in self.SUPPORTED_VERSIONS, "%s is not in %s" % (self._version, self.SUPPORTED_VERSIONS) def setup_environ_for_server(self, server_name=None): diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory.py b/Tools/Scripts/webkitpy/layout_tests/port/factory.py index 881a80b..4ae0117 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/factory.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/factory.py @@ -71,10 +71,6 @@ class PortFactory(object): 'chromium_mac.ChromiumMacPort', 'chromium_win.ChromiumWinPort', 'efl.EflPort', - 'google_chrome.GoogleChromeLinux32Port', - 'google_chrome.GoogleChromeLinux64Port', - 'google_chrome.GoogleChromeMacPort', - 'google_chrome.GoogleChromeWinPort', 'gtk.GtkPort', 'mac.MacPort', 'mock_drt.MockDRTPort', diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py index 700399e..70089ce 100644 --- a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py +++ b/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py @@ -35,7 +35,6 @@ from webkitpy.layout_tests.port import chromium_linux from webkitpy.layout_tests.port import chromium_mac from webkitpy.layout_tests.port import chromium_win from webkitpy.layout_tests.port import factory -from webkitpy.layout_tests.port import google_chrome from webkitpy.layout_tests.port import gtk from webkitpy.layout_tests.port import mac from webkitpy.layout_tests.port import qt @@ -69,26 +68,6 @@ class FactoryTest(unittest.TestCase): self.assert_port(port_name=None, os_name='win', os_version='xp', cls=win.WinPort) self.assert_port(port_name=None, os_name='win', os_version='xp', options=self.webkit_options, cls=win.WinPort) - def test_google_chrome(self): - self.assert_port(port_name='google-chrome-linux32', - cls=google_chrome.GoogleChromeLinux32Port) - self.assert_port(port_name='google-chrome-linux64', os_name='linux', os_version='lucid', - cls=google_chrome.GoogleChromeLinux64Port) - self.assert_port(port_name='google-chrome-linux64', - cls=google_chrome.GoogleChromeLinux64Port) - self.assert_port(port_name='google-chrome-win-xp', - cls=google_chrome.GoogleChromeWinPort) - self.assert_port(port_name='google-chrome-win', os_name='win', os_version='xp', - cls=google_chrome.GoogleChromeWinPort) - self.assert_port(port_name='google-chrome-win-xp', os_name='win', os_version='xp', - cls=google_chrome.GoogleChromeWinPort) - self.assert_port(port_name='google-chrome-mac', os_name='mac', os_version='leopard', - cls=google_chrome.GoogleChromeMacPort) - self.assert_port(port_name='google-chrome-mac-leopard', os_name='mac', os_version='leopard', - cls=google_chrome.GoogleChromeMacPort) - self.assert_port(port_name='google-chrome-mac-leopard', - cls=google_chrome.GoogleChromeMacPort) - def test_gtk(self): self.assert_port(port_name='gtk', cls=gtk.GtkPort) diff --git a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome.py b/Tools/Scripts/webkitpy/layout_tests/port/google_chrome.py deleted file mode 100644 index 8d2df0e..0000000 --- a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/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 chromium_linux -import chromium_mac -import chromium_win - - -def _expectations_files(port, super): - return super.expectations_files(port) + [port.path_from_chromium_base('webkit', 'tools', 'layout_tests', 'test_expectations_chrome.txt')] - - -class GoogleChromeLinux32Port(chromium_linux.ChromiumLinuxPort): - port_name = 'google-chrome-linux32' - - # FIXME: Make google-chrome-XXX work as a port name. - @classmethod - def determine_full_port_name(cls, host, options, port_name): - return 'chromium-linux-x86' - - def baseline_search_path(self): - paths = chromium_linux.ChromiumLinuxPort.baseline_search_path(self) - paths.insert(0, self._webkit_baseline_path('google-chrome-linux32')) - return paths - - def expectations_files(self): - return _expectations_files(self, chromium_linux.ChromiumLinuxPort) - - def architecture(self): - return 'x86' - - -class GoogleChromeLinux64Port(chromium_linux.ChromiumLinuxPort): - port_name = 'google-chrome-linux64' - - # FIXME: Make google-chrome-XXX work as a port name. - @classmethod - def determine_full_port_name(cls, host, options, port_name): - return 'chromium-linux-x86_64' - - def baseline_search_path(self): - paths = chromium_linux.ChromiumLinuxPort.baseline_search_path(self) - paths.insert(0, self._webkit_baseline_path('google-chrome-linux64')) - return paths - - def expectations_files(self): - return _expectations_files(self, chromium_linux.ChromiumLinuxPort) - - def architecture(self): - return 'x86_64' - - -class GoogleChromeMacPort(chromium_mac.ChromiumMacPort): - port_name = 'google-chrome-mac' - - # FIXME: Make google-chrome-XXX work as a port name. - @classmethod - def determine_full_port_name(cls, host, options, port_name): - return 'chromium-mac-snowleopard' - - def baseline_search_path(self): - paths = chromium_mac.ChromiumMacPort.baseline_search_path(self) - paths.insert(0, self._webkit_baseline_path('google-chrome-mac')) - return paths - - def expectations_files(self): - return _expectations_files(self, chromium_mac.ChromiumMacPort) - - -class GoogleChromeWinPort(chromium_win.ChromiumWinPort): - port_name = 'google-chrome-win' - - # FIXME: Make google-chrome-XXX work as a port name. - @classmethod - def determine_full_port_name(cls, host, options, port_name): - return 'chromium-win-win7' - - def baseline_search_path(self): - paths = chromium_win.ChromiumWinPort.baseline_search_path(self) - paths.insert(0, self._webkit_baseline_path('google-chrome-win')) - return paths - - def expectations_files(self): - return _expectations_files(self, chromium_win.ChromiumWinPort) diff --git a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py deleted file mode 100644 index 6d3c1a7..0000000 --- a/Tools/Scripts/webkitpy/layout_tests/port/google_chrome_unittest.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/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 unittest - -from webkitpy.common.system.systemhost_mock import MockSystemHost -from webkitpy.layout_tests.port.factory import PortFactory - - -class TestGoogleChromePort(unittest.TestCase): - def _verify_baseline_search_path_startswith(self, port_name, expected_platform_dirs): - port = PortFactory(MockSystemHost()).get(port_name=port_name) - actual_platform_dirs = [port._filesystem.basename(path) for path in port.baseline_search_path()] - self.assertEqual(expected_platform_dirs, actual_platform_dirs[0:len(expected_platform_dirs)]) - - def _verify_expectations_overrides(self, port_name): - host = MockSystemHost() - port = PortFactory(host).get(port_name=port_name, options=None) - self.assertTrue('TestExpectations' in port.expectations_files()[0]) - self.assertTrue('skia_test_expectations.txt' in port.expectations_files()[1]) - self.assertTrue('test_expectations_chrome.txt' in port.expectations_files()[-1]) - - def test_get_google_chrome_port(self): - self._verify_baseline_search_path_startswith('google-chrome-linux32', ['google-chrome-linux32', 'chromium-linux-x86']) - self._verify_baseline_search_path_startswith('google-chrome-linux64', ['google-chrome-linux64', 'chromium-linux']) - self._verify_baseline_search_path_startswith('google-chrome-mac', ['google-chrome-mac', 'chromium-mac-snowleopard']) - self._verify_baseline_search_path_startswith('google-chrome-win', ['google-chrome-win', 'chromium-win']) - - self._verify_expectations_overrides('google-chrome-mac') - self._verify_expectations_overrides('google-chrome-win') - self._verify_expectations_overrides('google-chrome-linux32') - self._verify_expectations_overrides('google-chrome-linux64') - - -if __name__ == '__main__': - unittest.main() -- 2.7.4