Changeset 56884 in webkit


Ignore:
Timestamp:
Mar 31, 2010 6:43:46 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-31 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Make the EWS go faster by being optimistic
https://bugs.webkit.org/show_bug.cgi?id=36916

Have the EWS be optimistic that a patch will correctly build. This
should speed up the common case by not requiring two builds for every
patch.

  • Scripts/webkitpy/tool/commands/earlywarningsystem.py:
  • Scripts/webkitpy/tool/commands/queues.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56883 r56884  
     12010-03-31  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Make the EWS go faster by being optimistic
     6        https://bugs.webkit.org/show_bug.cgi?id=36916
     7
     8        Have the EWS be optimistic that a patch will correctly build.  This
     9        should speed up the common case by not requiring two builds for every
     10        patch.
     11
     12        * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
     13        * Scripts/webkitpy/tool/commands/queues.py:
     14
    1152010-03-31  Adam Barth  <abarth@webkit.org>
    216
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/earlywarningsystem.py

    r56802 r56884  
    4444
    4545    def should_proceed_with_work_item(self, patch):
     46        return True
     47
     48    def _can_build(self):
    4649        try:
    4750            self.run_webkit_patch([
     
    5053                "--build-style=%s" % self._build_style,
    5154                "--force-clean",
     55                "--no-update",
    5256                "--quiet"])
    53             self._update_status("Building", patch)
     57            return True
    5458        except ScriptError, e:
    5559            self._update_status("Unable to perform a build")
    5660            return False
     61
     62    def _build(self, patch, first_run=False):
     63        try:
     64            args = [
     65                "build-attachment",
     66                self.port.flag(),
     67                "--build-style=%s" % self._build_style,
     68                "--force-clean",
     69                "--quiet",
     70                "--non-interactive",
     71                patch.id()]
     72            if not first_run:
     73                # See commit-queue for an explanation of what we're doing here.
     74                args.append("--no-update")
     75                args.append("--parent-command=%s" % self.name)
     76            self.run_webkit_patch(args)
     77            return True
     78        except ScriptError, e:
     79            if first_run:
     80                return False
     81            raise
     82
     83    def review_patch(self, patch):
     84        if not self._build(patch, first_run=True):
     85            if not self._can_build():
     86                return False
     87            self._build()
    5788        return True
    58 
    59     def _review_patch(self, patch):
    60         self.run_webkit_patch([
    61             "build-attachment",
    62             self.port.flag(),
    63             "--build-style=%s" % self._build_style,
    64             "--force-clean",
    65             "--quiet",
    66             "--non-interactive",
    67             "--parent-command=%s" % self.name,
    68             "--no-update",
    69             patch.id()])
    7089
    7190    @classmethod
  • trunk/WebKitTools/Scripts/webkitpy/tool/commands/queues.py

    r56857 r56884  
    236236                return False
    237237            self._did_fail(patch)
    238             raise e
     238            raise
    239239
    240240    def process_work_item(self, patch):
     
    275275        AbstractPatchQueue.__init__(self, options)
    276276
    277     def _review_patch(self, patch):
     277    def review_patch(self, patch):
    278278        raise NotImplementedError, "subclasses must implement"
    279279
     
    309309    def process_work_item(self, patch):
    310310        try:
    311             self._review_patch(patch)
    312             self._did_pass(patch)
     311            if self.review_patch(patch):
     312                self._did_pass(patch)
    313313        except ScriptError, e:
    314314            if e.exit_code != QueueEngine.handled_error_code:
     
    335335        return True
    336336
    337     def _review_patch(self, patch):
     337    def review_patch(self, patch):
    338338        self.run_webkit_patch(["check-style", "--force-clean", "--non-interactive", "--parent-command=style-queue", patch.id()])
     339        return True
    339340
    340341    @classmethod
Note: See TracChangeset for help on using the changeset viewer.