Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py

Issue 2644783003: Regenerate MANIFEST.json when WPT tests are run (Closed)
Patch Set: Regenerate MANIFEST.json from template in run-webkit-tests Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py
index dae0eb5fa8158513161b35414f63db10b83370c8..ca80562f56b6bd6215b57c8eba1efc5af4c4a9ca 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py
@@ -31,6 +31,7 @@ from webkitpy.common.checkout.git_mock import MockGit
from webkitpy.common.net.buildbot_mock import MockBuildBot
from webkitpy.common.net.web_mock import MockWeb
from webkitpy.common.system.system_host_mock import MockSystemHost
+from webkitpy.common.webkit_finder import WebKitFinder
# New-style ports need to move down into webkitpy.common.
from webkitpy.layout_tests.builder_list import BuilderList
@@ -54,6 +55,7 @@ class MockHost(MockSystemHost):
time_return_val=time_return_val)
add_unit_tests_to_mock_filesystem(self.filesystem)
+ self._add_base_manifest_to_mock_filesystem(self.filesystem)
self.web = web or MockWeb()
self._git = git
@@ -74,3 +76,12 @@ class MockHost(MockSystemHost):
# Making the checkout_root exist in the mock filesystem makes that chdir not raise.
self.filesystem.maybe_make_directory(self._git.checkout_root)
return self._git
+
+ def _add_base_manifest_to_mock_filesystem(self, filesystem):
+ webkit_finder = WebKitFinder(filesystem)
+ wpt_dir = webkit_finder.path_from_webkit_base('LayoutTests', 'external', 'wpt')
+ filesystem.maybe_make_directory(wpt_dir)
+
+ manifest_base_path = webkit_finder.path_from_webkit_base(
+ 'LayoutTests', 'external', 'WPT_BASE_MANIFEST.json')
foolip 2017/02/28 04:49:17 Had an idea while looking at this line. Would it b
qyearsley 2017/02/28 18:54:45 This sounds reasonable to me -- I'd be fine with t
+ filesystem.files[manifest_base_path] = '{}'

Powered by Google App Engine
This is Rietveld 408576698