Title: [90513] trunk/Tools
Revision
90513
Author
[email protected]
Date
2011-07-06 16:34:21 -0700 (Wed, 06 Jul 2011)

Log Message

2011-07-06  Adam Barth  <[email protected]>

        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:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (90512 => 90513)


--- trunk/Tools/ChangeLog	2011-07-06 23:25:47 UTC (rev 90512)
+++ trunk/Tools/ChangeLog	2011-07-06 23:34:21 UTC (rev 90513)
@@ -1,3 +1,20 @@
+2011-07-06  Adam Barth  <[email protected]>
+
+        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:
+
 2011-07-06  Kevin Ollivier  <[email protected]>
 
         [wx] Unreviewed build fix, add the correct path to the waf build settings.

Modified: trunk/Tools/Scripts/webkitpy/common/config/urls.py (90512 => 90513)


--- trunk/Tools/Scripts/webkitpy/common/config/urls.py	2011-07-06 23:25:47 UTC (rev 90512)
+++ trunk/Tools/Scripts/webkitpy/common/config/urls.py	2011-07-06 23:34:21 UTC (rev 90513)
@@ -48,3 +48,6 @@
 bug_server_url = "https://%s/" % bug_server_host
 bug_url_long = _bug_server_regex + r"show_bug\.cgi\?id=(?P<bug_id>\d+)(&ctype=xml)?"
 bug_url_short = r"https?\://webkit\.org/b/(?P<bug_id>\d+)"
+
+buildbot_url = "http://build.webkit.org"
+chromium_buildbot_url = "http://build.chromium.org/p/chromium.webkit"

Modified: trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py (90512 => 90513)


--- trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py	2011-07-06 23:25:47 UTC (rev 90512)
+++ trunk/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py	2011-07-06 23:34:21 UTC (rev 90513)
@@ -39,6 +39,7 @@
 import urllib
 import urllib2
 
+import webkitpy.common.config.urls as config_urls
 from webkitpy.common.net.failuremap import FailureMap
 from webkitpy.common.net.layouttestresults import LayoutTestResults
 from webkitpy.common.net.networktransaction import NetworkTransaction
@@ -66,13 +67,13 @@
         return self._name
 
     def results_url(self):
-        return "http://%s/results/%s" % (self._buildbot.buildbot_host, self.url_encoded_name())
+        return "%s/results/%s" % (self._buildbot.buildbot_url, self.url_encoded_name())
 
     def url_encoded_name(self):
         return urllib.quote(self._name)
 
     def url(self):
-        return "http://%s/builders/%s" % (self._buildbot.buildbot_host, self.url_encoded_name())
+        return "%s/builders/%s" % (self._buildbot.buildbot_url, self.url_encoded_name())
 
     # This provides a single place to mock
     def _fetch_build(self, build_number):
@@ -279,11 +280,8 @@
 
 
 class BuildBot(object):
-    # FIXME: This should move into common.config.urls.
-    default_host = "build.webkit.org"
-
-    def __init__(self, host=default_host):
-        self.buildbot_host = host
+    def __init__(self, url=""
+        self.buildbot_url = url
         self._builder_by_name = {}
 
         # If any core builder is red we should not be landing patches.  Other
@@ -385,7 +383,7 @@
         # cause keys to be missing which you might otherwise expect.
         # FIXME: The bot sends a *huge* amount of data for each request, we should
         # find a way to reduce the response size further.
-        json_url = "http://%s/json/builders/%s/builds/%s?filter=1" % (self.buildbot_host, urllib.quote(builder.name()), build_number)
+        json_url = "%s/json/builders/%s/builds/%s?filter=1" % (self.buildbot_url, urllib.quote(builder.name()), build_number)
         try:
             return json.load(urllib2.urlopen(json_url))
         except urllib2.URLError, err:
@@ -398,7 +396,7 @@
             return None
 
     def _fetch_one_box_per_builder(self):
-        build_status_url = "http://%s/one_box_per_builder" % self.buildbot_host
+        build_status_url = "%s/one_box_per_builder" % self.buildbot_url
         return urllib2.urlopen(build_status_url)
 
     def _file_cell_text(self, file_cell):

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py (90512 => 90513)


--- trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py	2011-07-06 23:25:47 UTC (rev 90512)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py	2011-07-06 23:34:21 UTC (rev 90513)
@@ -117,7 +117,7 @@
         self.assertEqual(mock_tool.checkout().modified_changelogs.call_count, 1)
 
     def test_land_red_builders(self):
-        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 _javascript_Core tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 42\n'
+        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 _javascript_Core tests\nRunning run-webkit-tests\nCommitted r49824: <http://trac.webkit.org/changeset/49824>\nUpdating bug 42\n'
         mock_tool = MockTool()
         mock_tool.buildbot.light_tree_on_fire()
         self.assert_execute_outputs(Land(), [42], options=self._default_options(), expected_stderr=expected_stderr, tool=mock_tool)

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/queries.py (90512 => 90513)


--- trunk/Tools/Scripts/webkitpy/tool/commands/queries.py	2011-07-06 23:25:47 UTC (rev 90512)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/queries.py	2011-07-06 23:34:21 UTC (rev 90513)
@@ -34,6 +34,7 @@
 
 from webkitpy.common.checkout.commitinfo import CommitInfo
 from webkitpy.common.config.committers import CommitterList
+import webkitpy.common.config.urls as config_urls
 from webkitpy.common.net.buildbot import BuildBot
 from webkitpy.common.net.regressionwindow import RegressionWindow
 from webkitpy.common.system.crashlogs import CrashLogs
@@ -135,7 +136,7 @@
 
 class WhatBroke(AbstractDeclarativeCommand):
     name = "what-broke"
-    help_text = "Print failing buildbots (%s) and what revisions broke them" % BuildBot.default_host
+    help_text = "Print failing buildbots (%s) and what revisions broke them" % config_urls.buildbot_url
 
     def _print_builder_line(self, builder_name, max_name_width, status_message):
         print "%s : %s" % (builder_name.ljust(max_name_width), status_message)
@@ -181,7 +182,7 @@
 
 class ResultsFor(AbstractDeclarativeCommand):
     name = "results-for"
-    help_text = "Print a list of failures for the passed revision from bots on %s" % BuildBot.default_host
+    help_text = "Print a list of failures for the passed revision from bots on %s" % config_urls.buildbot_url
     argument_names = "REVISION"
 
     def _print_layout_test_results(self, results):
@@ -203,7 +204,7 @@
 
 class FailureReason(AbstractDeclarativeCommand):
     name = "failure-reason"
-    help_text = "Lists revisions where individual test failures started at %s" % BuildBot.default_host
+    help_text = "Lists revisions where individual test failures started at %s" % config_urls.buildbot_url
 
     def _blame_line_for_revision(self, revision):
         try:
@@ -289,7 +290,7 @@
 
 class FindFlakyTests(AbstractDeclarativeCommand):
     name = "find-flaky-tests"
-    help_text = "Lists tests that often fail for a single build at %s" % BuildBot.default_host
+    help_text = "Lists tests that often fail for a single build at %s" % config_urls.buildbot_url
 
     def _find_failures(self, builder, revision):
         build = builder.build_for_revision(revision, allow_failed_lookups=True)
@@ -358,7 +359,7 @@
 
 class TreeStatus(AbstractDeclarativeCommand):
     name = "tree-status"
-    help_text = "Print the status of the %s buildbots" % BuildBot.default_host
+    help_text = "Print the status of the %s buildbots" % config_urls.buildbot_url
     long_help = """Fetches build status from http://build.webkit.org/one_box_per_builder
 and displayes the status of each builder."""
 

Modified: trunk/Tools/Scripts/webkitpy/tool/mocktool.py (90512 => 90513)


--- trunk/Tools/Scripts/webkitpy/tool/mocktool.py	2011-07-06 23:25:47 UTC (rev 90512)
+++ trunk/Tools/Scripts/webkitpy/tool/mocktool.py	2011-07-06 23:34:21 UTC (rev 90513)
@@ -417,7 +417,6 @@
 
 
 class MockBuildBot(object):
-    buildbot_host = "dummy_buildbot_host"
     def __init__(self):
         self._mock_builder1_status = {
             "name": "Builder1",

Modified: trunk/Tools/Scripts/webkitpy/tool/steps/ensurebuildersaregreen.py (90512 => 90513)


--- trunk/Tools/Scripts/webkitpy/tool/steps/ensurebuildersaregreen.py	2011-07-06 23:25:47 UTC (rev 90512)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/ensurebuildersaregreen.py	2011-07-06 23:34:21 UTC (rev 90513)
@@ -28,6 +28,7 @@
 
 from webkitpy.tool.steps.abstractstep import AbstractStep
 from webkitpy.tool.steps.options import Options
+import webkitpy.common.config.urls as config_urls
 from webkitpy.common.system.deprecated_logging import log, error
 
 
@@ -45,4 +46,4 @@
         if not red_builders_names:
             return
         red_builders_names = map(lambda name: "\"%s\"" % name, red_builders_names) # Add quotes around the names.
-        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))
+        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))
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to