Move the servo crate from root to components/servo

This commit is contained in:
Simon Sapin 2014-11-28 08:16:02 +00:00
parent b2b6d4d0d1
commit 2f413c8937
15 changed files with 55 additions and 45 deletions

View file

@ -31,10 +31,12 @@ class MachCommands(CommandBase):
self.context.built_tests = True
def find_test(self, prefix):
target_contents = os.listdir(path.join(self.context.topdir, "target"))
target_contents = os.listdir(path.join(
self.context.topdir, "components", "servo", "target"))
for filename in target_contents:
if filename.startswith(prefix + "-"):
filepath = path.join(self.context.topdir, "target", filename)
filepath = path.join(
self.context.topdir, "components", "servo", "target", filename)
if path.isfile(filepath) and os.access(filepath, os.X_OK):
return filepath
@ -104,7 +106,8 @@ class MachCommands(CommandBase):
def cargo_test(component):
return 0 != subprocess.call(
["cargo", "test", "-p", component] + test_name, env=self.build_env())
["cargo", "test", "-p", component] + test_name,
env=self.build_env(), cwd="components/servo")
for component in os.listdir("components"):
ret = ret or cargo_test(component)