mirror of
https://github.com/servo/servo.git
synced 2025-06-08 08:33:26 +00:00
Add mach test-webidl command
This commit is contained in:
parent
1483a5de32
commit
18b6817755
6 changed files with 51 additions and 10 deletions
|
@ -232,6 +232,26 @@ class MachCommands(CommandBase):
|
|||
def test_tidy(self, faster):
|
||||
return tidy.scan(faster)
|
||||
|
||||
@Command('test-webidl',
|
||||
description='Run the WebIDL parser tests',
|
||||
category='testing')
|
||||
@CommandArgument('--quiet', '-q', default=False, action="store_true",
|
||||
help="Don't print passing tests.")
|
||||
@CommandArgument('tests', default=None, nargs="...",
|
||||
help="Specific tests to run, relative to the tests directory")
|
||||
def test_webidl(self, quiet, tests):
|
||||
self.ensure_bootstrapped()
|
||||
|
||||
test_file_dir = path.abspath(path.join(PROJECT_TOPLEVEL_PATH, "components", "script", "dom", "bindings", "codegen", "parser"))
|
||||
sys.path.insert(0, test_file_dir) # For the `import WebIDL` in runtests.py
|
||||
|
||||
run_file = path.abspath(path.join(test_file_dir, "runtests.py"))
|
||||
run_globals = {"__file__": run_file}
|
||||
execfile(run_file, run_globals)
|
||||
|
||||
verbose = not quiet
|
||||
return run_globals["run_tests"](tests, verbose)
|
||||
|
||||
@Command('test-wpt-failure',
|
||||
description='Run the web platform tests',
|
||||
category='testing')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue