Changeset 148185 in webkit


Ignore:
Timestamp:
Apr 11, 2013 1:46:28 AM (11 years ago)
Author:
rniwa@webkit.org
Message:

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):

Location:
trunk/Tools
Files:
1 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r148184 r148185  
     12013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Remove the rest of Chromium code from webkitpy
     4        https://bugs.webkit.org/show_bug.cgi?id=114420
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        * Scripts/webkitpy/common/config/urls.py:
     9        (view_revision_url):
     10        * Scripts/webkitpy/common/host.py:
     11        (Host._engage_awesome_locale_hacks):
     12        (Host.initialize_scm):
     13        (Host):
     14        * Scripts/webkitpy/common/host_mock.py:
     15        (MockHost.__init__):
     16        (MockHost.checkout):
     17        * Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py: Removed.
     18        * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
     19        (JSONResultsGeneratorBase._insert_generic_metadata):
     20        * Scripts/webkitpy/layout_tests/models/test_expectations.py:
     21        (TestExpectationParser._tokenize_line):
     22        * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
     23        (ExpectationSyntaxTests.test_bare_name_and_bugs):
     24        (ExpectationSyntaxTests.test_warnings):
     25        * Scripts/webkitpy/layout_tests/port/base.py:
     26        (Port.skips_perf_test):
     27        (Port.path_to_test_expectations_file):
     28        (Port._port_flag_for_scripts):
     29        * Scripts/webkitpy/style/checkers/cpp.py:
     30        (check_function_definition):
     31        (check_include_line):
     32        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
     33        (OrderOfIncludesTest.test_check_wtf_includes):
     34        (WebKitStyleTest.test_webkit_export_check):
     35        * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
     36        (TestExpectationsTestCase.test_valid_expectations):
     37        * Scripts/webkitpy/tool/bot/irc_command.py:
     38        (Rollout.execute):
     39        * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
     40        (IRCCommandTest.test_whois):
     41        * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
     42        (IRCBotTest.test_help):
     43        * Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
     44        (SheriffBotTest.test_command_aliases):
     45
    1462013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
    247
  • trunk/Tools/Scripts/webkitpy/common/config/urls.py

    r138603 r148185  
    3838
    3939
    40 def chromium_results_zip_url(builder_name):
    41     return 'http://build.chromium.org/f/chromium/layout_test_results/%s/layout-test-results.zip' % builder_name
    42 
    43 chromium_lkgr_url = "http://chromium-status.appspot.com/lkgr"
    4440contribution_guidelines = "http://webkit.org/coding/contributing.html"
    4541
     
    5551
    5652buildbot_url = "http://build.webkit.org"
    57 chromium_buildbot_url = "http://build.chromium.org/p/chromium.webkit"
    58 
    59 chromium_webkit_sheriff_url = "http://build.chromium.org/p/chromium.webkit/sheriff_webkit.js"
    6053
    6154omahaproxy_url = "http://omahaproxy.appspot.com/"
  • trunk/Tools/Scripts/webkitpy/common/host.py

    r130356 r148185  
    3636from webkitpy.common.memoized import memoized
    3737from webkitpy.common.net import bugzilla, buildbot, web
    38 from webkitpy.common.net.buildbot.chromiumbuildbot import ChromiumBuildBot
    3938from webkitpy.common.system.systemhost import SystemHost
    4039from webkitpy.common.watchlist.watchlistloader import WatchListLoader
     
    8079        os.environ['LC_ALL'] = ''
    8180
    82     # FIXME: This is a horrible, horrible hack for ChromiumWin and should be removed.
    83     # Maybe this belongs in SVN in some more generic "find the svn binary" codepath?
    84     # Or possibly Executive should have a way to emulate shell path-lookups?
    85     # FIXME: Unclear how to test this, since it currently mutates global state on SVN.
    86     def _engage_awesome_windows_hacks(self):
    87         try:
    88             self.executive.run_command(['svn', 'help'])
    89         except OSError, e:
    90             try:
    91                 self.executive.run_command(['svn.bat', 'help'])
    92                 # Chromium Win uses the depot_tools package, which contains a number
    93                 # of development tools, including Python and svn. Instead of using a
    94                 # real svn executable, depot_tools indirects via a batch file, called
    95                 # svn.bat. This batch file allows depot_tools to auto-update the real
    96                 # svn executable, which is contained in a subdirectory.
    97                 #
    98                 # That's all fine and good, except that subprocess.popen can detect
    99                 # the difference between a real svn executable and batch file when we
    100                 # don't provide use shell=True. Rather than use shell=True on Windows,
    101                 # We hack the svn.bat name into the SVN class.
    102                 _log.debug('Engaging svn.bat Windows hack.')
    103                 from webkitpy.common.checkout.scm.svn import SVN
    104                 SVN.executable_name = 'svn.bat'
    105             except OSError, e:
    106                 _log.debug('Failed to engage svn.bat Windows hack.')
    107         try:
    108             self.executive.run_command(['git', 'help'])
    109         except OSError, e:
    110             try:
    111                 self.executive.run_command(['git.bat', 'help'])
    112                 # Chromium Win uses the depot_tools package, which contains a number
    113                 # of development tools, including Python and git. Instead of using a
    114                 # real git executable, depot_tools indirects via a batch file, called
    115                 # git.bat. This batch file allows depot_tools to auto-update the real
    116                 # git executable, which is contained in a subdirectory.
    117                 #
    118                 # That's all fine and good, except that subprocess.popen can detect
    119                 # the difference between a real git executable and batch file when we
    120                 # don't provide use shell=True. Rather than use shell=True on Windows,
    121                 # We hack the git.bat name into the SVN class.
    122                 _log.debug('Engaging git.bat Windows hack.')
    123                 from webkitpy.common.checkout.scm.git import Git
    124                 Git.executable_name = 'git.bat'
    125             except OSError, e:
    126                 _log.debug('Failed to engage git.bat Windows hack.')
    127 
    12881    def initialize_scm(self, patch_directories=None):
    129         if sys.platform == "win32":
    130             self._engage_awesome_windows_hacks()
    13182        detector = SCMDetector(self.filesystem, self.executive)
    13283        self._scm = detector.default_scm(patch_directories)
     
    14596
    14697    @memoized
    147     def chromium_buildbot(self):
    148         return ChromiumBuildBot()
    149 
    150     @memoized
    15198    def watch_list(self):
    15299        return WatchListLoader(self.filesystem).load()
  • trunk/Tools/Scripts/webkitpy/common/host_mock.py

    r141182 r148185  
    5454        self.bugs = MockBugzilla()
    5555        self.buildbot = MockBuildBot()
    56         self._chromium_buildbot = MockBuildBot()
    5756
    5857        # Note: We're using a real PortFactory here.  Tests which don't wish to depend
     
    7473        return self._checkout
    7574
    76     def chromium_buildbot(self):
    77         return self._chromium_buildbot
    78 
    7975    def watch_list(self):
    8076        return self._watch_list
  • trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py

    r143833 r148185  
    525525        # Include SVN revisions for the given repositories.
    526526        for (name, path) in self._svn_repositories:
    527             # Note: for JSON file's backward-compatibility we use 'chrome' rather
    528             # than 'chromium' here.
    529             lowercase_name = name.lower()
    530             if lowercase_name == 'chromium':
    531                 lowercase_name = 'chrome'
    532             self._insert_item_into_raw_list(results_for_builder,
    533                 self._get_svn_revision(path),
    534                 lowercase_name + 'Revision')
    535 
    536         self._insert_item_into_raw_list(results_for_builder,
    537             int(time.time()),
    538             self.TIME)
     527            self._insert_item_into_raw_list(results_for_builder, self._get_svn_revision(path), name.lower() + 'Revision')
     528
     529        self._insert_item_into_raw_list(results_for_builder, int(time.time()), self.TIME)
    539530
    540531    def _insert_test_time_and_result(self, test_name, tests):
  • trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py

    r142941 r148185  
    277277
    278278        WEBKIT_BUG_PREFIX = 'webkit.org/b/'
    279         CHROMIUM_BUG_PREFIX = 'crbug.com/'
    280         V8_BUG_PREFIX = 'code.google.com/p/v8/issues/detail?id='
    281279
    282280        tokens = remaining_string.split()
    283281        state = 'start'
    284282        for token in tokens:
    285             if (token.startswith(WEBKIT_BUG_PREFIX) or
    286                 token.startswith(CHROMIUM_BUG_PREFIX) or
    287                 token.startswith(V8_BUG_PREFIX) or
    288                 token.startswith('Bug(')):
     283            if token.startswith(WEBKIT_BUG_PREFIX) or token.startswith('Bug('):
    289284                if state != 'start':
    290285                    warnings.append('"%s" is not at the start of the line.' % token)
     
    292287                if token.startswith(WEBKIT_BUG_PREFIX):
    293288                    bugs.append(token.replace(WEBKIT_BUG_PREFIX, 'BUGWK'))
    294                 elif token.startswith(CHROMIUM_BUG_PREFIX):
    295                     bugs.append(token.replace(CHROMIUM_BUG_PREFIX, 'BUGCR'))
    296                 elif token.startswith(V8_BUG_PREFIX):
    297                     bugs.append(token.replace(V8_BUG_PREFIX, 'BUGV8_'))
    298289                else:
    299290                    match = re.match('Bug\((\w+)\)$', token)
  • trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py

    r140510 r148185  
    330330    def test_bare_name_and_bugs(self):
    331331        self.assert_tokenize_exp('webkit.org/b/12345 foo.html', modifiers=['BUGWK12345', 'SKIP'], expectations=['PASS'])
    332         self.assert_tokenize_exp('crbug.com/12345 foo.html', modifiers=['BUGCR12345', 'SKIP'], expectations=['PASS'])
    333332        self.assert_tokenize_exp('Bug(dpranke) foo.html', modifiers=['BUGDPRANKE', 'SKIP'], expectations=['PASS'])
    334         self.assert_tokenize_exp('crbug.com/12345 crbug.com/34567 foo.html', modifiers=['BUGCR12345', 'BUGCR34567', 'SKIP'], expectations=['PASS'])
     333        self.assert_tokenize_exp('webkit.org/b/12345 webkit.org/b/34567 foo.html', modifiers=['BUGWK12345', 'BUGWK34567', 'SKIP'], expectations=['PASS'])
    335334
    336335    def test_comments(self):
     
    366365        self.assert_tokenize_exp('[ Mac ]', warnings=['Did not find a test name.'], name=None)
    367366        self.assert_tokenize_exp('[ [', warnings=['unexpected "["'], name=None)
    368         self.assert_tokenize_exp('crbug.com/12345 ]', warnings=['unexpected "]"'], name=None)
    369 
    370         self.assert_tokenize_exp('foo.html crbug.com/12345 ]', warnings=['"crbug.com/12345" is not at the start of the line.'])
     367        self.assert_tokenize_exp('webkit.org/b/12345 ]', warnings=['unexpected "]"'], name=None)
     368
     369        self.assert_tokenize_exp('foo.html webkit.org/b/12345 ]', warnings=['"webkit.org/b/12345" is not at the start of the line.'])
    371370
    372371
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py

    r145916 r148185  
    776776        return False
    777777
    778     def is_chromium(self):
    779         return False
    780 
    781778    def name(self):
    782779        """Returns a name that uniquely identifies this particular type of port
     
    820817
    821818        # test_expectations are always in mac/ not mac-leopard/ by convention, hence we use port_name instead of name().
    822         port_name = self.port_name
    823         if port_name.startswith('chromium'):
    824             port_name = 'chromium'
    825 
    826         return self._filesystem.join(self._webkit_baseline_path(port_name), 'TestExpectations')
     819        return self._filesystem.join(self._webkit_baseline_path(self.port_name), 'TestExpectations')
    827820
    828821    def relative_test_filename(self, filename):
     
    14091402        # This is overrriden by ports which need a flag passed to scripts to distinguish the use of that port.
    14101403        # For example --qt on linux, since a user might have both Gtk and Qt libraries installed.
    1411         # FIXME: Chromium should override this once ChromiumPort is a WebKitPort.
    14121404        return None
    14131405
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py

    r147305 r148185  
    16631663
    16641664    modifiers_and_return_type = function_state.modifiers_and_return_type()
    1665     if filename.find('/chromium/') != -1 and search(r'\bWEBKIT_EXPORT\b', modifiers_and_return_type):
    1666         if filename.find('/chromium/public/') == -1 and filename.find('/chromium/tests/') == -1 and filename.find('chromium/platform') == -1:
    1667             error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
    1668                   'WEBKIT_EXPORT should only appear in the chromium public (or tests) directory.')
    1669         elif not file_extension == "h":
    1670             error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
    1671                   'WEBKIT_EXPORT should only be used in header files.')
    1672         elif not function_state.is_declaration or search(r'\binline\b', modifiers_and_return_type):
    1673             error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
    1674                   'WEBKIT_EXPORT should not be used on a function with a body.')
    1675         elif function_state.is_pure:
    1676             error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
    1677                   'WEBKIT_EXPORT should not be used with a pure virtual function.')
    1678 
    16791665    check_function_definition_and_pass_ptr(modifiers_and_return_type, function_state.function_name_start_position.row, 'return', error)
    16801666
     
    28262812        error(line_number, 'build/include', 4,
    28272813              'wtf includes should be <wtf/file.h> instead of "wtf/file.h".')
    2828 
    2829     if filename.find('/chromium/') != -1 and include.startswith('cc/CC'):
    2830         error(line_number, 'build/include', 4,
    2831               'cc includes should be "CCFoo.h" instead of "cc/CCFoo.h".')
    28322814
    28332815    duplicate_header = include in include_state
  • trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

    r140510 r148185  
    27592759                                         '#include "wtf/Assertions.h"\n',
    27602760                                         'wtf includes should be <wtf/file.h> instead of "wtf/file.h".'
    2761                                          '  [build/include] [4]')
    2762 
    2763     def test_check_cc_includes(self):
    2764         self.assert_language_rules_check('bar/chromium/foo.cpp',
    2765                                          '#include "config.h"\n'
    2766                                          '#include "foo.h"\n'
    2767                                          '\n'
    2768                                          '#include "cc/CCProxy.h"\n',
    2769                                          'cc includes should be "CCFoo.h" instead of "cc/CCFoo.h".'
    27702761                                         '  [build/include] [4]')
    27712762
     
    47964787
    47974788    def test_webkit_export_check(self):
    4798         webkit_export_error_rules = ('-',
    4799                                   '+readability/webkit_export')
     4789        webkit_export_error_rules = ('-', '+readability/webkit_export')
    48004790        self.assertEqual('',
    4801                           self.perform_lint('WEBKIT_EXPORT int foo();\n',
    4802                                             'WebKit/chromium/public/test.h',
    4803                                             webkit_export_error_rules))
    4804         self.assertEqual('',
    4805                           self.perform_lint('WEBKIT_EXPORT int foo();\n',
    4806                                             'WebKit/chromium/tests/test.h',
    4807                                             webkit_export_error_rules))
    4808         self.assertEqual('WEBKIT_EXPORT should only be used in header files.  [readability/webkit_export] [5]',
    4809                           self.perform_lint('WEBKIT_EXPORT int foo();\n',
    4810                                             'WebKit/chromium/public/test.cpp',
    4811                                             webkit_export_error_rules))
    4812         self.assertEqual('WEBKIT_EXPORT should only appear in the chromium public (or tests) directory.  [readability/webkit_export] [5]',
    4813                           self.perform_lint('WEBKIT_EXPORT int foo();\n',
    4814                                             'WebKit/chromium/src/test.h',
    4815                                             webkit_export_error_rules))
    4816         self.assertEqual('WEBKIT_EXPORT should not be used on a function with a body.  [readability/webkit_export] [5]',
    4817                           self.perform_lint('WEBKIT_EXPORT int foo() { }\n',
    4818                                             'WebKit/chromium/public/test.h',
    4819                                             webkit_export_error_rules))
    4820         self.assertEqual('WEBKIT_EXPORT should not be used on a function with a body.  [readability/webkit_export] [5]',
    4821                           self.perform_lint('WEBKIT_EXPORT inline int foo()\n'
    4822                                             '{\n'
    4823                                             '}\n',
    4824                                             'WebKit/chromium/public/test.h',
    4825                                             webkit_export_error_rules))
    4826         self.assertEqual('WEBKIT_EXPORT should not be used with a pure virtual function.  [readability/webkit_export] [5]',
    4827                           self.perform_lint('{}\n'
    4828                                             'WEBKIT_EXPORT\n'
    4829                                             'virtual\n'
    4830                                             'int\n'
    4831                                             'foo() = 0;\n',
    4832                                             'WebKit/chromium/public/test.h',
    4833                                             webkit_export_error_rules))
    4834         self.assertEqual('',
    4835                           self.perform_lint('{}\n'
    4836                                             'WEBKIT_EXPORT\n'
    4837                                             'virtual\n'
    4838                                             'int\n'
    4839                                             'foo() = 0;\n',
    4840                                             'test.h',
    4841                                             webkit_export_error_rules))
     4791            self.perform_lint(
     4792                '{}\n'
     4793                'WEBKIT_EXPORT\n'
     4794                'virtual\n'
     4795                'int\n'
     4796                'foo() = 0;\n',
     4797                'test.h',
     4798                webkit_export_error_rules))
    48424799
    48434800    def test_other(self):
  • trunk/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py

    r148075 r148185  
    114114
    115115    def test_valid_expectations(self):
    116         self.assert_lines_lint(["crbug.com/1234 [ Mac ] passes/text.html [ Pass Failure ]"], should_pass=True)
     116        self.assert_lines_lint(["webkit.org/b/1234 [ Mac ] passes/text.html [ Pass Failure ]"], should_pass=True)
    117117
    118118    def test_invalid_expectations(self):
  • trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py

    r148184 r148185  
    244244
    245245
    246 class Sheriffs(IRCCommand):
    247     usage_string = "sheriffs"
    248     help_string = "Retrieves who the current Chromium WebKit sheriffs are from: %s" % urls.chromium_webkit_sheriff_url
    249 
    250     def _retrieve_webkit_sheriffs(self, tool, url):
    251         try:
    252             sheriff_js = tool.web.get_binary(url, True)
    253         except:
    254             return None
    255         if sheriff_js == None:
    256             return None
    257 
    258         match = re.search(r"document.write\('(.*)'\)", sheriff_js)
    259 
    260         try:
    261             return match.group(1)
    262         except:
    263             return None
    264 
    265     def execute(self, nick, args, tool, sheriff):
    266         if not args:
    267             url = urls.chromium_webkit_sheriff_url
    268         else:
    269             url = args[0]
    270 
    271         sheriffs = self._retrieve_webkit_sheriffs(tool, url)
    272         if sheriffs == None:
    273             return "%s: Failed to parse URL: %s" % (nick, url)
    274 
    275         sheriff_name = "Chromium Webkit sheriff"
    276         sheriff_count = len(sheriffs.split())
    277         if sheriff_count == 0:
    278             return "%s: There are no %ss currently assigned." % (nick, sheriff_name)
    279         if sheriff_count == 1:
    280             return "%s: The current %s is: %s" % (nick, sheriff_name, sheriffs)
    281         return "%s: The current %ss are: %s" % (nick, sheriff_name, sheriffs)
    282 
    283 
    284246class Whois(IRCCommand):
    285247    usage_string = "whois SEARCH_STRING"
     
    323285    "roll-chromium-deps": RollChromiumDEPS,
    324286    "rollout": Rollout,
    325     "sheriffs": Sheriffs,
    326287    "whois": Whois,
    327288}
     
    333294commands = visible_commands.copy()
    334295commands["revert"] = Rollout
    335 commands["gardeners"] = Sheriffs
    336 # Enough people misspell "sheriffs" that they've requested aliases for the command.
    337 commands["sherriffs"] = Sheriffs
    338 commands["sherifs"] = Sheriffs
    339 commands["sherrifs"] = Sheriffs
    340296# "hello" Alias for "hi" command for the purposes of testing aliases
    341297commands["hello"] = Hi
  • trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py

    r148180 r148185  
    6161        self.assertEqual('tom: More than 5 contributors match \'david\', could you be more specific?',
    6262                          whois.execute("tom", ["david"], None, None))
    63 
    64     @staticmethod
    65     def _sheriff_test_data_url(suffix):
    66         return "file://" + os.path.join(os.path.dirname(os.path.abspath(__file__)), "testdata", "webkit_sheriff_%s.js" % suffix)
    67 
    68     def test_sheriffs(self):
    69         sheriffs = Sheriffs()
    70         tool = MockTool(web=MockWeb({
    71           "test_0": "document.write('');",
    72           "test_1": "document.write('test_user');",
    73           "test_2": "document.write('test_user_1, test_user_2');",
    74           "test_malformed": "malformed",
    75         }))
    76         self.assertEqual("tom: There are no Chromium Webkit sheriffs currently assigned.",
    77                          sheriffs.execute("tom", ["test_0"], tool, None))
    78         self.assertEqual("tom: The current Chromium Webkit sheriff is: test_user",
    79                          sheriffs.execute("tom", ["test_1"], tool, None))
    80         self.assertEqual("tom: The current Chromium Webkit sheriffs are: test_user_1, test_user_2",
    81                          sheriffs.execute("tom", ["test_2"], tool, None))
    82         self.assertEqual("tom: Failed to parse URL: test_malformed",
    83                          sheriffs.execute("tom", ["test_malformed"], tool, None))
    84         self.assertEqual("tom: Failed to parse URL: invalid",
    85                          sheriffs.execute("tom", ["invalid"], tool, None))
    8663
    8764    def test_create_bug(self):
  • trunk/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py

    r148180 r148185  
    8989
    9090    def test_help(self):
    91         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'
     91        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'
    9292        OutputCapture().assert_outputs(self, run, args=["help"], expected_logs=expected_logs)
    9393        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'
  • trunk/Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py

    r143109 r148185  
    3030from webkitpy.tool.commands import SheriffBot
    3131from webkitpy.tool.mocktool import MockTool, MockOptions
    32 from webkitpy.tool.bot.irc_command import Rollout, Sheriffs
     32from webkitpy.tool.bot.irc_command import Rollout
    3333
    3434
     
    4646        revert_command, args = irc_bot._parse_command_and_args("revert")
    4747        self.assertEqual(revert_command, Rollout)
    48         # Test Sheriffs command aliases
    49         gardeners_command, args = irc_bot._parse_command_and_args("gardeners")
    50         self.assertEqual(gardeners_command, Sheriffs)
    51         sherifs_command, args = irc_bot._parse_command_and_args("sherifs")
    52         self.assertEqual(sherifs_command, Sheriffs)
    53         sherrifs_command, args = irc_bot._parse_command_and_args("sherrifs")
    54         self.assertEqual(sherrifs_command, Sheriffs)
    55         sherriffs_command, args = irc_bot._parse_command_and_args("sherriffs")
    56         self.assertEqual(sherriffs_command, Sheriffs)
Note: See TracChangeset for help on using the changeset viewer.