OLD | NEW |
1 # Copyright (c) 2010 Google Inc. All rights reserved. | 1 # Copyright (c) 2010 Google Inc. All rights reserved. |
2 # Copyright (c) 2009 Apple Inc. All rights reserved. | 2 # Copyright (c) 2009 Apple Inc. All rights reserved. |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 16 matching lines...) Expand all Loading... |
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 | 29 |
30 import logging | 30 import logging |
31 import os | 31 import os |
32 import sys | 32 import sys |
33 | 33 |
34 from webkitpy.common.checkout.scm.detection import SCMDetector | 34 from webkitpy.common.checkout.scm.detection import SCMDetector |
35 from webkitpy.common.memoized import memoized | 35 from webkitpy.common.memoized import memoized |
36 from webkitpy.common.net import buildbot, web | 36 from webkitpy.common.net import buildbot, web |
37 from webkitpy.common.net.buildbot.chromiumbuildbot import ChromiumBuildBot | |
38 from webkitpy.common.system.systemhost import SystemHost | 37 from webkitpy.common.system.systemhost import SystemHost |
39 from webkitpy.layout_tests.port.factory import PortFactory | 38 from webkitpy.layout_tests.port.factory import PortFactory |
40 | 39 |
41 | 40 |
42 _log = logging.getLogger(__name__) | 41 _log = logging.getLogger(__name__) |
43 | 42 |
44 | 43 |
45 class Host(SystemHost): | 44 class Host(SystemHost): |
46 def __init__(self): | 45 def __init__(self): |
47 SystemHost.__init__(self) | 46 SystemHost.__init__(self) |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 127 |
129 def scm(self): | 128 def scm(self): |
130 return self._scm | 129 return self._scm |
131 | 130 |
132 def scm_for_path(self, path): | 131 def scm_for_path(self, path): |
133 # FIXME: make scm() be a wrapper around this, and clean up the way | 132 # FIXME: make scm() be a wrapper around this, and clean up the way |
134 # callers call initialize_scm() (to remove patch_directories) and scm(). | 133 # callers call initialize_scm() (to remove patch_directories) and scm(). |
135 if sys.platform == "win32": | 134 if sys.platform == "win32": |
136 self._engage_awesome_windows_hacks() | 135 self._engage_awesome_windows_hacks() |
137 return SCMDetector(self.filesystem, self.executive).detect_scm_system(pa
th) | 136 return SCMDetector(self.filesystem, self.executive).detect_scm_system(pa
th) |
138 | |
139 def buildbot_for_builder_name(self, name): | |
140 if self.port_factory.get_from_builder_name(name).is_chromium(): | |
141 return self.chromium_buildbot() | |
142 return self.buildbot | |
143 | |
144 @memoized | |
145 def chromium_buildbot(self): | |
146 return ChromiumBuildBot() | |
OLD | NEW |