From 2f413c89374493184768e2ee6fe0b35f0ef52994 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 28 Nov 2014 08:16:02 +0000 Subject: [PATCH 1/7] Move the servo crate from root to components/servo --- .gitignore | 6 ++---- Cargo.lock => components/servo/Cargo.lock | 0 Cargo.toml => components/servo/Cargo.toml | 24 ++++++++++++----------- {src => components/servo}/lib.rs | 0 {src => components/servo}/main.rs | 0 components/util/resource_files.rs | 8 ++++++-- etc/ci/upload_docs.sh | 8 ++++---- ports/cef/Cargo.toml | 2 +- python/servo/build_commands.py | 11 +++++++---- python/servo/devenv_commands.py | 2 +- python/servo/post_build_commands.py | 10 +++++----- python/servo/testing_commands.py | 9 ++++++--- tests/contenttest.rs | 2 +- tests/reftest.rs | 2 +- tests/wpt/run.sh | 16 +++++++-------- 15 files changed, 55 insertions(+), 45 deletions(-) rename Cargo.lock => components/servo/Cargo.lock (100%) rename Cargo.toml => components/servo/Cargo.toml (74%) rename {src => components/servo}/lib.rs (100%) rename {src => components/servo}/main.rs (100%) diff --git a/.gitignore b/.gitignore index 023ae02368b..e1d648fc948 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ /.cargo/config -/target -/rust -/cargo +/components/servo/target /ports/cef/target /ports/android/bin /ports/android/libs @@ -16,7 +14,7 @@ /components/script/dom/bindings/codegen/UnionTypes.h /components/script/dom/bindings/codegen/UnionConversions.h /.servobuild -/_virtualenv +/tests/wpt/_virtualenv *~ *# *.o diff --git a/Cargo.lock b/components/servo/Cargo.lock similarity index 100% rename from Cargo.lock rename to components/servo/Cargo.lock diff --git a/Cargo.toml b/components/servo/Cargo.toml similarity index 74% rename from Cargo.toml rename to components/servo/Cargo.toml index 9dca413e4a0..8735b56686f 100644 --- a/Cargo.toml +++ b/components/servo/Cargo.toml @@ -6,22 +6,24 @@ authors = ["The Servo Project Developers"] [lib] name = "servo" +path = "lib.rs" crate-type = ["rlib"] [[bin]] name = "servo" +path = "main.rs" test = false doc = false bench = false [[test]] name = "reftest" -path = "tests/reftest.rs" +path = "../../tests/reftest.rs" harness = false [[test]] name = "contenttest" -path = "tests/contenttest.rs" +path = "../../tests/contenttest.rs" harness = false [features] @@ -29,32 +31,32 @@ default = ["glfw_app"] glutin = ["glutin_app"] [dependencies.compositing] -path = "components/compositing" +path = "../compositing" [dependencies.net] -path = "components/net" +path = "../net" [dependencies.msg] -path = "components/msg" +path = "../msg" [dependencies.util] -path = "components/util" +path = "../util" [dependencies.script] -path = "components/script" +path = "../script" [dependencies.layout] -path = "components/layout" +path = "../layout" [dependencies.gfx] -path = "components/gfx" +path = "../gfx" [dependencies.glfw_app] -path = "ports/glfw" +path = "../../ports/glfw" optional = true [dependencies.glutin_app] -path = "ports/glutin" +path = "../../ports/glutin" optional = true [dependencies.url] diff --git a/src/lib.rs b/components/servo/lib.rs similarity index 100% rename from src/lib.rs rename to components/servo/lib.rs diff --git a/src/main.rs b/components/servo/main.rs similarity index 100% rename from src/main.rs rename to components/servo/main.rs diff --git a/components/util/resource_files.rs b/components/util/resource_files.rs index 73e1148cc9a..b40c93f2651 100644 --- a/components/util/resource_files.rs +++ b/components/util/resource_files.rs @@ -17,11 +17,15 @@ pub fn resources_dir_path() -> Path { #[cfg(not(target_os = "android"))] pub fn resources_dir_path() -> Path { - // FIXME: Find a way to not rely on the executable being under `/target`. + // FIXME: Find a way to not rely on the executable being + // under `/components/servo/target` + // or `/components/servo/target/release`. let mut path = os::self_exe_path().expect("can't get exe path"); path.pop(); + path.pop(); + path.pop(); path.push("resources"); - if !path.is_dir() { + if !path.is_dir() { // self_exe_path() is probably in .../target/release path.pop(); path.pop(); path.push("resources"); diff --git a/etc/ci/upload_docs.sh b/etc/ci/upload_docs.sh index c46ae829063..3f4edd0ada0 100755 --- a/etc/ci/upload_docs.sh +++ b/etc/ci/upload_docs.sh @@ -6,14 +6,14 @@ set -e -mkdir -p target/doc +mkdir -p components/servo/target/doc ./mach bootstrap-rust # Ordered so that: # * etc/doc.servo.org/index.html overwrites $(mach rust-root)/doc/index.html # * ./mach doc overwrites $(mach rust-root)/doc/search-index.js -cp -R $(./mach rust-root)/doc/* target/doc/ -cp etc/doc.servo.org/* target/doc/ +cp -R $(./mach rust-root)/doc/* components/servo/target/doc/ +cp etc/doc.servo.org/* components/servo/target/doc/ ./mach doc -ghp-import -n target/doc +ghp-import -n components/servo/target/doc git push -qf https://${TOKEN}@github.com/servo/doc.servo.org.git gh-pages diff --git a/ports/cef/Cargo.toml b/ports/cef/Cargo.toml index 6ea7c406270..bfbbda58bca 100644 --- a/ports/cef/Cargo.toml +++ b/ports/cef/Cargo.toml @@ -9,7 +9,7 @@ path = "lib.rs" crate-type = ["dylib"] [dependencies.servo] -path = "../.." +path = "../../components/servo" [dependencies.glfw_app] path = "../glfw" diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 666c8945e1d..7b8e2d4351c 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -73,7 +73,7 @@ class MachCommands(CommandBase): else: status = subprocess.call( ["cargo", "build"] + opts, - env=self.build_env()) + env=self.build_env(), cwd="components/servo") elapsed = time() - build_start print("Build completed in %0.2fs" % elapsed) @@ -105,7 +105,8 @@ class MachCommands(CommandBase): build_start = time() with cd(path.join("ports", "cef")): - ret = subprocess.call(["cargo", "build"], env=self.build_env()) + ret = subprocess.call(["cargo", "build"], + env=self.build_env(), cwd="components/servo") elapsed = time() - build_start print("CEF build completed in %0.2fs" % elapsed) @@ -124,7 +125,8 @@ class MachCommands(CommandBase): if jobs is not None: opts += ["-j", jobs] return subprocess.call( - ["cargo", "test", "--no-run"], env=self.build_env()) + ["cargo", "test", "--no-run"], + env=self.build_env(), cwd="components/servo") @Command('clean', description='Clean the build directory.', @@ -144,4 +146,5 @@ class MachCommands(CommandBase): if verbose: opts += ["-v"] - return subprocess.call(["cargo", "clean"] + opts, env=self.build_env()) + return subprocess.call(["cargo", "clean"] + opts, + env=self.build_env(), cwd="components/servo") diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index e031a957935..82db7f34efa 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -22,7 +22,7 @@ class MachCommands(CommandBase): help="Command-line arguments to be passed through to Cargo") def cargo(self, params): return subprocess.call(["cargo"] + params, - env=self.build_env()) + env=self.build_env(), cwd="components/servo") @Command('update-cargo', description='Update Cargo dependencies', diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index c2c4bb5c06b..faa4ba127af 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -37,7 +37,7 @@ class MachCommands(CommandBase): env = self.build_env() env["RUST_BACKTRACE"] = "1" - args = [path.join("target", "servo")] + args = [path.join("components", "servo", "target", "servo")] # Borrowed and modified from: # http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/python/mozbuild/mozbuild/mach_commands.py#l883 @@ -71,7 +71,7 @@ class MachCommands(CommandBase): def doc(self, params): self.ensure_bootstrapped() return subprocess.call(["cargo", "doc"] + params, - env=self.build_env()) + env=self.build_env(), cwd="components/servo") @Command('serve-docs', description='Locally serve Servo and Rust documentation', @@ -81,13 +81,13 @@ class MachCommands(CommandBase): help="Port to serve documentation at (default is 8888)") def serve_docs(self, port): self.doc([]) - servedir = path.join("target", "serve-docs") - docdir = path.join("target", "doc") + servedir = path.join("components", "servo", "target", "serve-docs") + docdir = path.join("components", "servo", "target", "doc") rmtree(servedir, True) copytree(docdir, servedir, ignore=ignore_patterns('.*')) - rustdocs = path.join("rust", self.rust_snapshot_path(), "doc") + rustdocs = path.join(self.config["tools"]["rust-root"], "doc") copytree(rustdocs, path.join(servedir, "rust"), ignore=ignore_patterns('.*')) chdir(servedir) 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) diff --git a/tests/contenttest.rs b/tests/contenttest.rs index d166934a82f..17ba85b223f 100644 --- a/tests/contenttest.rs +++ b/tests/contenttest.rs @@ -99,7 +99,7 @@ fn run_test(file: String) { let stderr = InheritFd(2); let args = ["-z", "-f", infile.as_slice()]; - let mut prc = match Command::new("target/servo") + let mut prc = match Command::new("components/servo/target/servo") .args(args) .stdin(Ignored) .stdout(stdout) diff --git a/tests/reftest.rs b/tests/reftest.rs index af186eeffa2..1c29a795419 100644 --- a/tests/reftest.rs +++ b/tests/reftest.rs @@ -248,7 +248,7 @@ fn make_test(reftest: Reftest) -> TestDescAndFn { fn capture(reftest: &Reftest, side: uint) -> (u32, u32, Vec) { let png_filename = format!("/tmp/servo-reftest-{:06u}-{:u}.png", reftest.id, side); - let mut command = Command::new("target/servo"); + let mut command = Command::new("components/servo/target/servo"); command .args(reftest.servo_args.as_slice()) // Allows pixel perfect rendering of Ahem font for reftests. diff --git a/tests/wpt/run.sh b/tests/wpt/run.sh index ed06092c5c0..d238a16f985 100755 --- a/tests/wpt/run.sh +++ b/tests/wpt/run.sh @@ -4,22 +4,22 @@ set -e -servo_root=$(pwd) +wpt_root=$(dirname $0) PYTHON=$(which python2 2> /dev/null || echo python) VIRTUALENV=$(which virtualenv2 2> /dev/null || echo virtualenv) -test -d _virtualenv || $VIRTUALENV _virtualenv -p $PYTHON -test -d $servo_root/tests/wpt/metadata || mkdir -p $servo_root/tests/wpt/metadata -test -d $servo_root/tests/wpt/prefs || mkdir -p $servo_root/tests/wpt/prefs -source _virtualenv/bin/activate +test -d $wpt_root/_virtualenv || $VIRTUALENV $wpt_root/_virtualenv -p $PYTHON +test -d $wpt_root/metadata || mkdir -p $wpt_root/metadata +test -d $wpt_root/prefs || mkdir -p $wpt_root/prefs +source $wpt_root/_virtualenv/bin/activate if [[ $* == *--update-manifest* ]]; then (python -c "import html5lib" &>/dev/null) || pip install html5lib fi (python -c "import wptrunner" &>/dev/null) || pip install 'wptrunner==1.7' -python $servo_root/tests/wpt/run.py \ - --config $servo_root/tests/wpt/config.ini \ - --binary target/servo \ +python $wpt_root/run.py \ + --config $wpt_root/config.ini \ + --binary $wpt_root/../../components/servo/target/servo \ --log-mach - \ "$@" From ff4877b4734c5a95921f63bb7b516e06a9223cbe Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 28 Nov 2014 16:40:52 +0000 Subject: [PATCH 2/7] Warn when Cargo is run directly. Fix #3957. --- .gitignore | 2 ++ Cargo.toml | 10 ++++++++++ support/not-the-toml-you-re-looking-for.rs | 9 +++++++++ 3 files changed, 21 insertions(+) create mode 100644 Cargo.toml create mode 100644 support/not-the-toml-you-re-looking-for.rs diff --git a/.gitignore b/.gitignore index e1d648fc948..f0fa1e8f96a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /.cargo/config +/Cargo.lock +/target /components/servo/target /ports/cef/target /ports/android/bin diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000000..bc186d02ccf --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,10 @@ +[package] + +name = "not-the-toml-you-re-looking-for" +version = "0.0.1" +authors = ["The Servo Project Developers"] + +build = "support/not-the-toml-you-re-looking-for.rs" + +[lib] +name = "not-the-toml-you-re-looking-for" diff --git a/support/not-the-toml-you-re-looking-for.rs b/support/not-the-toml-you-re-looking-for.rs new file mode 100644 index 00000000000..48f75215ced --- /dev/null +++ b/support/not-the-toml-you-re-looking-for.rs @@ -0,0 +1,9 @@ +fn main() { + ::std::os::set_exit_status(1); + let _ = ::std::io::stderr().write(br" + + This is not the `Cargo.toml` file you're looking for. + Invoke Cargo through mach instead, e.g. `./mach build`. + +"); +} From cc4ea7507f9a4b51833f3134817d3870a6142d22 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 2 Dec 2014 14:33:23 -0800 Subject: [PATCH 3/7] Make build system more independent of current directory. --- etc/ci/upload_docs.sh | 2 ++ python/servo/build_commands.py | 8 ++++---- python/servo/command_base.py | 3 +++ python/servo/devenv_commands.py | 2 +- python/servo/post_build_commands.py | 2 +- python/servo/testing_commands.py | 2 +- tests/contenttest.rs | 2 +- tests/reftest.rs | 2 +- 8 files changed, 14 insertions(+), 9 deletions(-) diff --git a/etc/ci/upload_docs.sh b/etc/ci/upload_docs.sh index 3f4edd0ada0..5caf358fce7 100755 --- a/etc/ci/upload_docs.sh +++ b/etc/ci/upload_docs.sh @@ -6,6 +6,8 @@ set -e +cd "$(dirname $0)/../.." + mkdir -p components/servo/target/doc ./mach bootstrap-rust # Ordered so that: diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 7b8e2d4351c..1352877d048 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -73,7 +73,7 @@ class MachCommands(CommandBase): else: status = subprocess.call( ["cargo", "build"] + opts, - env=self.build_env(), cwd="components/servo") + env=self.build_env(), cwd=self.servo_crate()) elapsed = time() - build_start print("Build completed in %0.2fs" % elapsed) @@ -106,7 +106,7 @@ class MachCommands(CommandBase): build_start = time() with cd(path.join("ports", "cef")): ret = subprocess.call(["cargo", "build"], - env=self.build_env(), cwd="components/servo") + env=self.build_env(), cwd=self.servo_crate()) elapsed = time() - build_start print("CEF build completed in %0.2fs" % elapsed) @@ -126,7 +126,7 @@ class MachCommands(CommandBase): opts += ["-j", jobs] return subprocess.call( ["cargo", "test", "--no-run"], - env=self.build_env(), cwd="components/servo") + env=self.build_env(), cwd=self.servo_crate()) @Command('clean', description='Clean the build directory.', @@ -147,4 +147,4 @@ class MachCommands(CommandBase): opts += ["-v"] return subprocess.call(["cargo", "clean"] + opts, - env=self.build_env(), cwd="components/servo") + env=self.build_env(), cwd=self.servo_crate()) diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 8dc872e8656..a34104b734e 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -142,6 +142,9 @@ class CommandBase(object): return env + def servo_crate(self): + return path.join(self.context.topdir, "components", "servo") + def ensure_bootstrapped(self): if self.context.bootstrapped: return diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index 82db7f34efa..a6b9b997c18 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -22,7 +22,7 @@ class MachCommands(CommandBase): help="Command-line arguments to be passed through to Cargo") def cargo(self, params): return subprocess.call(["cargo"] + params, - env=self.build_env(), cwd="components/servo") + env=self.build_env(), cwd=self.servo_crate()) @Command('update-cargo', description='Update Cargo dependencies', diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index faa4ba127af..972dea7429b 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -71,7 +71,7 @@ class MachCommands(CommandBase): def doc(self, params): self.ensure_bootstrapped() return subprocess.call(["cargo", "doc"] + params, - env=self.build_env(), cwd="components/servo") + env=self.build_env(), cwd=self.servo_crate()) @Command('serve-docs', description='Locally serve Servo and Rust documentation', 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) diff --git a/tests/contenttest.rs b/tests/contenttest.rs index 17ba85b223f..438f8b5fccf 100644 --- a/tests/contenttest.rs +++ b/tests/contenttest.rs @@ -99,7 +99,7 @@ fn run_test(file: String) { let stderr = InheritFd(2); let args = ["-z", "-f", infile.as_slice()]; - let mut prc = match Command::new("components/servo/target/servo") + let mut prc = match Command::new(os::self_exe_path().unwrap().join("servo")) .args(args) .stdin(Ignored) .stdout(stdout) diff --git a/tests/reftest.rs b/tests/reftest.rs index 1c29a795419..28e6cd20f4c 100644 --- a/tests/reftest.rs +++ b/tests/reftest.rs @@ -248,7 +248,7 @@ fn make_test(reftest: Reftest) -> TestDescAndFn { fn capture(reftest: &Reftest, side: uint) -> (u32, u32, Vec) { let png_filename = format!("/tmp/servo-reftest-{:06u}-{:u}.png", reftest.id, side); - let mut command = Command::new("components/servo/target/servo"); + let mut command = Command::new(os::self_exe_path().unwrap().join("servo")); command .args(reftest.servo_args.as_slice()) // Allows pixel perfect rendering of Ahem font for reftests. From 14e28f66540fe58dae8dd2b9738dbd04c022bb40 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 2 Dec 2014 16:19:06 -0800 Subject: [PATCH 4/7] Have `./mach cargo` not change to `components/servo`. `ports/android/glut` relies on it executing on the current directory. --- python/servo/devenv_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index a6b9b997c18..e031a957935 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -22,7 +22,7 @@ class MachCommands(CommandBase): help="Command-line arguments to be passed through to Cargo") def cargo(self, params): return subprocess.call(["cargo"] + params, - env=self.build_env(), cwd=self.servo_crate()) + env=self.build_env()) @Command('update-cargo', description='Update Cargo dependencies', From 26cd2b46df2a49ae37d8a22a4b6ed1116b01e49a Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 2 Dec 2014 16:33:10 -0800 Subject: [PATCH 5/7] Fix up android/glut port to find its servo dependency. --- ports/android/glut_app/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/android/glut_app/Cargo.toml b/ports/android/glut_app/Cargo.toml index 1fdad3d343e..f2e1bf4f65a 100644 --- a/ports/android/glut_app/Cargo.toml +++ b/ports/android/glut_app/Cargo.toml @@ -24,7 +24,7 @@ git = "https://github.com/servo/rust-layers" path = "../../../components/msg" [dependencies.servo] -path = "../../.." +path = "../../../components/servo" default-features = false [dependencies.util] From 9bbc633cedc0567d971d42e8ab75af5ee40c8035 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 2 Dec 2014 17:53:12 -0800 Subject: [PATCH 6/7] =?UTF-8?q?Don=E2=80=99t=20try=20to=20run=20unit=20tes?= =?UTF-8?q?ts=20for=20the=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(-) 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 From e1c2210c23e2e5f7a24901618698c090279092ee Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Tue, 2 Dec 2014 18:23:06 -0800 Subject: [PATCH 7/7] More target path fixup. --- tests/reftest.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/reftest.rs b/tests/reftest.rs index 28e6cd20f4c..85a4d9c7b56 100644 --- a/tests/reftest.rs +++ b/tests/reftest.rs @@ -112,7 +112,8 @@ fn run(test_opts: TestOpts, all_tests: Vec, // Verify that we're passing in valid servo arguments. Otherwise, servo // will exit before we've run any tests, and it will appear to us as if // all the tests are failing. - let mut command = match Command::new("target/servo").args(servo_args.as_slice()).spawn() { + let mut command = match Command::new(os::self_exe_path().unwrap().join("servo")) + .args(servo_args.as_slice()).spawn() { Ok(p) => p, Err(e) => panic!("failed to execute process: {}", e), };