diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-25 13:35:59 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-25 13:35:59 +0200 |
commit | 79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4 (patch) | |
tree | 0287b1a69d84492c901e8bc820e635e7133809a0 /Tools/Scripts/webkitpy/common/host_mock.py | |
parent | 682ab87480e7757346802ce7f54cfdbdfeb2339e (diff) | |
download | qtwebkit-79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4.tar.gz |
Imported WebKit commit c4b613825abd39ac739a47d7b4410468fcef66dc (http://svn.webkit.org/repository/webkit/trunk@121147)
New snapshot that includes Win32 debug build fix (use SVGAllInOne)
Diffstat (limited to 'Tools/Scripts/webkitpy/common/host_mock.py')
-rw-r--r-- | Tools/Scripts/webkitpy/common/host_mock.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Tools/Scripts/webkitpy/common/host_mock.py b/Tools/Scripts/webkitpy/common/host_mock.py index 55df3e9a2..ca4f78eb3 100644 --- a/Tools/Scripts/webkitpy/common/host_mock.py +++ b/Tools/Scripts/webkitpy/common/host_mock.py @@ -40,17 +40,17 @@ from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem class MockHost(MockSystemHost): - def __init__(self, log_executive=False, executive_throws_when_run=None): + def __init__(self, log_executive=False, executive_throws_when_run=None, initialize_scm_by_default=True): MockSystemHost.__init__(self, log_executive, executive_throws_when_run) add_unit_tests_to_mock_filesystem(self.filesystem) self.web = MockWeb() self._checkout = MockCheckout() - self._scm = MockSCM(filesystem=self.filesystem, executive=self.executive) - # Various pieces of code (wrongly) call filesystem.chdir(checkout_root). - # Making the checkout_root exist in the mock filesystem makes that chdir not raise. - self.filesystem.maybe_make_directory(self._scm.checkout_root) - + self._scm = None + # FIXME: we should never initialize the SCM by default, since the real + # object doesn't either. This has caused at least one bug (see bug 89498). + if initialize_scm_by_default: + self._initialize_scm() self.bugs = MockBugzilla() self.buildbot = MockBuildBot() self._chromium_buildbot = MockBuildBot() @@ -62,7 +62,10 @@ class MockHost(MockSystemHost): self._watch_list = MockWatchList() def _initialize_scm(self, patch_directories=None): - pass + self._scm = MockSCM(filesystem=self.filesystem, executive=self.executive) + # Various pieces of code (wrongly) call filesystem.chdir(checkout_root). + # Making the checkout_root exist in the mock filesystem makes that chdir not raise. + self.filesystem.maybe_make_directory(self._scm.checkout_root) def scm(self): return self._scm |