Changeset 53734 in webkit
- Timestamp:
- Jan 22, 2010 4:21:53 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r53733 r53734 1 2010-01-22 Adam Barth <abarth@webkit.org> 2 3 Rubber stamped by Eric Seidel. 4 5 Make __init__.py and buildbot.py pass pep8 style checker. 6 7 * Scripts/webkitpy/__init__.py: 8 * Scripts/webkitpy/buildbot.py: 9 1 10 2010-01-21 Joe Mason <jmason@rim.com> 2 11 -
trunk/WebKitTools/Scripts/webkitpy/__init__.py
r52723 r53734 3 3 import autoinstall 4 4 5 # List our third-party library dependencies here and where they can be downloaded. 5 # List our third-party library dependencies here and where they can be 6 # downloaded. 6 7 autoinstall.bind("ClientForm", "http://pypi.python.org/packages/source/C/ClientForm/ClientForm-0.2.10.zip", "ClientForm-0.2.10") 7 8 autoinstall.bind("mechanize", "http://pypi.python.org/packages/source/m/mechanize/mechanize-0.1.11.zip", "mechanize-0.1.11") -
trunk/WebKitTools/Scripts/webkitpy/buildbot.py
r52908 r53734 1 1 # Copyright (c) 2009, Google Inc. All rights reserved. 2 # 2 # 3 3 # Redistribution and use in source and binary forms, with or without 4 4 # modification, are permitted provided that the following conditions are 5 5 # met: 6 # 6 # 7 7 # * Redistributions of source code must retain the above copyright 8 8 # notice, this list of conditions and the following disclaimer. … … 14 14 # contributors may be used to endorse or promote products derived from 15 15 # this software without specific prior written permission. 16 # 16 # 17 17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT … … 39 39 from .BeautifulSoup import BeautifulSoup 40 40 41 41 42 class BuildBot: 43 42 44 default_host = "build.webkit.org" 45 43 46 def __init__(self, host=default_host): 44 47 self.buildbot_host = host 45 48 self.buildbot_server_url = "http://%s/" % self.buildbot_host 46 47 # If any Leopard builder/tester, Windows builder or Chromium builder is red we should not be landing patches. 48 # Other builders should be added to this list once they are known to be reliable. 49 50 # If any Leopard builder/tester, Windows builder or Chromium builder is 51 # red we should not be landing patches. Other builders should be added 52 # to this list once they are known to be reliable. 49 53 # See https://bugs.webkit.org/show_bug.cgi?id=33296 and related bugs. 50 self.core_builder_names_regexps = [ "Leopard", "Windows.*Build", "Chromium" ] 54 self.core_builder_names_regexps = [ 55 "Leopard", 56 "Windows.*Build", 57 "Chromium", 58 ] 51 59 52 # If WebKit's buildbot has an XMLRPC interface we could use, we could do something more sophisticated here.53 # For now we just parse out the basics, enough to support basic questions like "is the tree green?"54 60 def _parse_builder_status_from_row(self, status_row): 61 # If WebKit's buildbot has an XMLRPC interface we could use, we could 62 # do something more sophisticated here. For now we just parse out the 63 # basics, enough to support basic questions like "is the tree green?" 55 64 status_cells = status_row.findAll('td') 56 65 builder = {} … … 58 67 name_link = status_cells[0].find('a') 59 68 builder['name'] = name_link.string 60 # We could generate the builder_url from the name in a future version of this code. 69 # We could generate the builder_url from the name in a future version 70 # of this code. 61 71 builder['builder_url'] = self.buildbot_server_url + name_link['href'] 62 72 63 73 status_link = status_cells[1].find('a') 64 74 if not status_link: 65 # We failed to find a link in the first cell, just give up. 66 # This can happen if a builder is just-added, the first cell will just be "no build" 67 builder['is_green'] = False # Other parts of the code depend on is_green being present. 75 # We failed to find a link in the first cell, just give up. This 76 # can happen if a builder is just-added, the first cell will just 77 # be "no build" 78 # Other parts of the code depend on is_green being present. 79 builder['is_green'] = False 68 80 return builder 69 revision_string = status_link.string # Will be either a revision number or a build number 81 # Will be either a revision number or a build number 82 revision_string = status_link.string 70 83 # If revision_string has non-digits assume it's not a revision number. 71 builder['built_revision'] = int(revision_string) if not re.match('\D', revision_string) else None 72 builder['is_green'] = not re.search('fail', status_cells[1].renderContents()) 73 # We could parse out the build number instead, but for now just store the URL. 84 builder['built_revision'] = int(revision_string) \ 85 if not re.match('\D', revision_string) \ 86 else None 87 builder['is_green'] = not re.search('fail', 88 status_cells[1].renderContents()) 89 # We could parse out the build number instead, but for now just store 90 # the URL. 74 91 builder['build_url'] = self.buildbot_server_url + status_link['href'] 75 92 … … 78 95 return builder 79 96 80 def _builder_statuses_with_names_matching_regexps(self, builder_statuses, name_regexps): 97 def _builder_statuses_with_names_matching_regexps(self, 98 builder_statuses, 99 name_regexps): 81 100 builders = [] 82 101 for builder in builder_statuses: … … 88 107 def red_core_builders(self): 89 108 red_builders = [] 90 for builder in self._builder_statuses_with_names_matching_regexps(self.builder_statuses(), self.core_builder_names_regexps): 109 for builder in self._builder_statuses_with_names_matching_regexps( 110 self.builder_statuses(), 111 self.core_builder_names_regexps): 91 112 if not builder['is_green']: 92 113 red_builders.append(builder)
Note: See TracChangeset
for help on using the changeset viewer.