diff options
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index bad1694579c..100414a68e2 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -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') |