Changeset 90513 in webkit


Ignore:
Timestamp:
Jul 6, 2011 4:34:21 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-07-06 Adam Barth <abarth@webkit.org>

Move buildbot URL in webkitpy to config.urls
https://bugs.webkit.org/show_bug.cgi?id=64041

Reviewed by Eric Seidel.

This patch prepares for using the buildbot class to talk to the
Chromium buildbots.

  • Scripts/webkitpy/common/config/urls.py:
  • Scripts/webkitpy/common/net/buildbot/buildbot.py:
  • Scripts/webkitpy/tool/commands/download_unittest.py:
  • Scripts/webkitpy/tool/commands/queries.py:
  • Scripts/webkitpy/tool/mocktool.py:
  • Scripts/webkitpy/tool/steps/ensurebuildersaregreen.py:
Location:
trunk/Tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90510 r90513  
     12011-07-06  Adam Barth  <abarth@webkit.org>
     2
     3        Move buildbot URL in webkitpy to config.urls
     4        https://bugs.webkit.org/show_bug.cgi?id=64041
     5
     6        Reviewed by Eric Seidel.
     7
     8        This patch prepares for using the buildbot class to talk to the
     9        Chromium buildbots.
     10
     11        * Scripts/webkitpy/common/config/urls.py:
     12        * Scripts/webkitpy/common/net/buildbot/buildbot.py:
     13        * Scripts/webkitpy/tool/commands/download_unittest.py:
     14        * Scripts/webkitpy/tool/commands/queries.py:
     15        * Scripts/webkitpy/tool/mocktool.py:
     16        * Scripts/webkitpy/tool/steps/ensurebuildersaregreen.py:
     17
    1182011-07-06  Kevin Ollivier  <kevino@theolliviers.com>
    219
  • trunk/Tools/Scripts/webkitpy/common/config/urls.py

    r90083 r90513  
    4949bug_url_long = _bug_server_regex + r"show_bug\.cgi\?id=(?P<bug_id>\d+)(&ctype=xml)?"
    5050bug_url_short = r"https?\://webkit\.org/b/(?P<bug_id>\d+)"
     51
     52buildbot_url = "http://build.webkit.org"
     53chromium_buildbot_url = "http://build.chromium.org/p/chromium.webkit"
  • trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py

    r90472 r90513  
    4040import urllib2
    4141
     42import webkitpy.common.config.urls as config_urls
    4243from webkitpy.common.net.failuremap import FailureMap
    4344from webkitpy.common.net.layouttestresults import LayoutTestResults
     
    6768
    6869    def results_url(self):
    69         return "http://%s/results/%s" % (self._buildbot.buildbot_host, self.url_encoded_name())
     70        return "%s/results/%s" % (self._buildbot.buildbot_url, self.url_encoded_name())
    7071
    7172    def url_encoded_name(self):
     
    7374
    7475    def url(self):
    75         return "http://%s/builders/%s" % (self._buildbot.buildbot_host, self.url_encoded_name())
     76        return "%s/builders/%s" % (self._buildbot.buildbot_url, self.url_encoded_name())
    7677
    7778    # This provides a single place to mock
     
    280281
    281282class BuildBot(object):
    282     # FIXME: This should move into common.config.urls.
    283     default_host = "build.webkit.org"
    284 
    285     def __init__(self, host=default_host):
    286         self.buildbot_host = host
     283    def __init__(self, url=config_urls.buildbot_url):
     284        self.buildbot_url = url
    287285        self._builder_by_name = {}
    288286
     
    386384        # FIXME: The bot sends a *huge* amount of data for each request, we should
    387385        # find a way to reduce the response size further.
    388         json_url = "http://%s/json/builders/%s/builds/%s?filter=1" % (self.buildbot_host, urllib.quote(builder.name()), build_number)
     386        json_url = "%s/json/builders/%s/builds/%s?filter=1" % (self.buildbot_url, urllib.quote(builder.name()), build_number)
    389387        try:
    390388            return json.load(urllib2.urlopen(json_url))
     
    399397
    400398    def _fetch_one_box_per_builder(self):
    401         build_status_url = "http://%s/one_box_per_builder" % self.buildbot_host
     399        build_status_url = "%s/one_box_per_builder" % self.buildbot_url
    402400        return urllib2.urlopen(build_status_url)
    403401
  • trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py

    r90052 r90513  
    118118
    119119    def test_land_red_builders(self):
    120         expected_stderr = '\nWARNING: Builders ["Builder2"] are red, please watch your commit carefully.\nSee http://dummy_buildbot_host/console?category=core\n\nBuilding WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning Bindings tests\nRunning JavaScriptCore tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 42\n'
     120        expected_stderr = '\nWARNING: Builders ["Builder2"] are red, please watch your commit carefully.\nSee http://build.webkit.org/console?category=core\n\nBuilding WebKit\nRunning Python unit tests\nRunning Perl unit tests\nRunning Bindings tests\nRunning JavaScriptCore tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 42\n'
    121121        mock_tool = MockTool()
    122122        mock_tool.buildbot.light_tree_on_fire()
  • trunk/Tools/Scripts/webkitpy/tool/commands/queries.py

    r90472 r90513  
    3535from webkitpy.common.checkout.commitinfo import CommitInfo
    3636from webkitpy.common.config.committers import CommitterList
     37import webkitpy.common.config.urls as config_urls
    3738from webkitpy.common.net.buildbot import BuildBot
    3839from webkitpy.common.net.regressionwindow import RegressionWindow
     
    136137class WhatBroke(AbstractDeclarativeCommand):
    137138    name = "what-broke"
    138     help_text = "Print failing buildbots (%s) and what revisions broke them" % BuildBot.default_host
     139    help_text = "Print failing buildbots (%s) and what revisions broke them" % config_urls.buildbot_url
    139140
    140141    def _print_builder_line(self, builder_name, max_name_width, status_message):
     
    182183class ResultsFor(AbstractDeclarativeCommand):
    183184    name = "results-for"
    184     help_text = "Print a list of failures for the passed revision from bots on %s" % BuildBot.default_host
     185    help_text = "Print a list of failures for the passed revision from bots on %s" % config_urls.buildbot_url
    185186    argument_names = "REVISION"
    186187
     
    204205class FailureReason(AbstractDeclarativeCommand):
    205206    name = "failure-reason"
    206     help_text = "Lists revisions where individual test failures started at %s" % BuildBot.default_host
     207    help_text = "Lists revisions where individual test failures started at %s" % config_urls.buildbot_url
    207208
    208209    def _blame_line_for_revision(self, revision):
     
    290291class FindFlakyTests(AbstractDeclarativeCommand):
    291292    name = "find-flaky-tests"
    292     help_text = "Lists tests that often fail for a single build at %s" % BuildBot.default_host
     293    help_text = "Lists tests that often fail for a single build at %s" % config_urls.buildbot_url
    293294
    294295    def _find_failures(self, builder, revision):
     
    359360class TreeStatus(AbstractDeclarativeCommand):
    360361    name = "tree-status"
    361     help_text = "Print the status of the %s buildbots" % BuildBot.default_host
     362    help_text = "Print the status of the %s buildbots" % config_urls.buildbot_url
    362363    long_help = """Fetches build status from http://build.webkit.org/one_box_per_builder
    363364and displayes the status of each builder."""
  • trunk/Tools/Scripts/webkitpy/tool/mocktool.py

    r87107 r90513  
    418418
    419419class MockBuildBot(object):
    420     buildbot_host = "dummy_buildbot_host"
    421420    def __init__(self):
    422421        self._mock_builder1_status = {
  • trunk/Tools/Scripts/webkitpy/tool/steps/ensurebuildersaregreen.py

    r66058 r90513  
    2929from webkitpy.tool.steps.abstractstep import AbstractStep
    3030from webkitpy.tool.steps.options import Options
     31import webkitpy.common.config.urls as config_urls
    3132from webkitpy.common.system.deprecated_logging import log, error
    3233
     
    4647            return
    4748        red_builders_names = map(lambda name: "\"%s\"" % name, red_builders_names) # Add quotes around the names.
    48         log("\nWARNING: Builders [%s] are red, please watch your commit carefully.\nSee http://%s/console?category=core\n" % (", ".join(red_builders_names), self._tool.buildbot.buildbot_host))
     49        log("\nWARNING: Builders [%s] are red, please watch your commit carefully.\nSee %s/console?category=core\n" % (", ".join(red_builders_names), config_urls.buildbot_url))
Note: See TracChangeset for help on using the changeset viewer.