mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add support for running W3C CSS tests.
These are run through the same harness as the web-platform-tests.
This commit is contained in:
parent
2bde318d24
commit
b2a5225831
5 changed files with 110 additions and 1 deletions
40
tests/wpt/update_css.py
Normal file
40
tests/wpt/update_css.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
# 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 http://mozilla.org/MPL/2.0/.
|
||||
|
||||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
here = os.path.split(__file__)[0]
|
||||
|
||||
def wpt_path(*args):
|
||||
return os.path.join(here, *args)
|
||||
|
||||
# Imports
|
||||
sys.path.append(wpt_path("harness"))
|
||||
from wptrunner import wptcommandline
|
||||
|
||||
def update_tests(**kwargs):
|
||||
from wptrunner import update
|
||||
|
||||
set_defaults(kwargs)
|
||||
logger = update.setup_logging(kwargs, {"mach": sys.stdout})
|
||||
|
||||
rv = update.run_update(logger, **kwargs)
|
||||
return 0 if rv is update.update.exit_clean else 1
|
||||
|
||||
def set_defaults(kwargs):
|
||||
if kwargs["config"] is None:
|
||||
kwargs["config"] = wpt_path('config_css.ini')
|
||||
wptcommandline.set_from_config(kwargs)
|
||||
|
||||
def main():
|
||||
parser = wptcommandline.create_parser_update()
|
||||
kwargs = vars(parser.parse_args())
|
||||
return update_tests(**kwargs)
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(0 if main() else 1)
|
Loading…
Add table
Add a link
Reference in a new issue