Expand tidy to lint parts of /tests/wpt

This commit is contained in:
Corey Farwell 2015-11-03 17:11:44 -05:00
parent 1e3010e4cd
commit d1824aea48
8 changed files with 35 additions and 19 deletions

View file

@ -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())