aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r--python/servo/testing_commands.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 03d567786f6..8ed67964bab 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -231,27 +231,27 @@ 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 = [
+ "gfx",
+ "layout",
+ "msg",
+ "net",
+ "net_traits",
+ "selectors",
+ "servo_config",
+ "servo_remutex",
+ ]
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 +264,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]
@@ -872,7 +872,7 @@ testing/web-platform/mozilla/tests for Servo-only tests""" % reference_path)
def update_net_cookies(self):
cache_dir = path.join(self.config["tools"]["cache-dir"], "tests")
run_file = path.abspath(path.join(PROJECT_TOPLEVEL_PATH,
- "tests", "unit", "net",
+ "components", "net", "tests",
"cookie_http_state_utils.py"))
run_globals = {"__file__": run_file}
execfile(run_file, run_globals)