Changeset 56866 in webkit


Ignore:
Timestamp:
Mar 31, 2010 1:57:45 PM (14 years ago)
Author:
eric@webkit.org
Message:

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

Reviewed by Eric Seidel.

Add a Builder.force_build method
https://bugs.webkit.org/show_bug.cgi?id=36875

We plan to eventually use this in SheriffBot to break deadlocks created
by flaky tests.

  • Scripts/webkitpy/common/net/buildbot.py:
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56863 r56866  
     12010-03-31  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Add a Builder.force_build method
     6        https://bugs.webkit.org/show_bug.cgi?id=36875
     7
     8        We plan to eventually use this in SheriffBot to break deadlocks created
     9        by flaky tests.
     10
     11        * Scripts/webkitpy/common/net/buildbot.py:
     12
    1132010-03-31  Adam Barth  <abarth@webkit.org>
    214
  • trunk/WebKitTools/Scripts/webkitpy/common/net/buildbot.py

    r56754 r56866  
    3838from webkitpy.common.system.deprecated_logging import log
    3939
     40from webkitpy.thirdparty.autoinstalled import Browser
    4041# WebKit includes a built copy of BeautifulSoup in Scripts/webkitpy/thirdparty
    4142# so this import should always succeed.
     
    4950        self._builds_cache = {}
    5051        self._revision_to_build_number = None
     52        self._browser = Browser()
     53        self._browser.set_handle_robots(False) # The builder pages are excluded by robots.txt
    5154
    5255    def name(self):
     
    8386        self._builds_cache[build_number] = build
    8487        return build
     88
     89    def force_build(self, username="webkit-patch", comments=None):
     90        def predicate(form):
     91            try:
     92                return form.find_control("username")
     93            except Exception, e:
     94                return False
     95        self._browser.open(self.url())
     96        self._browser.select_form(predicate=predicate)
     97        self._browser["username"] = username
     98        if comments:
     99            self._browser["comments"] = comments
     100        return self._browser.submit()
    85101
    86102    file_name_regexp = re.compile(r"r(?P<revision>\d+) \((?P<build_number>\d+)\)")
Note: See TracChangeset for help on using the changeset viewer.