Changeset 51260 in webkit


Ignore:
Timestamp:
Nov 20, 2009 2:52:47 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2009-11-20 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.
Reviewed by Eric Seidel.

BuildQueue should check if the tree is currently buildable
https://bugs.webkit.org/show_bug.cgi?id=31744

  • Scripts/bugzilla-tool:
  • Scripts/modules/landingsequence.py:
  • Scripts/modules/webkitlandingscripts.py:
Location:
trunk/WebKitTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r51259 r51260  
     12009-11-20  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4        Reviewed by Eric Seidel.
     5
     6        BuildQueue should check if the tree is currently buildable
     7        https://bugs.webkit.org/show_bug.cgi?id=31744
     8
     9        * Scripts/bugzilla-tool:
     10        * Scripts/modules/landingsequence.py:
     11        * Scripts/modules/webkitlandingscripts.py:
     12
    1132009-11-20  Adam Barth  <abarth@webkit.org>
    214
  • trunk/WebKitTools/Scripts/bugzilla-tool

    r51259 r51260  
    134134
    135135
     136class BuildSequence(ConditionalLandingSequence):
     137    def __init__(self, options, tool):
     138        ConditionalLandingSequence.__init__(self, None, options, tool)
     139
     140    def run(self):
     141        self.clean()
     142        self.update()
     143        self.build()
     144
     145
     146class Build(Command):
     147    name = "build"
     148    def __init__(self):
     149        options = WebKitLandingScripts.cleaning_options()
     150        options += WebKitLandingScripts.build_options()
     151        options += WebKitLandingScripts.land_options()
     152        Command.__init__(self, "Updates working copy and does a build.", "", options)
     153
     154    def execute(self, options, args, tool):
     155        sequence = BuildSequence(options, tool)
     156        sequence.run_and_handle_errors()
     157
     158
    136159class ApplyAttachment(Command):
    137160    name = "apply-attachment"
     
    764787
    765788    def should_proceed_with_work_item(self, patch):
    766         # FIXME: We should check whether we're currently able to build!
     789        try:
     790            self.run_bugzilla_tool(["build", self.port.flag(), "--force-clean", "--quiet"])
     791        except ScriptError, e:
     792            return (False, "Unable to perform a build.", None)
    767793        return (True, "Building patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch["bug_id"])
    768794
    769795    def process_work_item(self, patch):
    770         self.run_bugzilla_tool(["build-attachment", self.port.flag(), "--force-clean", patch["id"]])
     796        self.run_bugzilla_tool(["build-attachment", self.port.flag(), "--force-clean", "--quiet", "--no-update", patch["id"]])
    771797
    772798
  • trunk/WebKitTools/Scripts/modules/landingsequence.py

    r51259 r51260  
    112112        LandingSequence.__init__(self, patch, options, tool)
    113113
     114    def update(self):
     115        if self._options.update:
     116            LandingSequence.update(self)
     117
    114118    def build(self):
    115119        if self._options.build:
  • trunk/WebKitTools/Scripts/modules/webkitlandingscripts.py

    r51243 r51260  
    3737
    3838from modules.changelogs import ChangeLog
    39 from modules.logging import log, tee
     39from modules.logging import error, log, tee
    4040from modules.scm import CommitMessage, detect_scm_system, ScriptError, CheckoutNeedsUpdate
    4141from modules.webkitport import WebKitPort
     
    7979    def land_options():
    8080        return [
    81             make_option("--no-close", action="store_false", dest="close_bug", default=True, help="Leave bug open after landing."),
     81            make_option("--no-update", action="store_false", dest="update", default=True, help="Don't update the working directory."),
    8282            make_option("--no-build", action="store_false", dest="build", default=True, help="Commit without building first, implies --no-test."),
    8383            make_option("--no-test", action="store_false", dest="test", default=True, help="Commit without running run-webkit-tests."),
     84            make_option("--no-close", action="store_false", dest="close_bug", default=True, help="Leave bug open after landing."),
    8485        ]
    8586
Note: See TracChangeset for help on using the changeset viewer.