| OLD | NEW |
| 1 # Copyright (c) 2009, Google Inc. All rights reserved. | 1 # Copyright (c) 2009, Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 import re | 31 import re |
| 32 import urllib | 32 import urllib |
| 33 import urllib2 | 33 import urllib2 |
| 34 | 34 |
| 35 import webkitpy.common.config.urls as config_urls | 35 import webkitpy.common.config.urls as config_urls |
| 36 from webkitpy.common.memoized import memoized | 36 from webkitpy.common.memoized import memoized |
| 37 from webkitpy.common.net.layouttestresults import LayoutTestResults | 37 from webkitpy.common.net.layouttestresults import LayoutTestResults |
| 38 from webkitpy.common.net.networktransaction import NetworkTransaction | 38 from webkitpy.common.net.networktransaction import NetworkTransaction |
| 39 from webkitpy.common.system.logutils import get_logger | 39 from webkitpy.common.system.logutils import get_logger |
| 40 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup | 40 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup |
| 41 from webkitpy.thirdparty.mechanize import Browser |
| 41 | 42 |
| 42 | 43 |
| 43 _log = get_logger(__file__) | 44 _log = get_logger(__file__) |
| 44 | 45 |
| 45 | 46 |
| 46 class Builder(object): | 47 class Builder(object): |
| 47 def __init__(self, name, buildbot): | 48 def __init__(self, name, buildbot): |
| 48 self._name = name | 49 self._name = name |
| 49 self._buildbot = buildbot | 50 self._buildbot = buildbot |
| 50 self._builds_cache = {} | 51 self._builds_cache = {} |
| 51 self._revision_to_build_number = None | 52 self._revision_to_build_number = None |
| 52 from webkitpy.thirdparty.autoinstalled.mechanize import Browser | |
| 53 self._browser = Browser() | 53 self._browser = Browser() |
| 54 self._browser.set_handle_robots(False) # The builder pages are excluded
by robots.txt | 54 self._browser.set_handle_robots(False) # The builder pages are excluded
by robots.txt |
| 55 | 55 |
| 56 def name(self): | 56 def name(self): |
| 57 return self._name | 57 return self._name |
| 58 | 58 |
| 59 def results_url(self): | 59 def results_url(self): |
| 60 return "%s/results/%s" % (self._buildbot.buildbot_url, self.url_encoded_
name()) | 60 return "%s/results/%s" % (self._buildbot.buildbot_url, self.url_encoded_
name()) |
| 61 | 61 |
| 62 # In addition to per-build results, the build.chromium.org builders also | 62 # In addition to per-build results, the build.chromium.org builders also |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 | 414 |
| 415 builders_succeeded_in_past = set() | 415 builders_succeeded_in_past = set() |
| 416 for past_revision in revisions_in_order[i:]: | 416 for past_revision in revisions_in_order[i:]: |
| 417 if not revision_statuses[past_revision]: | 417 if not revision_statuses[past_revision]: |
| 418 break | 418 break |
| 419 builders_succeeded_in_past = builders_succeeded_in_past.union(re
vision_statuses[past_revision]) | 419 builders_succeeded_in_past = builders_succeeded_in_past.union(re
vision_statuses[past_revision]) |
| 420 | 420 |
| 421 if len(builders_succeeded_in_future) == len(builder_revisions) and l
en(builders_succeeded_in_past) == len(builder_revisions): | 421 if len(builders_succeeded_in_future) == len(builder_revisions) and l
en(builders_succeeded_in_past) == len(builder_revisions): |
| 422 return revision | 422 return revision |
| 423 return None | 423 return None |
| OLD | NEW |