From 2f413c89374493184768e2ee6fe0b35f0ef52994 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 28 Nov 2014 08:16:02 +0000 Subject: Move the servo crate from root to components/servo --- python/servo/testing_commands.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'python/servo/testing_commands.py') diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 8735a234e12..aa091f9bc06 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -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) -- cgit v1.2.3 From cc4ea7507f9a4b51833f3134817d3870a6142d22 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 2 Dec 2014 14:33:23 -0800 Subject: Make build system more independent of current directory. --- python/servo/testing_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/servo/testing_commands.py') diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index aa091f9bc06..7d32d1e4808 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -107,7 +107,7 @@ class MachCommands(CommandBase): def cargo_test(component): return 0 != subprocess.call( ["cargo", "test", "-p", component] + test_name, - env=self.build_env(), cwd="components/servo") + env=self.build_env(), cwd=self.servo_crate()) for component in os.listdir("components"): ret = ret or cargo_test(component) -- cgit v1.2.3 From 9bbc633cedc0567d971d42e8ab75af5ee40c8035 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 2 Dec 2014 17:53:12 -0800 Subject: =?UTF-8?q?Don=E2=80=99t=20try=20to=20run=20unit=20tests=20for=20t?= =?UTF-8?q?he=20servo=20crate.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are none, but the contenttest program fails with: ``` task '
' panicked at 'Required option 'source-dir' missing.', ../../tests/contenttest.rs:48 ``` --- python/servo/testing_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/servo/testing_commands.py') diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 7d32d1e4808..ff4844731d8 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -110,7 +110,8 @@ class MachCommands(CommandBase): env=self.build_env(), cwd=self.servo_crate()) for component in os.listdir("components"): - ret = ret or cargo_test(component) + if component != "servo": + ret = ret or cargo_test(component) return ret -- cgit v1.2.3