aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/servo/testing_commands.py29
1 files changed, 10 insertions, 19 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 03d567786f6..dfe78c0f36b 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -231,27 +231,18 @@ class MachCommands(CommandBase):
else:
test_patterns.append(test)
- in_crate_packages = []
-
- # Since the selectors tests have no corresponding selectors_tests crate in tests/unit,
- # we need to treat them separately from those that do.
- try:
- packages.remove('selectors')
- in_crate_packages += ["selectors"]
- except KeyError:
- pass
-
+ self_contained_tests = ["msg", "selectors"]
if not packages:
packages = set(os.listdir(path.join(self.context.topdir, "tests", "unit"))) - set(['.DS_Store'])
- in_crate_packages += ["selectors"]
+ packages |= set(self_contained_tests)
- # Since the selectors tests have no corresponding selectors_tests crate in tests/unit,
- # we need to treat them separately from those that do.
- try:
- packages.remove('selectors')
- in_crate_packages += ["selectors"]
- except KeyError:
- pass
+ in_crate_packages = []
+ for crate in self_contained_tests:
+ try:
+ packages.remove(crate)
+ in_crate_packages += [crate]
+ except KeyError:
+ pass
packages.discard('stylo')
@@ -264,7 +255,7 @@ class MachCommands(CommandBase):
env["PATH"] = "%s%s%s" % (path.dirname(self.get_binary_path(False, False)), os.pathsep, env["PATH"])
features = self.servo_features()
- if len(packages) > 0:
+ if len(packages) > 0 or len(in_crate_packages) > 0:
args = ["cargo", "bench" if bench else "test", "--manifest-path", self.servo_manifest()]
for crate in packages:
args += ["-p", "%s_tests" % crate]