aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/testing_commands.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 97bf8635190..a3206b745f3 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -25,7 +25,7 @@ from mach.decorators import (
Command,
)
-from servo.command_base import CommandBase, call, check_call, host_triple
+from servo.command_base import CommandBase, call, cd, check_call, host_triple
from wptrunner import wptcommandline
from update import updatecommandline
from servo_tidy import tidy
@@ -208,6 +208,8 @@ class MachCommands(CommandBase):
if not packages:
packages = set(os.listdir(path.join(self.context.topdir, "tests", "unit")))
+ packages.remove('stylo')
+
args = ["cargo", "test"]
for crate in packages:
args += ["-p", "%s_tests" % crate]
@@ -232,6 +234,23 @@ class MachCommands(CommandBase):
if result != 0:
return result
+ @Command('test-stylo',
+ description='Run stylo unit tests',
+ category='testing')
+ def test_stylo(self):
+ self.set_use_stable_rust()
+ self.ensure_bootstrapped()
+
+ env = self.build_env()
+ env["RUST_BACKTRACE"] = "1"
+ env["CARGO_TARGET_DIR"] = path.join(self.context.topdir, "target", "geckolib").encode("UTF-8")
+
+ with cd(path.join("ports", "geckolib")):
+ result = call(["cargo", "test", "-p", "stylo_tests"], env=env)
+
+ if result != 0:
+ return result
+
@Command('test-compiletest',
description='Run compiletests',
category='testing')