Changeset 56225 in webkit


Ignore:
Timestamp:
Mar 19, 2010 12:37:35 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-19 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Simplify BuildBot core builder code for easier re-use
https://bugs.webkit.org/show_bug.cgi?id=36350

I simply couldn't see anything through all this Yak-hair.

  • Scripts/webkitpy/buildbot.py:
  • Scripts/webkitpy/commands/queries.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56224 r56225  
     12010-03-19  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Simplify BuildBot core builder code for easier re-use
     6        https://bugs.webkit.org/show_bug.cgi?id=36350
     7
     8        I simply couldn't see anything through all this Yak-hair.
     9
     10        * Scripts/webkitpy/buildbot.py:
     11        * Scripts/webkitpy/commands/queries.py:
     12
    1132010-03-19  Adam Barth  <abarth@webkit.org>
    214
  • trunk/WebKitTools/Scripts/webkitpy/buildbot.py

    r56220 r56225  
    172172        return builder
    173173
    174     def _builder_statuses_with_names_matching_regexps(self,
    175                                                       builder_statuses,
    176                                                       name_regexps):
    177         builders = []
    178         for builder in builder_statuses:
    179             for name_regexp in name_regexps:
    180                 if re.match(name_regexp, builder['name']):
    181                     builders.append(builder)
    182         return builders
     174    def _matches_regexps(self, builder_name, name_regexps):
     175        for name_regexp in name_regexps:
     176            if re.match(name_regexp, builder_name):
     177                return True
     178        return False
     179
     180    # FIXME: Should move onto Builder
     181    def _is_core_builder(self, builder_name):
     182        return self._matches_regexps(builder_name, self.core_builder_names_regexps)
     183
     184    # FIXME: This method needs to die, but is used by a unit test at the moment.
     185    def _builder_statuses_with_names_matching_regexps(self, builder_statuses, name_regexps):
     186        return [builder for builder in builder_statuses if self._matches_regexps(builder["name"], name_regexps)]
    183187
    184188    def red_core_builders(self):
    185         red_builders = []
    186         for builder in self._builder_statuses_with_names_matching_regexps(
    187                                self.builder_statuses(),
    188                                self.core_builder_names_regexps):
    189             if not builder['is_green']:
    190                 red_builders.append(builder)
    191         return red_builders
     189        return [builder for builder in self.builder_statuses() if not builder["is_green"] and self._is_core_builder(builder["name"])]
    192190
    193191    def red_core_builders_names(self):
  • trunk/WebKitTools/Scripts/webkitpy/commands/queries.py

    r56220 r56225  
    143143            self._print_blame_information_for_commit(commit_info)
    144144
     145    def revisions_causing_failures(self, only_core_builders=True):
     146        builder_statuses = tool.buildbot.builder_statuses()
     147
    145148    def execute(self, options, args, tool):
    146149        builder_statuses = tool.buildbot.builder_statuses()
Note: See TracChangeset for help on using the changeset viewer.