Changeset 51283 in webkit


Ignore:
Timestamp:
Nov 21, 2009 7:50:16 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-11-21 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

commit-queue fails to run with "permissions error" due to bad bugzilla-tool path
https://bugs.webkit.org/show_bug.cgi?id=31767

What we really want to test is BugzillaTool.path() instead of TrivialTool.path().
Since we don't have a good way to test BugzillaTool pieces, I've
left out a test for now.

  • Scripts/bugzilla-tool:
    • Add a path() implementation to expose bugzilla-tool's file path to commit-queue.
  • Scripts/modules/commands/queues.py:
    • Use tool.path() instead of file.
  • Scripts/modules/multicommandtool.py:
    • Add a new path() method to MultiComandTool.
  • Scripts/modules/multicommandtool_unittest.py:
    • Provide a path() method. Little point in testing this mock implementation.
Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r51282 r51283  
     12009-11-21  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        commit-queue fails to run with "permissions error" due to bad bugzilla-tool path
     6        https://bugs.webkit.org/show_bug.cgi?id=31767
     7
     8        What we really want to test is BugzillaTool.path() instead of TrivialTool.path().
     9        Since we don't have a good way to test BugzillaTool pieces, I've
     10        left out a test for now.
     11
     12        * Scripts/bugzilla-tool:
     13         - Add a path() implementation to expose bugzilla-tool's __file__ path to commit-queue.
     14        * Scripts/modules/commands/queues.py:
     15         - Use tool.path() instead of __file__.
     16        * Scripts/modules/multicommandtool.py:
     17         - Add a new path() method to MultiComandTool.
     18        * Scripts/modules/multicommandtool_unittest.py:
     19         - Provide a path() method.  Little point in testing this mock implementation.
     20
    1212009-11-21  Adam Barth  <abarth@webkit.org>
    222
  • trunk/WebKitTools/Scripts/bugzilla-tool

    r51263 r51283  
    7373        return self.cached_scm
    7474
     75    def path(self):
     76        return __file__
     77
    7578    def should_show_command_help(self, command):
    7679        if command.requires_local_commits:
  • trunk/WebKitTools/Scripts/modules/commands/queues.py

    r51265 r51283  
    9595        raise NotImplementedError, "subclasses must implement"
    9696
    97     @staticmethod
    98     def run_bugzilla_tool(args):
    99         bugzilla_tool_path = __file__ # re-execute this script
    100         bugzilla_tool_args = [bugzilla_tool_path] + args
     97    def run_bugzilla_tool(self, args):
     98        bugzilla_tool_args = [tool.path()] + args
    10199        WebKitLandingScripts.run_and_throw_if_fail(bugzilla_tool_args)
    102100
  • trunk/WebKitTools/Scripts/modules/multicommandtool.py

    r51277 r51283  
    155155        return None
    156156
     157    def path(self):
     158        raise NotImplementedError, "subclasses must implement"
     159
    157160    def should_show_command_help(self, command):
    158161        raise NotImplementedError, "subclasses must implement"
     
    160163    def should_execute_command(self, command):
    161164        raise NotImplementedError, "subclasses must implement"
    162 
    163165
    164166    def main(self, argv=sys.argv):
  • trunk/WebKitTools/Scripts/modules/multicommandtool_unittest.py

    r51277 r51283  
    5656        MultiCommandTool.__init__(self, commands)
    5757
     58    def path():
     59        return __file__
     60
    5861    def should_show_command_help(self, command):
    5962        return True
Note: See TracChangeset for help on using the changeset viewer.