mirror of
https://github.com/servo/servo.git
synced 2025-06-08 16:43:28 +00:00
Merge msg and msg_tests
This commit is contained in:
parent
671b69c0b7
commit
a17a1fd06e
6 changed files with 21 additions and 48 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue