mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
wpt: Handle wpt version number changes when updating the manifest.
This commit is contained in:
parent
5c8ede4b05
commit
9f746b33a8
1 changed files with 7 additions and 3 deletions
|
@ -54,10 +54,14 @@ def update(logger, wpt_dir, check_clean=True, rebuild=False):
|
||||||
def _update(logger, test_paths, rebuild):
|
def _update(logger, test_paths, rebuild):
|
||||||
for url_base, paths in test_paths.iteritems():
|
for url_base, paths in test_paths.iteritems():
|
||||||
manifest_path = os.path.join(paths["metadata_path"], "MANIFEST.json")
|
manifest_path = os.path.join(paths["metadata_path"], "MANIFEST.json")
|
||||||
if rebuild:
|
m = None
|
||||||
|
if not rebuild:
|
||||||
|
try:
|
||||||
|
m = manifest.manifest.load(paths["tests_path"], manifest_path)
|
||||||
|
except manifest.manifest.ManifestVersionMismatch:
|
||||||
|
logger.info("Manifest format changed, rebuilding")
|
||||||
|
if m is None:
|
||||||
m = manifest.manifest.Manifest(url_base)
|
m = manifest.manifest.Manifest(url_base)
|
||||||
else:
|
|
||||||
m = manifest.manifest.load(paths["tests_path"], manifest_path)
|
|
||||||
manifest.update.update(paths["tests_path"], m, working_copy=True)
|
manifest.update.update(paths["tests_path"], m, working_copy=True)
|
||||||
manifest.manifest.write(m, manifest_path)
|
manifest.manifest.write(m, manifest_path)
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue