mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Remove legacy layout (layout 2013) (#35943)
We were already not compiling it and not running tests on it by default. So it's simpler to just completely remove it. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
f93006af95
commit
7594dc6991
17224 changed files with 23 additions and 1584835 deletions
|
@ -164,7 +164,6 @@ class MachCommands(CommandBase):
|
|||
"constellation",
|
||||
"fonts",
|
||||
"hyper_serde",
|
||||
"layout_2013",
|
||||
"layout_2020",
|
||||
"net",
|
||||
"net_traits",
|
||||
|
|
|
@ -23,20 +23,17 @@ from enum import Enum, Flag, auto
|
|||
|
||||
class Layout(Flag):
|
||||
none = 0
|
||||
layout2013 = auto()
|
||||
layout2020 = auto()
|
||||
|
||||
@staticmethod
|
||||
def all():
|
||||
return Layout.layout2013 | Layout.layout2020
|
||||
return Layout.layout2020
|
||||
|
||||
def to_string(self):
|
||||
if Layout.all() in self:
|
||||
return "all"
|
||||
elif Layout.layout2020 in self:
|
||||
return "2020"
|
||||
elif Layout.layout2013 in self:
|
||||
return "2013"
|
||||
else:
|
||||
return "none"
|
||||
|
||||
|
@ -141,8 +138,6 @@ def handle_modifier(config: JobConfig, s: str) -> Optional[JobConfig]:
|
|||
config.profile = "production"
|
||||
if "bencher" in s:
|
||||
config.bencher = True
|
||||
if "wpt-2013" in s:
|
||||
config.wpt_layout = Layout.layout2013
|
||||
elif "wpt-2020" in s:
|
||||
config.wpt_layout = Layout.layout2020
|
||||
elif "wpt" in s:
|
||||
|
@ -239,7 +234,7 @@ class TestParser(unittest.TestCase):
|
|||
{
|
||||
"name": "Linux (Unit Tests, WPT, Bencher)",
|
||||
"workflow": "linux",
|
||||
"wpt_layout": "2020",
|
||||
"wpt_layout": "all",
|
||||
"profile": "release",
|
||||
"unit_tests": True,
|
||||
'build_libservo': False,
|
||||
|
@ -298,7 +293,7 @@ class TestParser(unittest.TestCase):
|
|||
]})
|
||||
|
||||
def test_job_merging(self):
|
||||
self.assertDictEqual(json.loads(Config("linux-wpt-2020 linux-wpt-2013").to_json()),
|
||||
self.assertDictEqual(json.loads(Config("linux-wpt-2020").to_json()),
|
||||
{'fail_fast': False,
|
||||
'matrix': [{
|
||||
'bencher': False,
|
||||
|
|
|
@ -31,8 +31,6 @@ 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('--legacy-layout', '--layout-2013', '--with-layout-2013', default=False,
|
||||
action="store_true", help="Use expected results for the legacy layout engine")
|
||||
parser.add_argument('--log-servojson', action="append", type=mozlog.commandline.log_file,
|
||||
help="Servo's JSON logger of unexpected results")
|
||||
parser.add_argument('--always-succeed', default=False, action="store_true",
|
||||
|
@ -48,17 +46,5 @@ def create_parser():
|
|||
return parser
|
||||
|
||||
|
||||
def update_args_for_legacy_layout(kwargs: dict):
|
||||
def override_metadata_path(url_base, metadata_path):
|
||||
test_root = kwargs["test_paths"][url_base]
|
||||
kwargs["test_paths"][url_base] = wptrunner.wptcommandline.TestRoot(
|
||||
test_root.tests_path,
|
||||
os.path.join(WPT_PATH, *metadata_path)
|
||||
)
|
||||
override_metadata_path("/", ["meta-legacy-layout"])
|
||||
override_metadata_path("/_mozilla/", ["mozilla", "meta-legacy-layout"])
|
||||
override_metadata_path("/_webgl/", ["webgl", "meta-legacy-layout"])
|
||||
|
||||
|
||||
def run_tests():
|
||||
return test.run_tests()
|
||||
|
|
|
@ -18,7 +18,7 @@ from typing import List, NamedTuple, Optional, Union
|
|||
import mozlog
|
||||
import mozlog.formatters
|
||||
|
||||
from . import SERVO_ROOT, WPT_PATH, WPT_TOOLS_PATH, update_args_for_legacy_layout
|
||||
from . import SERVO_ROOT, WPT_PATH, WPT_TOOLS_PATH
|
||||
from .grouping_formatter import (
|
||||
ServoFormatter, ServoHandler,
|
||||
UnexpectedResult, UnexpectedSubtestResult
|
||||
|
@ -40,11 +40,7 @@ def set_if_none(args: dict, key: str, value):
|
|||
|
||||
|
||||
def run_tests(default_binary_path: str, **kwargs):
|
||||
legacy_layout = kwargs.pop("legacy_layout")
|
||||
message = f"Running WPT tests with {default_binary_path}"
|
||||
if legacy_layout:
|
||||
message += " (legacy layout)"
|
||||
print(message)
|
||||
print(f"Running WPT tests with {default_binary_path}")
|
||||
|
||||
# By default, Rayon selects the number of worker threads based on the
|
||||
# available CPU count. This doesn't work very well when running tests on CI,
|
||||
|
@ -87,8 +83,6 @@ def run_tests(default_binary_path: str, **kwargs):
|
|||
kwargs.setdefault("binary_args", [])
|
||||
if prefs:
|
||||
kwargs["binary_args"] += ["--pref=" + pref for pref in prefs]
|
||||
if legacy_layout:
|
||||
kwargs["binary_args"].append("--legacy-layout")
|
||||
|
||||
if not kwargs.get("no_default_test_types"):
|
||||
test_types = {
|
||||
|
@ -104,9 +98,6 @@ def run_tests(default_binary_path: str, **kwargs):
|
|||
|
||||
wptcommandline.check_args(kwargs)
|
||||
|
||||
if legacy_layout:
|
||||
update_args_for_legacy_layout(kwargs)
|
||||
|
||||
mozlog.commandline.log_formatters["servo"] = (
|
||||
ServoFormatter,
|
||||
"Servo's grouping output formatter",
|
||||
|
|
|
@ -12,7 +12,7 @@ from wptrunner.update import setup_logging, WPTUpdate # noqa: F401
|
|||
from wptrunner.update.base import exit_unclean # noqa: F401
|
||||
from wptrunner import wptcommandline # noqa: F401
|
||||
|
||||
from . import WPT_PATH, update_args_for_legacy_layout
|
||||
from . import WPT_PATH
|
||||
from . import manifestupdate
|
||||
|
||||
TEST_ROOT = os.path.join(WPT_PATH, 'tests')
|
||||
|
@ -109,9 +109,6 @@ def update_tests(**kwargs) -> int:
|
|||
if hasattr(wptcommandline, 'check_paths'):
|
||||
wptcommandline.check_paths(kwargs["test_paths"])
|
||||
|
||||
if kwargs.pop("legacy_layout"):
|
||||
update_args_for_legacy_layout(kwargs)
|
||||
|
||||
if kwargs.get('sync', False):
|
||||
return do_sync(**kwargs)
|
||||
|
||||
|
@ -125,8 +122,4 @@ def run_update(**kwargs) -> bool:
|
|||
|
||||
|
||||
def create_parser(**_kwargs):
|
||||
parser = wptcommandline.create_parser_update()
|
||||
parser.add_argument("--legacy-layout", "--layout-2013", "--with-layout-2013",
|
||||
default=False, action="store_true",
|
||||
help="Use expected results for the legacy layout engine")
|
||||
return parser
|
||||
return wptcommandline.create_parser_update()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue