mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Expand tidy to lint parts of /tests/wpt
This commit is contained in:
parent
1e3010e4cd
commit
d1824aea48
8 changed files with 35 additions and 19 deletions
|
@ -2,7 +2,6 @@
|
|||
# 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/.
|
||||
|
||||
import argparse
|
||||
import multiprocessing
|
||||
import os
|
||||
import sys
|
||||
|
@ -12,9 +11,11 @@ import grouping_formatter
|
|||
here = os.path.split(__file__)[0]
|
||||
servo_root = os.path.abspath(os.path.join(here, "..", ".."))
|
||||
|
||||
|
||||
def wpt_path(*args):
|
||||
return os.path.join(here, *args)
|
||||
|
||||
|
||||
def servo_path(*args):
|
||||
return os.path.join(servo_root, *args)
|
||||
|
||||
|
@ -22,6 +23,7 @@ def servo_path(*args):
|
|||
sys.path.append(wpt_path("harness"))
|
||||
from wptrunner import wptrunner, wptcommandline
|
||||
|
||||
|
||||
def run_tests(paths=None, **kwargs):
|
||||
if paths is None:
|
||||
paths = {}
|
||||
|
@ -34,6 +36,7 @@ def run_tests(paths=None, **kwargs):
|
|||
success = wptrunner.run_tests(**kwargs)
|
||||
return 0 if success else 1
|
||||
|
||||
|
||||
def set_defaults(paths, kwargs):
|
||||
if kwargs["product"] is None:
|
||||
kwargs["product"] = "servo"
|
||||
|
@ -57,6 +60,7 @@ def set_defaults(paths, kwargs):
|
|||
|
||||
wptcommandline.check_args(kwargs)
|
||||
|
||||
|
||||
def main(paths=None):
|
||||
parser = wptcommandline.create_parser()
|
||||
kwargs = vars(parser.parse_args())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue