mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
temp change to allow wpt sync build to pass
Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
1fa206945b
commit
bad72c7f87
2 changed files with 23 additions and 5 deletions
|
@ -50,11 +50,16 @@ def update(check_clean=True, rebuild=False, **kwargs):
|
||||||
|
|
||||||
|
|
||||||
def _update(logger, test_paths, rebuild):
|
def _update(logger, test_paths, rebuild):
|
||||||
|
def get_path(obj, path):
|
||||||
|
if isinstance(obj, dict):
|
||||||
|
return obj[path]
|
||||||
|
else:
|
||||||
|
return getattr(obj, path)
|
||||||
for url_base, paths in iteritems(test_paths):
|
for url_base, paths in iteritems(test_paths):
|
||||||
manifest_path = os.path.join(paths.metadata_path, "MANIFEST.json")
|
manifest_path = os.path.join(get_path(paths, 'metadata_path'), "MANIFEST.json")
|
||||||
cache_subdir = os.path.relpath(os.path.dirname(manifest_path),
|
cache_subdir = os.path.relpath(os.path.dirname(manifest_path),
|
||||||
os.path.dirname(__file__))
|
os.path.dirname(__file__))
|
||||||
wptmanifest.manifest.load_and_update(paths.tests_path,
|
wptmanifest.manifest.load_and_update(get_path(paths, 'tests_path'),
|
||||||
manifest_path,
|
manifest_path,
|
||||||
url_base,
|
url_base,
|
||||||
working_copy=True,
|
working_copy=True,
|
||||||
|
@ -68,8 +73,15 @@ def _check_clean(logger, test_paths):
|
||||||
manifests_by_path = {}
|
manifests_by_path = {}
|
||||||
rv = 0
|
rv = 0
|
||||||
for url_base, paths in iteritems(test_paths):
|
for url_base, paths in iteritems(test_paths):
|
||||||
tests_path = paths.tests_path
|
def get_path(obj, path):
|
||||||
manifest_path = os.path.join(paths.metadata_path, "MANIFEST.json")
|
if isinstance(obj, dict):
|
||||||
|
return obj[path]
|
||||||
|
else:
|
||||||
|
return getattr(obj, path)
|
||||||
|
|
||||||
|
tests_path = get_path(paths, "tests_path")
|
||||||
|
manifest_path = os.path.join(
|
||||||
|
get_path(paths, "metadata_path"), "MANIFEST.json")
|
||||||
|
|
||||||
old_manifest = wptmanifest.manifest.load_and_update(tests_path,
|
old_manifest = wptmanifest.manifest.load_and_update(tests_path,
|
||||||
manifest_path,
|
manifest_path,
|
||||||
|
|
|
@ -109,7 +109,13 @@ def update_tests(**kwargs) -> int:
|
||||||
|
|
||||||
wptcommandline.set_from_config(kwargs)
|
wptcommandline.set_from_config(kwargs)
|
||||||
if hasattr(wptcommandline, 'check_paths'):
|
if hasattr(wptcommandline, 'check_paths'):
|
||||||
wptcommandline.check_paths(kwargs["test_paths"])
|
# FIXME(mukilan): temporary hack since check_paths
|
||||||
|
# is used before and after we sync the wptrunner code
|
||||||
|
# with upstream and upstream has changed the argument
|
||||||
|
try:
|
||||||
|
wptcommandline.check_paths(kwargs)
|
||||||
|
except AttributeError:
|
||||||
|
wptcommandline.check_paths(kwargs["test_paths"])
|
||||||
|
|
||||||
if kwargs.pop("legacy_layout"):
|
if kwargs.pop("legacy_layout"):
|
||||||
update_args_for_legacy_layout(kwargs)
|
update_args_for_legacy_layout(kwargs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue