diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-01-30 21:21:53 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-01-30 21:21:53 +0530 |
commit | 0ada7f9c8eda9879b5536cea3266c94214f9ce9b (patch) | |
tree | f2fbc9ee19d6dbc814fc04db5448d333e7bc44fc /python/servo/testing_commands.py | |
parent | 31657811d33f23c79eae49dea171718562b031c5 (diff) | |
parent | 83a492a533aecdb122052a9cacd735779ab9dfdd (diff) | |
download | servo-0ada7f9c8eda9879b5536cea3266c94214f9ce9b.tar.gz servo-0ada7f9c8eda9879b5536cea3266c94214f9ce9b.zip |
Auto merge of #9459 - shinglyu:testwebidl, r=Wafflespeanut
Add mach test-webidl command
I updated the `WebIDL.py` from latest mozilla-central. And add a `./mach test-webidl` command. For #9397
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9459)
<!-- Reviewable:end -->
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index bad1694579c..142a59e766f 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -232,6 +232,28 @@ 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")) + # For the `import WebIDL` in runtests.py + sys.path.insert(0, test_file_dir) + + 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') |