servo/python/wpt/update.py
Martin Robinson f4578afdfe
Rename metadata directories
This renames:
 - `tests/wpt/metadata` → `tests/wpt/meta-legacy-layout`
 - `tests/wpt/metadata-layout-2020` → `tests/wpt/meta`
 - `tests/wpt/mozilla/meta` → `tests/wpt/mozilla/meta-legacy-layout`
 - `tests/wpt/mozilla/meta-layout-2020` → `tests/wpt/mozilla/meta`
2023-06-22 21:15:41 +02:00

29 lines
824 B
Python

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# pylint: disable=missing-docstring
import os
from . import WPT_PATH, update_args_for_legacy_layout
from . import importer
def set_if_none(args: dict, key: str, value):
if key not in args or args[key] is None:
args[key] = value
def update_tests(**kwargs):
set_if_none(kwargs, "product", "servo")
set_if_none(kwargs, "config", os.path.join(WPT_PATH, "config.ini"))
kwargs["store_state"] = False
importer.check_args(kwargs)
update_args_for_legacy_layout(kwargs)
return 1 if not importer.run_update(**kwargs) else 0
def create_parser(**kwargs):
return importer.create_parser()