Changeset 52764 in webkit


Ignore:
Timestamp:
Jan 4, 2010 3:13:50 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-01-04 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

commit-queue can wrongly reject patches if the buildbots are behind
https://bugs.webkit.org/show_bug.cgi?id=30098

Check to make sure we can currently build and test before trying to
land a patch.

  • Scripts/webkitpy/commands/queues.py:
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r52753 r52764  
     12010-01-04  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        commit-queue can wrongly reject patches if the buildbots are behind
     6        https://bugs.webkit.org/show_bug.cgi?id=30098
     7
     8        Check to make sure we can currently build and test before trying to
     9        land a patch.
     10
     11        * Scripts/webkitpy/commands/queues.py:
     12
    1132010-01-04  Adam Roben  <aroben@apple.com>
    214
  • trunk/WebKitTools/Scripts/webkitpy/commands/queues.py

    r52719 r52764  
    146146        return patches[0]
    147147
    148     def should_proceed_with_work_item(self, patch):
     148    def _can_build_and_test(self):
     149        try:
     150            self.run_bugzilla_tool(["build-and-test", "--force-clean", "--non-interactive", "--build-style=both", "--quiet"])
     151        except ScriptError, e:
     152            self._update_status("Unabled to successfully build and test", None)
     153            return False
     154        return True
     155
     156    def _builders_are_green(self):
    149157        red_builders_names = self.tool.buildbot.red_core_builders_names()
    150158        if red_builders_names:
     
    152160            self._update_status("Builders [%s] are red. See http://build.webkit.org" % ", ".join(red_builders_names), None)
    153161            return False
     162        return True
     163
     164    def should_proceed_with_work_item(self, patch):
     165        if not self._builders_are_green():
     166            return False
     167        if not self._can_build_and_test():
     168            return False
     169        if not self._builders_are_green():
     170            return False
    154171        self._update_status("Landing patch", patch)
    155172        return True
     
    158175        try:
    159176            self._cc_watchers(patch["bug_id"])
    160             self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--build-style=both", "--quiet", patch["id"]])
     177            # We pass --no-update here because we've already validated
     178            # that the current revision actually builds and passes the tests.
     179            # If we update, we risk moving to a revision that doesn't!
     180            self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--no-update", "--parent-command=commit-queue", "--build-style=both", "--quiet", patch["id"]])
    161181            self._did_pass(patch)
    162182        except ScriptError, e:
Note: See TracChangeset for help on using the changeset viewer.