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 import Checkout | 34 from webkitpy.common.checkout import Checkout |
35 from webkitpy.common.checkout.scm.detection import SCMDetector | 35 from webkitpy.common.checkout.scm.detection import SCMDetector |
36 from webkitpy.common.memoized import memoized | 36 from webkitpy.common.memoized import memoized |
37 from webkitpy.common.net import bugzilla, buildbot, web | 37 from webkitpy.common.net import buildbot, web |
38 from webkitpy.common.net.buildbot.chromiumbuildbot import ChromiumBuildBot | 38 from webkitpy.common.net.buildbot.chromiumbuildbot import ChromiumBuildBot |
39 from webkitpy.common.system.systemhost import SystemHost | 39 from webkitpy.common.system.systemhost import SystemHost |
40 from webkitpy.common.watchlist.watchlistloader import WatchListLoader | |
41 from webkitpy.layout_tests.port.factory import PortFactory | 40 from webkitpy.layout_tests.port.factory import PortFactory |
42 | 41 |
43 | 42 |
44 _log = logging.getLogger(__name__) | 43 _log = logging.getLogger(__name__) |
45 | 44 |
46 | 45 |
47 class Host(SystemHost): | 46 class Host(SystemHost): |
48 def __init__(self): | 47 def __init__(self): |
49 SystemHost.__init__(self) | 48 SystemHost.__init__(self) |
50 self.web = web.Web() | 49 self.web = web.Web() |
51 | 50 |
52 # FIXME: Checkout should own the scm object. | 51 # FIXME: Checkout should own the scm object. |
53 self._scm = None | 52 self._scm = None |
54 self._checkout = None | 53 self._checkout = None |
55 | 54 |
56 # Everything below this line is WebKit-specific and belongs on a higher-
level object. | 55 # Everything below this line is WebKit-specific and belongs on a higher-
level object. |
57 self.bugs = bugzilla.Bugzilla() | |
58 self.buildbot = buildbot.BuildBot() | 56 self.buildbot = buildbot.BuildBot() |
59 | 57 |
60 # FIXME: Unfortunately Port objects are currently the central-dispatch o
bjects of the NRWT world. | 58 # FIXME: Unfortunately Port objects are currently the central-dispatch o
bjects of the NRWT world. |
61 # In order to instantiate a port correctly, we have to pass it at least
an executive, user, scm, and filesystem | 59 # In order to instantiate a port correctly, we have to pass it at least
an executive, user, scm, and filesystem |
62 # so for now we just pass along the whole Host object. | 60 # so for now we just pass along the whole Host object. |
63 # FIXME: PortFactory doesn't belong on this Host object if Port is going
to have a Host (circular dependency). | 61 # FIXME: PortFactory doesn't belong on this Host object if Port is going
to have a Host (circular dependency). |
64 self.port_factory = PortFactory(self) | 62 self.port_factory = PortFactory(self) |
65 | 63 |
66 self._engage_awesome_locale_hacks() | 64 self._engage_awesome_locale_hacks() |
67 | 65 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 return self._checkout | 137 return self._checkout |
140 | 138 |
141 def buildbot_for_builder_name(self, name): | 139 def buildbot_for_builder_name(self, name): |
142 if self.port_factory.get_from_builder_name(name).is_chromium(): | 140 if self.port_factory.get_from_builder_name(name).is_chromium(): |
143 return self.chromium_buildbot() | 141 return self.chromium_buildbot() |
144 return self.buildbot | 142 return self.buildbot |
145 | 143 |
146 @memoized | 144 @memoized |
147 def chromium_buildbot(self): | 145 def chromium_buildbot(self): |
148 return ChromiumBuildBot() | 146 return ChromiumBuildBot() |
149 | |
150 @memoized | |
151 def watch_list(self): | |
152 return WatchListLoader(self.filesystem).load() | |
OLD | NEW |