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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest.py

Issue 2722243005: Ensure manifest exists in Port._wpt_manifest. (Closed)
Patch Set: Call ensure manifest in rebaseline-cl 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/w3c/wpt_manifest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest.py
index 1a35ac83fa97ec7d2346500b107f6c4d3eaf2430..ff48742db4876915015eef94c1a4124093a77a0b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_manifest.py
@@ -88,6 +88,24 @@ class WPTManifest(object):
return reftest_list
@staticmethod
+ def ensure_manifest(host):
+ """Checks whether the manifest exists, and then generates it if necessary."""
+ finder = WebKitFinder(host.filesystem)
+ manifest_path = finder.path_from_webkit_base('LayoutTests', 'external', 'wpt', 'MANIFEST.json')
+ base_manifest_path = finder.path_from_webkit_base('LayoutTests', 'external', 'WPT_BASE_MANIFEST.json')
+
+ if not host.filesystem.exists(base_manifest_path):
+ _log.error('Manifest base not found at "%s".', base_manifest_path)
+ host.filesystem.write_text_file(base_manifest_path, '{}')
+
+ if not host.filesystem.exists(manifest_path):
+ _log.debug('Manifest not found, copying from base "%s".', base_manifest_path)
+ host.filesystem.copyfile(base_manifest_path, manifest_path)
+
+ wpt_path = manifest_path = finder.path_from_webkit_base('LayoutTests', 'external', 'wpt')
+ WPTManifest.generate_manifest(host, wpt_path)
+
+ @staticmethod
def generate_manifest(host, dest_path):
"""Generates MANIFEST.json on the specified directory."""
executive = host.executive
@@ -99,7 +117,7 @@ class WPTManifest(object):
proc = executive.popen(cmd, stdout=executive.PIPE, stderr=executive.PIPE, stdin=executive.PIPE, cwd=finder.webkit_base())
out, err = proc.communicate('')
if proc.returncode:
- _log.info('# ret> %d' % proc.returncode)
+ _log.info('# ret> %d', proc.returncode)
if out:
_log.info(out)
if err:

Powered by Google App Engine
This is Rietveld 408576698