diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-01-19 11:34:22 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-01-20 15:33:02 +0100 |
commit | a17a1fd06e25578f503c5d15ce662d1bf0d142f2 (patch) | |
tree | d84a83eb47feefd9b230c0a8fa9225721e48487d /python/servo/testing_commands.py | |
parent | 671b69c0b77f9a4bd0c098cb2a2f73c95dacb954 (diff) | |
download | servo-a17a1fd06e25578f503c5d15ce662d1bf0d142f2.tar.gz servo-a17a1fd06e25578f503c5d15ce662d1bf0d142f2.zip |
Merge msg and msg_tests
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 29 |
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] |