OLD | NEW |
1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 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 12 matching lines...) Expand all Loading... |
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | 28 |
29 from webkitpy.common.config.builders import BUILDERS | 29 from webkitpy.common.config.builders import BUILDERS |
30 from webkitpy.common.checkout.scm.scm_mock import MockSCM | 30 from webkitpy.common.checkout.scm.scm_mock import MockSCM |
31 from webkitpy.common.net.buildbot_mock import MockBuildBot | 31 from webkitpy.common.net.buildbot_mock import MockBuildBot |
32 from webkitpy.common.net.web_mock import MockWeb | 32 from webkitpy.common.net.web_mock import MockWeb |
33 from webkitpy.common.system.systemhost_mock import MockSystemHost | 33 from webkitpy.common.system.system_host_mock import MockSystemHost |
34 | 34 |
35 # New-style ports need to move down into webkitpy.common. | 35 # New-style ports need to move down into webkitpy.common. |
36 from webkitpy.layout_tests.builder_list import BuilderList | 36 from webkitpy.layout_tests.builder_list import BuilderList |
37 from webkitpy.layout_tests.port.factory import PortFactory | 37 from webkitpy.layout_tests.port.factory import PortFactory |
38 from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem | 38 from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem |
39 | 39 |
40 | 40 |
41 class MockHost(MockSystemHost): | 41 class MockHost(MockSystemHost): |
42 | 42 |
43 def __init__(self, log_executive=False, executive_throws_when_run=None, | 43 def __init__(self, log_executive=False, executive_throws_when_run=None, |
(...skipping 26 matching lines...) Expand all Loading... |
70 # Making the checkout_root exist in the mock filesystem makes that chdir
not raise. | 70 # Making the checkout_root exist in the mock filesystem makes that chdir
not raise. |
71 self.filesystem.maybe_make_directory(self._scm.checkout_root) | 71 self.filesystem.maybe_make_directory(self._scm.checkout_root) |
72 | 72 |
73 def scm(self): | 73 def scm(self): |
74 return self._scm | 74 return self._scm |
75 | 75 |
76 def scm_for_path(self, path): | 76 def scm_for_path(self, path): |
77 # FIXME: consider supporting more than one SCM so that we can do more co
mprehensive testing. | 77 # FIXME: consider supporting more than one SCM so that we can do more co
mprehensive testing. |
78 self.initialize_scm() | 78 self.initialize_scm() |
79 return self._scm | 79 return self._scm |
OLD | NEW |