aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.py
diff options
context:
space:
mode:
authorJames Graham <james@hoppipolla.co.uk>2015-03-27 21:23:44 +0000
committerJames Graham <james@hoppipolla.co.uk>2015-04-03 23:28:51 +0100
commitb2a5225831a8eee3ff596dce2be8dc08df4300a0 (patch)
tree85d6846d36c5f4cbb053839eede8add4174e9932 /python/servo/testing_commands.py
parent2bde318d24a2ecd2698edd108013c138630bec9d (diff)
downloadservo-b2a5225831a8eee3ff596dce2be8dc08df4300a0.tar.gz
servo-b2a5225831a8eee3ff596dce2be8dc08df4300a0.zip
Add support for running W3C CSS tests.
These are run through the same harness as the web-platform-tests.
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r--python/servo/testing_commands.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 46efd4d5450..c2154859dde 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -93,7 +93,7 @@ class MachCommands(CommandBase):
return self.infer_test_by_dir(params)
test_start = time()
- for t in ["tidy", "ref", "content", "wpt", "unit"]:
+ for t in ["tidy", "ref", "content", "wpt", "css", "unit"]:
Registrar.dispatch("test-%s" % t, context=self.context)
elapsed = time() - test_start
@@ -245,6 +245,33 @@ class MachCommands(CommandBase):
execfile(run_file, run_globals)
return run_globals["update_tests"](**kwargs)
+ @Command('test-css',
+ description='Run the web platform tests',
+ category='testing',
+ parser=wptcommandline.create_parser())
+ @CommandArgument('--release', default=False, action="store_true",
+ help="Run with a release build of servo")
+ def test_css(self, **kwargs):
+ self.ensure_bootstrapped()
+ self.ensure_wpt_virtualenv()
+
+ run_file = path.abspath(path.join("tests", "wpt", "run_css.py"))
+ run_globals = {"__file__": run_file}
+ execfile(run_file, run_globals)
+ return run_globals["run_tests"](**kwargs)
+
+ @Command('update-css',
+ description='Update the web platform tests',
+ category='testing',
+ parser=updatecommandline.create_parser())
+ def update_css(self, **kwargs):
+ self.ensure_bootstrapped()
+ self.ensure_wpt_virtualenv()
+ run_file = path.abspath(path.join("tests", "wpt", "update_css.py"))
+ run_globals = {"__file__": run_file}
+ execfile(run_file, run_globals)
+ return run_globals["update_tests"](**kwargs)
+
def ensure_wpt_virtualenv(self):
virtualenv_path = path.join("tests", "wpt", "_virtualenv")