Remove the rest of Chromium code from webkitpy
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2013 08:46:28 +0000 (08:46 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2013 08:46:28 +0000 (08:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114420

Reviewed by Benjamin Poulain.

* Scripts/webkitpy/common/config/urls.py:
(view_revision_url):
* Scripts/webkitpy/common/host.py:
(Host._engage_awesome_locale_hacks):
(Host.initialize_scm):
(Host):
* Scripts/webkitpy/common/host_mock.py:
(MockHost.__init__):
(MockHost.checkout):
* Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py: Removed.
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGeneratorBase._insert_generic_metadata):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser._tokenize_line):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(ExpectationSyntaxTests.test_bare_name_and_bugs):
(ExpectationSyntaxTests.test_warnings):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.skips_perf_test):
(Port.path_to_test_expectations_file):
(Port._port_flag_for_scripts):
* Scripts/webkitpy/style/checkers/cpp.py:
(check_function_definition):
(check_include_line):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(OrderOfIncludesTest.test_check_wtf_includes):
(WebKitStyleTest.test_webkit_export_check):
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase.test_valid_expectations):
* Scripts/webkitpy/tool/bot/irc_command.py:
(Rollout.execute):
* Scripts/webkitpy/tool/bot/irc_command_unittest.py:
(IRCCommandTest.test_whois):
* Scripts/webkitpy/tool/bot/ircbot_unittest.py:
(IRCBotTest.test_help):
* Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
(SheriffBotTest.test_command_aliases):

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

16 files changed:
Tools/ChangeLog
Tools/Scripts/webkitpy/common/config/urls.py
Tools/Scripts/webkitpy/common/host.py
Tools/Scripts/webkitpy/common/host_mock.py
Tools/Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py [deleted file]
Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/base.py
Tools/Scripts/webkitpy/style/checkers/cpp.py
Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
Tools/Scripts/webkitpy/tool/bot/irc_command.py
Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py
Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py
Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py

index 7f830ae67f83ccefe18639c9825a6ae28ed84ab1..26f419152a4374c8bc990e5c73c2ab77896e8ef8 100644 (file)
@@ -1,3 +1,48 @@
+2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove the rest of Chromium code from webkitpy
+        https://bugs.webkit.org/show_bug.cgi?id=114420
+
+        Reviewed by Benjamin Poulain.
+
+        * Scripts/webkitpy/common/config/urls.py:
+        (view_revision_url):
+        * Scripts/webkitpy/common/host.py:
+        (Host._engage_awesome_locale_hacks):
+        (Host.initialize_scm):
+        (Host):
+        * Scripts/webkitpy/common/host_mock.py:
+        (MockHost.__init__):
+        (MockHost.checkout):
+        * Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py: Removed.
+        * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
+        (JSONResultsGeneratorBase._insert_generic_metadata):
+        * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+        (TestExpectationParser._tokenize_line):
+        * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+        (ExpectationSyntaxTests.test_bare_name_and_bugs):
+        (ExpectationSyntaxTests.test_warnings):
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        (Port.skips_perf_test):
+        (Port.path_to_test_expectations_file):
+        (Port._port_flag_for_scripts):
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (check_function_definition):
+        (check_include_line):
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (OrderOfIncludesTest.test_check_wtf_includes):
+        (WebKitStyleTest.test_webkit_export_check):
+        * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+        (TestExpectationsTestCase.test_valid_expectations):
+        * Scripts/webkitpy/tool/bot/irc_command.py:
+        (Rollout.execute):
+        * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+        (IRCCommandTest.test_whois):
+        * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+        (IRCBotTest.test_help):
+        * Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
+        (SheriffBotTest.test_command_aliases):
+
 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
 
         roll-chromium-deps doesn't roll DEPS
index 31575c1df2b03f6bb6e246d8014d8905c7582288..81b55c27fa14b3b72e1225e8ac02869fb7984cce 100644 (file)
@@ -37,10 +37,6 @@ def view_revision_url(revision_number):
     return "http://trac.webkit.org/changeset/%s" % revision_number
 
 
