Switch default layout option to --layout-2020 in some mach commands (#30048)

Currently, `./mach test-wpt` family of commands (`test-wpt`,
`test-wpt-android`, and `test-wpt-failure`) and `./mach update-wpt`
default to using the legacy-layout option `--layout-2013` unless
`--layout-2020` is specified.

Given that we are now using layout-2020 by default, this change updates
these commands to default to using the `--layout-2020` option instead of
`--layout-2013`.
This commit is contained in:
Yutaro Ohno 2023-08-03 04:29:20 +09:00 committed by GitHub
parent d9a38b00ff
commit ad0fa77456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 16 deletions

View file

@ -33,9 +33,9 @@ def create_parser():
help="Run under chaos mode in rr until a failure is captured")
parser.add_argument('--pref', default=[], action="append", dest="prefs",
help="Pass preferences to servo")
parser.add_argument('--layout-2020', '--with-layout-2020', default=False,
parser.add_argument('--layout-2020', '--with-layout-2020', default=True,
action="store_true", help="Use expected results for the 2020 layout engine")
parser.add_argument('--layout-2013', '--with-layout-2013', default=True,
parser.add_argument('--layout-2013', '--with-layout-2013', default=False,
action="store_true", help="Use expected results for the 2013 layout engine")
parser.add_argument('--log-servojson', action="append", type=mozlog.commandline.log_file,
help="Servo's JSON logger of unexpected results")
@ -53,17 +53,16 @@ def create_parser():
def update_args_for_legacy_layout(kwargs: dict):
if kwargs.pop("layout_2020"):
return
kwargs["test_paths"]["/"]["metadata_path"] = os.path.join(
WPT_PATH, "meta-legacy-layout"
)
kwargs["test_paths"]["/_mozilla/"]["metadata_path"] = os.path.join(
WPT_PATH, "mozilla", "meta-legacy-layout"
)
kwargs["include_manifest"] = os.path.join(
WPT_PATH, "include-legacy-layout.ini"
)
if kwargs.pop("layout_2013"):
kwargs["test_paths"]["/"]["metadata_path"] = os.path.join(
WPT_PATH, "meta-legacy-layout"
)
kwargs["test_paths"]["/_mozilla/"]["metadata_path"] = os.path.join(
WPT_PATH, "mozilla", "meta-legacy-layout"
)
kwargs["include_manifest"] = os.path.join(
WPT_PATH, "include-legacy-layout.ini"
)
def run_tests():

View file

@ -103,7 +103,7 @@ def run_tests(**kwargs):
kwargs.setdefault("binary_args", [])
if prefs:
kwargs["binary_args"] += ["--pref=" + pref for pref in prefs]
if not kwargs.get("layout_2020", False):
if kwargs.get("layout_2013"):
kwargs["binary_args"] += ["--legacy-layout"]
if not kwargs.get("no_default_test_types"):

View file

@ -126,8 +126,8 @@ def run_update(**kwargs) -> bool:
def create_parser(**_kwargs):
parser = wptcommandline.create_parser_update()
parser.add_argument("--layout-2020", "--with-layout-2020", default=False, action="store_true",
parser.add_argument("--layout-2020", "--with-layout-2020", default=True, action="store_true",
help="Use expected results for the 2020 layout engine")
parser.add_argument("--layout-2013", "--with-layout-2013", default=True, action="store_true",
parser.add_argument("--layout-2013", "--with-layout-2013", default=False, action="store_true",
help="Use expected results for the 2013 layout engine")
return parser