-def chromium_results_zip_url(builder_name):
-    return 'http://build.chromium.org/f/chromium/layout_test_results/%s/layout-test-results.zip' % builder_name
-
-chromium_lkgr_url = "http://chromium-status.appspot.com/lkgr"
 contribution_guidelines = "http://webkit.org/coding/contributing.html"
 
 bug_server_domain = "webkit.org"
@@ -54,9 +50,6 @@ attachment_url = _bug_server_regex + r"attachment\.cgi\?id=(?P<attachment_id>\d+
 direct_attachment_url = r"https?://bug-(?P<bug_id>\d+)-attachments.%s/attachment\.cgi\?id=(?P<attachment_id>\d+)" % bug_server_domain
 
 buildbot_url = "http://build.webkit.org"
-chromium_buildbot_url = "http://build.chromium.org/p/chromium.webkit"
-
-chromium_webkit_sheriff_url = "http://build.chromium.org/p/chromium.webkit/sheriff_webkit.js"
 
 omahaproxy_url = "http://omahaproxy.appspot.com/"
 
index 7dd5ad02450cfee99583e8e51a79ed922317996f..73af0b3efc1b19cd0a4d63a9246fca64869bf79c 100644 (file)
@@ -35,7 +35,6 @@ from webkitpy.common.checkout import Checkout
 from webkitpy.common.checkout.scm.detection import SCMDetector
 from webkitpy.common.memoized import memoized
 from webkitpy.common.net import bugzilla, buildbot, web
-from webkitpy.common.net.buildbot.chromiumbuildbot import ChromiumBuildBot
 from webkitpy.common.system.systemhost import SystemHost
 from webkitpy.common.watchlist.watchlistloader import WatchListLoader
 from webkitpy.layout_tests.port.factory import PortFactory
@@ -79,55 +78,7 @@ class Host(SystemHost):
         os.environ['LC_MESSAGES'] = 'en_US.UTF-8'
         os.environ['LC_ALL'] = ''
 
-    # FIXME: This is a horrible, horrible hack for ChromiumWin and should be removed.
-    # Maybe this belongs in SVN in some more generic "find the svn binary" codepath?
-    # Or possibly Executive should have a way to emulate shell path-lookups?
-    # FIXME: Unclear how to test this, since it currently mutates global state on SVN.
-    def _engage_awesome_windows_hacks(self):
-        try:
-            self.executive.run_command(['svn', 'help'])
-        except OSError, e:
-            try:
-                self.executive.run_command(['svn.bat', 'help'])
-                # Chromium Win uses the depot_tools package, which contains a number
-                # of development tools, including Python and svn. Instead of using a
-                # real svn executable, depot_tools indirects via a batch file, called
-                # svn.bat. This batch file allows depot_tools to auto-update the real
-                # svn executable, which is contained in a subdirectory.
-                #
-                # That's all fine and good, except that subprocess.popen can detect
-                # the difference between a real svn executable and batch file when we
-                # don't provide use shell=True. Rather than use shell=True on Windows,
-                # We hack the svn.bat name into the SVN class.
-                _log.debug('Engaging svn.bat Windows hack.')
-                from webkitpy.common.checkout.scm.svn import SVN
-                SVN.executable_name = 'svn.bat'
-            except OSError, e:
-                _log.debug('Failed to engage svn.bat Windows hack.')
-        try:
-            self.executive.run_command(['git', 'help'])
-        except OSError, e:
-            try:
-                self.executive.run_command(['git.bat', 'help'])
-                # Chromium Win uses the depot_tools package, which contains a number
-                # of development tools, including Python and git. Instead of using a
-                # real git executable, depot_tools indirects via a batch file, called
-                # git.bat. This batch file allows depot_tools to auto-update the real
-                # git executable, which is contained in a subdirectory.
-                #
-                # That's all fine and good, except that subprocess.popen can detect
-                # the difference between a real git executable and batch file when we
-                # don't provide use shell=True. Rather than use shell=True on Windows,
-                # We hack the git.bat name into the SVN class.
-                _log.debug('Engaging git.bat Windows hack.')
-                from webkitpy.common.checkout.scm.git import Git
-                Git.executable_name = 'git.bat'
-            except OSError, e:
-                _log.debug('Failed to engage git.bat Windows hack.')
-
     def initialize_scm(self, patch_directories=None):
-        if sys.platform == "win32":
-            self._engage_awesome_windows_hacks()
         detector = SCMDetector(self.filesystem, self.executive)
         self._scm = detector.default_scm(patch_directories)
         self._checkout = Checkout(self.scm())
@@ -143,10 +94,6 @@ class Host(SystemHost):
             return self.chromium_buildbot()
         return self.buildbot
 
-    @memoized
-    def chromium_buildbot(self):
-        return ChromiumBuildBot()
-
     @memoized
     def watch_list(self):
         return WatchListLoader(self.filesystem).load()
index daf5b35e20df62d5b9994d2baec9b745b2a89642..8ac2dd3d2e15c465c12b942fe41d993b91eef511 100644 (file)
@@ -53,7 +53,6 @@ class MockHost(MockSystemHost):
             self.initialize_scm()
         self.bugs = MockBugzilla()
         self.buildbot = MockBuildBot()
-        self._chromium_buildbot = MockBuildBot()
 
         # Note: We're using a real PortFactory here.  Tests which don't wish to depend
         # on the list of known ports should override this with a MockPortFactory.
@@ -73,9 +72,6 @@ class MockHost(MockSystemHost):
     def checkout(self):
         return self._checkout
 
-    def chromium_buildbot(self):
-        return self._chromium_buildbot
-
     def watch_list(self):
         return self._watch_list
 
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py b/Tools/Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py
deleted file mode 100644 (file)
index 5030bba..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (c) 2011, 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.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# 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 webkitpy.common.config.urls as config_urls
-from webkitpy.common.net.buildbot.buildbot import Builder, BuildBot
-# FIXME: builders should probably be in webkitpy.common.config.
-from webkitpy.layout_tests.port.builders import builder_path_from_name
-
-
-class ChromiumBuilder(Builder):
-    # The build.chromium.org builders store their results in a different
-    # location than the build.webkit.org builders.
-    def results_url(self):
-        return "http://build.chromium.org/f/chromium/layout_test_results/%s" % builder_path_from_name(self._name)
-
-    def accumulated_results_url(self):
-        return self.results_url() + "/results/layout-test-results"
-
-
-class ChromiumBuildBot(BuildBot):
-    _builder_factory = ChromiumBuilder
-    _default_url = config_urls.chromium_buildbot_url
index a18bc99692f7556737f6ff2e5f8a0291bbef34f2..472973386b862abba04ec319f31b61500c6ebef8 100644 (file)
@@ -524,18 +524,9 @@ class JSONResultsGeneratorBase(object):
 
         # Include SVN revisions for the given repositories.
         for (name, path) in self._svn_repositories:
-            # Note: for JSON file's backward-compatibility we use 'chrome' rather
-            # than 'chromium' here.
-            lowercase_name = name.lower()
-            if lowercase_name == 'chromium':
-                lowercase_name = 'chrome'
-            self._insert_item_into_raw_list(results_for_builder,
-                self._get_svn_revision(path),
-                lowercase_name + 'Revision')
+            self._insert_item_into_raw_list(results_for_builder, self._get_svn_revision(path), name.lower() + 'Revision')
 
-        self._insert_item_into_raw_list(results_for_builder,
-            int(time.time()),
-            self.TIME)
+        self._insert_item_into_raw_list(results_for_builder, int(time.time()), self.TIME)
 
     def _insert_test_time_and_result(self, test_name, tests):
         """ Insert a test item with its results to the given tests dictionary.
index f5c977e57a00483a27eaebce37f970624fb4fa67..f270aa41de297ada9aba58f8b7de45d8ff8b6fe0 100644 (file)
@@ -276,25 +276,16 @@ class TestExpectationParser(object):
         warnings = []
 
         WEBKIT_BUG_PREFIX = 'webkit.org/b/'
-        CHROMIUM_BUG_PREFIX = 'crbug.com/'
-        V8_BUG_PREFIX = 'code.google.com/p/v8/issues/detail?id='
 
         tokens = remaining_string.split()
         state = 'start'
         for token in tokens:
-            if (token.startswith(WEBKIT_BUG_PREFIX) or
-                token.startswith(CHROMIUM_BUG_PREFIX) or
-                token.startswith(V8_BUG_PREFIX) or
-                token.startswith('Bug(')):
+            if token.startswith(WEBKIT_BUG_PREFIX) or token.startswith('Bug('):
                 if state != 'start':
                     warnings.append('"%s" is not at the start of the line.' % token)
                     break
                 if token.startswith(WEBKIT_BUG_PREFIX):
                     bugs.append(token.replace(WEBKIT_BUG_PREFIX, 'BUGWK'))
-                elif token.startswith(CHROMIUM_BUG_PREFIX):
-                    bugs.append(token.replace(CHROMIUM_BUG_PREFIX, 'BUGCR'))
-                elif token.startswith(V8_BUG_PREFIX):
-                    bugs.append(token.replace(V8_BUG_PREFIX, 'BUGV8_'))
                 else:
                     match = re.match('Bug\((\w+)\)$', token)
                     if not match:
index 966a4a68efe159c65ef61ad080960740e77adf77..621188c198d482ccf5821ea6100294c072eedc3e 100644 (file)
@@ -329,9 +329,8 @@ class ExpectationSyntaxTests(Base):
 
     def test_bare_name_and_bugs(self):
         self.assert_tokenize_exp('webkit.org/b/12345 foo.html', modifiers=['BUGWK12345', 'SKIP'], expectations=['PASS'])
-        self.assert_tokenize_exp('crbug.com/12345 foo.html', modifiers=['BUGCR12345', 'SKIP'], expectations=['PASS'])
         self.assert_tokenize_exp('Bug(dpranke) foo.html', modifiers=['BUGDPRANKE', 'SKIP'], expectations=['PASS'])
-        self.assert_tokenize_exp('crbug.com/12345 crbug.com/34567 foo.html', modifiers=['BUGCR12345', 'BUGCR34567', 'SKIP'], expectations=['PASS'])
+        self.assert_tokenize_exp('webkit.org/b/12345 webkit.org/b/34567 foo.html', modifiers=['BUGWK12345', 'BUGWK34567', 'SKIP'], expectations=['PASS'])
 
     def test_comments(self):
         self.assert_tokenize_exp("# comment", name=None, comment="# comment")
@@ -365,9 +364,9 @@ class ExpectationSyntaxTests(Base):
     def test_warnings(self):
         self.assert_tokenize_exp('[ Mac ]', warnings=['Did not find a test name.'], name=None)
         self.assert_tokenize_exp('[ [', warnings=['unexpected "["'], name=None)
-        self.assert_tokenize_exp('crbug.com/12345 ]', warnings=['unexpected "]"'], name=None)
+        self.assert_tokenize_exp('webkit.org/b/12345 ]', warnings=['unexpected "]"'], name=None)
 
-        self.assert_tokenize_exp('foo.html crbug.com/12345 ]', warnings=['"crbug.com/12345" is not at the start of the line.'])
+        self.assert_tokenize_exp('foo.html webkit.org/b/12345 ]', warnings=['"webkit.org/b/12345" is not at the start of the line.'])
 
 
 class SemanticTests(Base):
index 0811c9fda93a0fc53a49d04aa2da9dc91c6c0cd7..c26073a2cbcef77f43efc935116bb40ce3998903 100644 (file)
@@ -775,9 +775,6 @@ class Port(object):
                 return True
         return False
 
-    def is_chromium(self):
-        return False
-
     def name(self):
         """Returns a name that uniquely identifies this particular type of port
         (e.g., "mac-snowleopard" or "chromium-linux-x86_x64" and can be passed
@@ -819,11 +816,7 @@ class Port(object):
         # FIXME: We need to remove this when we make rebaselining work with multiple files and just generalize expectations_files().
 
         # 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'):
-            port_name = 'chromium'
-
-        return self._filesystem.join(self._webkit_baseline_path(port_name), 'TestExpectations')
+        return self._filesystem.join(self._webkit_baseline_path(self.port_name), 'TestExpectations')
 
     def relative_test_filename(self, filename):
         """Returns a test_name a relative unix-style path for a filename under the LayoutTests
@@ -1408,7 +1401,6 @@ class Port(object):
     def _port_flag_for_scripts(self):
         # This is overrriden by ports which need a flag passed to scripts to distinguish the use of that port.
         # For example --qt on linux, since a user might have both Gtk and Qt libraries installed.
-        # FIXME: Chromium should override this once ChromiumPort is a WebKitPort.
         return None
 
     # This is modeled after webkitdirs.pm argumentsForConfiguration() from old-run-webkit-tests
index 81f5cbb826717c8c783c8631dc30908f6b269b3d..0ad57c0d77296e61496405c915dd65123838f6fc 100644 (file)
@@ -1662,20 +1662,6 @@ def check_function_definition(filename, file_extension, clean_lines, line_number
         return
 
     modifiers_and_return_type = function_state.modifiers_and_return_type()
-    if filename.find('/chromium/') != -1 and search(r'\bWEBKIT_EXPORT\b', modifiers_and_return_type):
-        if filename.find('/chromium/public/') == -1 and filename.find('/chromium/tests/') == -1 and filename.find('chromium/platform') == -1:
-            error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
-                  'WEBKIT_EXPORT should only appear in the chromium public (or tests) directory.')
-        elif not file_extension == "h":
-            error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
-                  'WEBKIT_EXPORT should only be used in header files.')
-        elif not function_state.is_declaration or search(r'\binline\b', modifiers_and_return_type):
-            error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
-                  'WEBKIT_EXPORT should not be used on a function with a body.')
-        elif function_state.is_pure:
-            error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
-                  'WEBKIT_EXPORT should not be used with a pure virtual function.')
-
     check_function_definition_and_pass_ptr(modifiers_and_return_type, function_state.function_name_start_position.row, 'return', error)
 
     parameter_list = function_state.parameter_list()
@@ -2826,10 +2812,6 @@ def check_include_line(filename, file_extension, clean_lines, line_number, inclu
         error(line_number, 'build/include', 4,
               'wtf includes should be <wtf/file.h> instead of "wtf/file.h".')
 
-    if filename.find('/chromium/') != -1 and include.startswith('cc/CC'):
-        error(line_number, 'build/include', 4,
-              'cc includes should be "CCFoo.h" instead of "cc/CCFoo.h".')
-
     duplicate_header = include in include_state
     if duplicate_header:
         error(line_number, 'build/include', 4,
index 8de99df7e70867d71600fb32ec974f1762578ffd..1bf949793d9a730c14e8b2819db1d82cd327b633 100644 (file)
@@ -2760,15 +2760,6 @@ class OrderOfIncludesTest(CppStyleTestBase):
                                          'wtf includes should be <wtf/file.h> instead of "wtf/file.h".'
                                          '  [build/include] [4]')
 
-    def test_check_cc_includes(self):
-        self.assert_language_rules_check('bar/chromium/foo.cpp',
-                                         '#include "config.h"\n'
-                                         '#include "foo.h"\n'
-                                         '\n'
-                                         '#include "cc/CCProxy.h"\n',
-                                         'cc includes should be "CCFoo.h" instead of "cc/CCFoo.h".'
-                                         '  [build/include] [4]')
-
     def test_classify_include(self):
         classify_include = cpp_style._classify_include
         include_state = cpp_style._IncludeState()
@@ -4795,50 +4786,16 @@ class WebKitStyleTest(CppStyleTestBase):
                          '  [whitespace/comments] [5]')
 
     def test_webkit_export_check(self):
-        webkit_export_error_rules = ('-',
-                                  '+readability/webkit_export')
-        self.assertEqual('',
-                          self.perform_lint('WEBKIT_EXPORT int foo();\n',
-                                            'WebKit/chromium/public/test.h',
-                                            webkit_export_error_rules))
-        self.assertEqual('',
-                          self.perform_lint('WEBKIT_EXPORT int foo();\n',
-                                            'WebKit/chromium/tests/test.h',
-                                            webkit_export_error_rules))
-        self.assertEqual('WEBKIT_EXPORT should only be used in header files.  [readability/webkit_export] [5]',
-                          self.perform_lint('WEBKIT_EXPORT int foo();\n',
-                                            'WebKit/chromium/public/test.cpp',
-                                            webkit_export_error_rules))
-        self.assertEqual('WEBKIT_EXPORT should only appear in the chromium public (or tests) directory.  [readability/webkit_export] [5]',
-                          self.perform_lint('WEBKIT_EXPORT int foo();\n',
-                                            'WebKit/chromium/src/test.h',
-                                            webkit_export_error_rules))
-        self.assertEqual('WEBKIT_EXPORT should not be used on a function with a body.  [readability/webkit_export] [5]',
-                          self.perform_lint('WEBKIT_EXPORT int foo() { }\n',
-                                            'WebKit/chromium/public/test.h',
-                                            webkit_export_error_rules))
-        self.assertEqual('WEBKIT_EXPORT should not be used on a function with a body.  [readability/webkit_export] [5]',
-                          self.perform_lint('WEBKIT_EXPORT inline int foo()\n'
-                                            '{\n'
-                                            '}\n',
-                                            'WebKit/chromium/public/test.h',
-                                            webkit_export_error_rules))
-        self.assertEqual('WEBKIT_EXPORT should not be used with a pure virtual function.  [readability/webkit_export] [5]',
-                          self.perform_lint('{}\n'
-                                            'WEBKIT_EXPORT\n'
-                                            'virtual\n'
-                                            'int\n'
-                                            'foo() = 0;\n',
-                                            'WebKit/chromium/public/test.h',
-                                            webkit_export_error_rules))
+        webkit_export_error_rules = ('-', '+readability/webkit_export')
         self.assertEqual('',
-                          self.perform_lint('{}\n'
-                                            'WEBKIT_EXPORT\n'
-                                            'virtual\n'
-                                            'int\n'
-                                            'foo() = 0;\n',
-                                            'test.h',
-                                            webkit_export_error_rules))
+            self.perform_lint(
+                '{}\n'
+                'WEBKIT_EXPORT\n'
+                'virtual\n'
+                'int\n'
+                'foo() = 0;\n',
+                'test.h',
+                webkit_export_error_rules))
 
     def test_other(self):
         # FIXME: Implement this.
index e3c0c0b3ad2b507604dbf2c530ded9e714a3f8fe..18648dfeebb5ac19b69b645673c8e6d60c7b5b17 100644 (file)
@@ -113,7 +113,7 @@ class TestExpectationsTestCase(unittest.TestCase):
         self.assertFalse(self._error_collector.turned_off_filtering)
 
     def test_valid_expectations(self):
-        self.assert_lines_lint(["crbug.com/1234 [ Mac ] passes/text.html [ Pass Failure ]"], should_pass=True)
+        self.assert_lines_lint(["webkit.org/b/1234 [ Mac ] passes/text.html [ Pass Failure ]"], should_pass=True)
 
     def test_invalid_expectations(self):
         self.assert_lines_lint(["Bug(me) passes/text.html [ Give Up]"], should_pass=False)
index 54ed7d808835ef4f2100eeb1e2d23453fd4ec0ae..6df5e80986351e83538341ec3908a88da94f1326 100644 (file)
@@ -243,44 +243,6 @@ class Rollout(IRCCommand):
             _post_error_and_check_for_bug_url(tool, nicks_string, e)
 
 
-class Sheriffs(IRCCommand):
-    usage_string = "sheriffs"
-    help_string = "Retrieves who the current Chromium WebKit sheriffs are from: %s" % urls.chromium_webkit_sheriff_url
-
-    def _retrieve_webkit_sheriffs(self, tool, url):
-        try:
-            sheriff_js = tool.web.get_binary(url, True)
-        except:
-            return None
-        if sheriff_js == None:
-            return None
-
-        match = re.search(r"document.write\('(.*)'\)", sheriff_js)
-
-        try:
-            return match.group(1)
-        except:
-            return None
-
-    def execute(self, nick, args, tool, sheriff):
-        if not args:
-            url = urls.chromium_webkit_sheriff_url
-        else:
-            url = args[0]
-
-        sheriffs = self._retrieve_webkit_sheriffs(tool, url)
-        if sheriffs == None:
-            return "%s: Failed to parse URL: %s" % (nick, url)
-
-        sheriff_name = "Chromium Webkit sheriff"
-        sheriff_count = len(sheriffs.split())
-        if sheriff_count == 0:
-            return "%s: There are no %ss currently assigned." % (nick, sheriff_name)
-        if sheriff_count == 1:
-            return "%s: The current %s is: %s" % (nick, sheriff_name, sheriffs)
-        return "%s: The current %ss are: %s" % (nick, sheriff_name, sheriffs)
-
-
 class Whois(IRCCommand):
     usage_string = "whois SEARCH_STRING"
     help_string = "Searches known contributors and returns any matches with irc, email and full name. Wild card * permitted."
@@ -322,7 +284,6 @@ visible_commands = {
     "restart": Restart,
     "roll-chromium-deps": RollChromiumDEPS,
     "rollout": Rollout,
-    "sheriffs": Sheriffs,
     "whois": Whois,
 }
 
@@ -332,10 +293,5 @@ visible_commands = {
 # people to use and it seems silly to have them hunt around for "rollout" instead.
 commands = visible_commands.copy()
 commands["revert"] = Rollout
-commands["gardeners"] = Sheriffs
-# Enough people misspell "sheriffs" that they've requested aliases for the command.
-commands["sherriffs"] = Sheriffs
-commands["sherifs"] = Sheriffs
-commands["sherrifs"] = Sheriffs
 # "hello" Alias for "hi" command for the purposes of testing aliases
 commands["hello"] = Hi
index a3ee2645f4085dd396eb5e7fa4e7c9e42a2881a7..f83d0731b5783ff0b2caf49160694f1317b5fbe1 100644 (file)
@@ -61,29 +61,6 @@ class IRCCommandTest(unittest.TestCase):
         self.assertEqual('tom: More than 5 contributors match \'david\', could you be more specific?',
                           whois.execute("tom", ["david"], None, None))
 
-    @staticmethod
-    def _sheriff_test_data_url(suffix):
-        return "file://" + os.path.join(os.path.dirname(os.path.abspath(__file__)), "testdata", "webkit_sheriff_%s.js" % suffix)
-
-    def test_sheriffs(self):
-        sheriffs = Sheriffs()
-        tool = MockTool(web=MockWeb({
-          "test_0": "document.write('');",
-          "test_1": "document.write('test_user');",
-          "test_2": "document.write('test_user_1, test_user_2');",
-          "test_malformed": "malformed",
-        }))
-        self.assertEqual("tom: There are no Chromium Webkit sheriffs currently assigned.",
-                         sheriffs.execute("tom", ["test_0"], tool, None))
-        self.assertEqual("tom: The current Chromium Webkit sheriff is: test_user",
-                         sheriffs.execute("tom", ["test_1"], tool, None))
-        self.assertEqual("tom: The current Chromium Webkit sheriffs are: test_user_1, test_user_2",
-                         sheriffs.execute("tom", ["test_2"], tool, None))
-        self.assertEqual("tom: Failed to parse URL: test_malformed",
-                         sheriffs.execute("tom", ["test_malformed"], tool, None))
-        self.assertEqual("tom: Failed to parse URL: invalid",
-                         sheriffs.execute("tom", ["invalid"], tool, None))
-
     def test_create_bug(self):
         create_bug = CreateBug()
         self.assertEqual("tom: Usage: create-bug BUG_TITLE",
index f2b8927e8914de2a775b158ce2acbef7617c1e49..5fd69e2f10029d97157d22fe7478a8a7b732ad00 100644 (file)
@@ -88,7 +88,7 @@ class IRCBotTest(unittest.TestCase):
         OutputCapture().assert_outputs(self, run, args=["hi"], expected_logs=expected_logs)
 
     def test_help(self):
-        expected_logs = 'MOCK: irc.post: mock_nick: Available commands: create-bug, help, hi, restart, roll-chromium-deps, rollout, sheriffs, whois\nMOCK: irc.post: mock_nick: Type "mock-sheriff-bot: help COMMAND" for help on my individual commands.\n'
+        expected_logs = 'MOCK: irc.post: mock_nick: Available commands: create-bug, help, hi, restart, roll-chromium-deps, rollout, whois\nMOCK: irc.post: mock_nick: Type "mock-sheriff-bot: help COMMAND" for help on my individual commands.\n'
         OutputCapture().assert_outputs(self, run, args=["help"], expected_logs=expected_logs)
         expected_logs = 'MOCK: irc.post: mock_nick: Usage: hi\nMOCK: irc.post: mock_nick: Retrieves a random quip from Bugzilla.\nMOCK: irc.post: mock_nick: Aliases: hello\n'
         OutputCapture().assert_outputs(self, run, args=["help hi"], expected_logs=expected_logs)
index bed8c74f3908b20fe086ccb4a0241e11e36ee49b..76caaf3c063e84da229a92b4838c55088ec3bb72 100644 (file)
@@ -29,7 +29,7 @@
 from webkitpy.tool.commands.queuestest import QueuesTest, MockQueueEngine
 from webkitpy.tool.commands import SheriffBot
 from webkitpy.tool.mocktool import MockTool, MockOptions
-from webkitpy.tool.bot.irc_command import Rollout, Sheriffs
+from webkitpy.tool.bot.irc_command import Rollout
 
 
 class SheriffBotTest(QueuesTest):
@@ -45,12 +45,3 @@ class SheriffBotTest(QueuesTest):
         # Test Rollout command aliases
         revert_command, args = irc_bot._parse_command_and_args("revert")
         self.assertEqual(revert_command, Rollout)
-        # Test Sheriffs command aliases
-        gardeners_command, args = irc_bot._parse_command_and_args("gardeners")
-        self.assertEqual(gardeners_command, Sheriffs)
-        sherifs_command, args = irc_bot._parse_command_and_args("sherifs")
-        self.assertEqual(sherifs_command, Sheriffs)
-        sherrifs_command, args = irc_bot._parse_command_and_args("sherrifs")
-        self.assertEqual(sherrifs_command, Sheriffs)
-        sherriffs_command, args = irc_bot._parse_command_and_args("sherriffs")
-        self.assertEqual(sherriffs_command, Sheriffs)