Fix all tests with recent changes
authorAlex Crichton <alex@alexcrichton.com>
Tue, 1 Mar 2016 16:24:43 +0000 (08:24 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 3 Mar 2016 21:35:46 +0000 (13:35 -0800)
The package id for path dependencies now has another path component pointing
precisely to the package being compiled, so lots of tests need their output
matches to get updated.

17 files changed:
src/cargo/util/paths.rs
tests/test_cargo_compile.rs
tests/test_cargo_compile_custom_build.rs
tests/test_cargo_compile_git_deps.rs
tests/test_cargo_compile_path_deps.rs
tests/test_cargo_compile_plugins.rs
tests/test_cargo_cross_compile.rs
tests/test_cargo_doc.rs
tests/test_cargo_features.rs
tests/test_cargo_install.rs
tests/test_cargo_package.rs
tests/test_cargo_profiles.rs
tests/test_cargo_registry.rs
tests/test_cargo_run.rs
tests/test_cargo_rustc.rs
tests/test_cargo_rustdoc.rs
tests/test_cargo_test.rs

index 2e9397df6c449b6b2cc4ef3dda1a9c19f46b94cd..5770b80ea6f9c1642d1d03b80fc878416f3bc1fd 100644 (file)
@@ -73,8 +73,8 @@ pub fn read(path: &Path) -> CargoResult<String> {
         let mut f = try!(File::open(path));
         try!(f.read_to_string(&mut ret));
         Ok(ret)
-    }).chain_error(|| {
-        internal(format!("failed to read `{}`", path.display()))
+    })().map_err(human).chain_error(|| {
+        human(format!("failed to read `{}`", path.display()))
     })
 }
 
@@ -83,8 +83,8 @@ pub fn write(path: &Path, contents: &[u8]) -> CargoResult<()> {
         let mut f = try!(File::create(path));
         try!(f.write_all(contents));
         Ok(())
-    }).chain_error(|| {
-        internal(format!("failed to write `{}`", path.display()))
+    })().map_err(human).chain_error(|| {
+        human(format!("failed to write `{}`", path.display()))
     })
 }
 
index 2fddc664cf3d8387fb2b17d64164f2160065140d..897043e72cbabaad11a10268e6141c61efd42079 100644 (file)
@@ -315,7 +315,7 @@ test!(cargo_compile_with_warnings_in_a_dep_package {
 
     assert_that(p.cargo_process("build"),
         execs()
-        .with_stdout(&format!("{} bar v0.5.0 ({})\n\
+        .with_stdout(&format!("{} bar v0.5.0 ({}/bar)\n\
                               {} foo v0.5.0 ({})\n",
                              COMPILING, p.url(),
                              COMPILING, p.url()))
@@ -607,7 +607,7 @@ test!(cargo_compile_with_dep_name_mismatch {
     assert_that(p.cargo_process("build"),
                 execs().with_status(101).with_stderr(&format!(
 r#"no matching package named `notquitebar` found (required by `foo`)
-location searched: {proj_dir}
+location searched: {proj_dir}/bar
 version required: *
 "#, proj_dir = p.url())));
 });
@@ -1004,7 +1004,7 @@ test!(verbose_release_build_deps {
         .file("foo/src/lib.rs", "");
     assert_that(p.cargo_process("build").arg("-v").arg("--release"),
                 execs().with_status(0).with_stdout(&format!("\
-{compiling} foo v0.0.0 ({url})
+{compiling} foo v0.0.0 ({url}/foo)
 {running} `rustc foo[..]src[..]lib.rs --crate-name foo \
         --crate-type dylib --crate-type rlib -C prefer-dynamic \
         -C opt-level=3 \
index 4924787dc86efc5da9399638ad6fba241a9bfbd6..7c2ed61035ed0b7eddb168f3064352468ddd8d24 100644 (file)
@@ -970,7 +970,7 @@ test!(shared_dep_with_a_build_script {
             authors = []
 
             [dependencies.a]
-            path = "../b"
+            path = "../a"
         "#)
         .file("b/src/lib.rs", "");
     assert_that(p.cargo_process("build").arg("-v"),
index e8614423316a856656aa211a4c198f3460aa857c..28f9ac8be95428e91ed59487056960a4c412f4db 100644 (file)
@@ -622,8 +622,8 @@ test!(update_with_shared_deps {
                 execs().with_stdout(&format!("\
 {updating} git repository `{git}`
 {compiling} bar v0.5.0 ({git}#[..])
-{compiling} [..] v0.5.0 ({dir})
-{compiling} [..] v0.5.0 ({dir})
+{compiling} [..] v0.5.0 ([..])
+{compiling} [..] v0.5.0 ([..])
 {compiling} foo v0.5.0 ({dir})\n",
                     updating = UPDATING, git = git_project.url(),
                     compiling = COMPILING, dir = p.url())));
@@ -681,8 +681,8 @@ To learn more, run the command again with --verbose.
     assert_that(p.cargo("build"),
                 execs().with_stdout(&format!("\
 {compiling} bar v0.5.0 ({git}#[..])
-{compiling} [..] v0.5.0 ({dir})
-{compiling} [..] v0.5.0 ({dir})
+{compiling} [..] v0.5.0 ({dir}[..]dep[..])
+{compiling} [..] v0.5.0 ({dir}[..]dep[..])
 {compiling} foo v0.5.0 ({dir})\n",
                     git = git_project.url(),
                     compiling = COMPILING, dir = p.url())));
index 4757f3cb9d50c1ddae2a55a0e4a677e8e61fb1dc..9eaaac0a81dcb42f652756bd9ce0d193c77e0456 100644 (file)
@@ -72,8 +72,8 @@ test!(cargo_compile_with_nested_deps_shorthand {
 
     assert_that(p.cargo_process("build"),
         execs().with_status(0)
-               .with_stdout(&format!("{} baz v0.5.0 ({})\n\
-                                     {} bar v0.5.0 ({})\n\
+               .with_stdout(&format!("{} baz v0.5.0 ({}/bar/baz)\n\
+                                     {} bar v0.5.0 ({}/bar)\n\
                                      {} foo v0.5.0 ({})\n",
                                     COMPILING, p.url(),
                                     COMPILING, p.url(),
@@ -90,13 +90,13 @@ test!(cargo_compile_with_nested_deps_shorthand {
     println!("building baz");
     assert_that(p.cargo("build").arg("-p").arg("baz"),
                 execs().with_status(0)
-                       .with_stdout(&format!("{} baz v0.5.0 ({})\n",
+                       .with_stdout(&format!("{} baz v0.5.0 ({}/bar/baz)\n",
                                             COMPILING, p.url())));
     println!("building foo");
     assert_that(p.cargo("build")
                  .arg("-p").arg("foo"),
                 execs().with_status(0)
-                       .with_stdout(&format!("{} bar v0.5.0 ({})\n\
+                       .with_stdout(&format!("{} bar v0.5.0 ({}/bar)\n\
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, p.url(),
                                             COMPILING, p.url())));
@@ -176,15 +176,15 @@ test!(cargo_compile_with_root_dev_deps_with_testing {
     p2.build();
     assert_that(p.cargo_process("test"),
         execs().with_stdout(&format!("\
-{compiling} [..] v0.5.0 ({url})
-{compiling} [..] v0.5.0 ({url})
+{compiling} [..] v0.5.0 ([..])
+{compiling} [..] v0.5.0 ([..])
 {running} target[..]foo-[..]
 
 running 0 tests
 
 test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
 
-", compiling = COMPILING, url = p.url(), running = RUNNING)));
+", compiling = COMPILING, running = RUNNING)));
 });
 
 test!(cargo_compile_with_transitive_dev_deps {
@@ -229,7 +229,7 @@ test!(cargo_compile_with_transitive_dev_deps {
         "#);
 
     assert_that(p.cargo_process("build"),
-        execs().with_stdout(&format!("{} bar v0.5.0 ({})\n\
+        execs().with_stdout(&format!("{} bar v0.5.0 ({}/bar)\n\
                                      {} foo v0.5.0 ({})\n",
                                     COMPILING, p.url(),
                                     COMPILING, p.url())));
@@ -271,7 +271,7 @@ test!(no_rebuild_dependency {
         "#);
     // First time around we should compile both foo and bar
     assert_that(p.cargo_process("build"),
-                execs().with_stdout(&format!("{} bar v0.5.0 ({})\n\
+                execs().with_stdout(&format!("{} bar v0.5.0 ({}/bar)\n\
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, p.url(),
                                             COMPILING, p.url())));
@@ -282,7 +282,7 @@ test!(no_rebuild_dependency {
 
     p.build(); // rebuild the files (rewriting them in the process)
     assert_that(p.cargo("build"),
-                execs().with_stdout(&format!("{} bar v0.5.0 ({})\n\
+                execs().with_stdout(&format!("{} bar v0.5.0 ({}/bar)\n\
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, p.url(),
                                             COMPILING, p.url())));
@@ -337,8 +337,8 @@ test!(deep_dependencies_trigger_rebuild {
             pub fn baz() {}
         "#);
     assert_that(p.cargo_process("build"),
-                execs().with_stdout(&format!("{} baz v0.5.0 ({})\n\
-                                             {} bar v0.5.0 ({})\n\
+                execs().with_stdout(&format!("{} baz v0.5.0 ({}/baz)\n\
+                                             {} bar v0.5.0 ({}/bar)\n\
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, p.url(),
                                             COMPILING, p.url(),
@@ -355,8 +355,8 @@ test!(deep_dependencies_trigger_rebuild {
         pub fn baz() { println!("hello!"); }
     "#).unwrap();
     assert_that(p.cargo("build"),
-                execs().with_stdout(&format!("{} baz v0.5.0 ({})\n\
-                                             {} bar v0.5.0 ({})\n\
+                execs().with_stdout(&format!("{} baz v0.5.0 ({}/baz)\n\
+                                             {} bar v0.5.0 ({}/bar)\n\
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, p.url(),
                                             COMPILING, p.url(),
@@ -369,7 +369,7 @@ test!(deep_dependencies_trigger_rebuild {
         pub fn bar() { println!("hello!"); baz::baz(); }
     "#).unwrap();
     assert_that(p.cargo("build"),
-                execs().with_stdout(&format!("{} bar v0.5.0 ({})\n\
+                execs().with_stdout(&format!("{} bar v0.5.0 ({}/bar)\n\
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, p.url(),
                                             COMPILING, p.url())));
@@ -426,8 +426,8 @@ test!(no_rebuild_two_deps {
             pub fn baz() {}
         "#);
     assert_that(p.cargo_process("build"),
-                execs().with_stdout(&format!("{} baz v0.5.0 ({})\n\
-                                             {} bar v0.5.0 ({})\n\
+                execs().with_stdout(&format!("{} baz v0.5.0 ({}/baz)\n\
+                                             {} bar v0.5.0 ({}/bar)\n\
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, p.url(),
                                             COMPILING, p.url(),
@@ -473,7 +473,7 @@ test!(nested_deps_recompile {
     let bar = p.url();
 
     assert_that(p.cargo_process("build"),
-                execs().with_stdout(&format!("{} bar v0.5.0 ({})\n\
+                execs().with_stdout(&format!("{} bar v0.5.0 ({}/src/bar)\n\
                                              {} foo v0.5.0 ({})\n",
                                             COMPILING, bar,
                                             COMPILING, p.url())));
@@ -509,14 +509,16 @@ test!(error_message_for_missing_manifest {
        .file("src/bar/not-a-manifest", "");
 
     assert_that(p.cargo_process("build"),
-                execs()
-                .with_status(101)
-                .with_stderr(&format!("\
+                execs().with_status(101)
+                       .with_stderr("\
 Unable to update file://[..]
 
 Caused by:
-  Could not find `Cargo.toml` in `{}`
-", p.root().join("src").join("bar").display())));
+  failed to read `[..]bar[..]Cargo.toml`
+
+Caused by:
+  No such file or directory ([..])
+"));
 
 });
 
@@ -678,7 +680,7 @@ test!(path_dep_build_cmd {
     p.root().join("bar").move_into_the_past().unwrap();
 
     assert_that(p.cargo("build"),
-        execs().with_stdout(&format!("{} bar v0.5.0 ({})\n\
+        execs().with_stdout(&format!("{} bar v0.5.0 ({}/bar)\n\
                                      {} foo v0.5.0 ({})\n",
                                     COMPILING, p.url(),
                                     COMPILING, p.url())));
@@ -695,7 +697,7 @@ test!(path_dep_build_cmd {
     }
 
     assert_that(p.cargo("build"),
-        execs().with_stdout(&format!("{} bar v0.5.0 ({})\n\
+        execs().with_stdout(&format!("{} bar v0.5.0 ({}/bar)\n\
                                      {} foo v0.5.0 ({})\n",
                                     COMPILING, p.url(),
                                     COMPILING, p.url())));
@@ -741,8 +743,8 @@ test!(dev_deps_no_rebuild_lib {
     assert_that(p.cargo("test"),
                 execs().with_status(0)
                        .with_stdout(&format!("\
-{compiling} [..] v0.5.0 ({url})
-{compiling} [..] v0.5.0 ({url})
+{compiling} [..] v0.5.0 ({url}[..])
+{compiling} [..] v0.5.0 ({url}[..])
 {running} target[..]foo-[..]
 
 running 0 tests
index 6bbbe8c03f60632557651b67615145af61d6ec1e..537d065c3c85ec86b61e9b0fbfd37260fc115f1b 100644 (file)
@@ -264,7 +264,7 @@ test!(native_plugin_dependency_with_custom_ar_linker {
     foo.build();
     assert_that(bar.cargo_process("build").arg("--verbose"),
                 execs().with_stdout(&format!("\
-{compiling} foo v0.0.1 ({url})
+{compiling} foo v0.0.1 ([..])
 {running} `rustc [..] -C ar=nonexistent-ar -C linker=nonexistent-linker [..]`
-", compiling = COMPILING, running = RUNNING, url = bar.url())))
+", compiling = COMPILING, running = RUNNING)));
 });
index 6536c526e0d4ebd8e89a2d255154fe339b73bbe3..8c16a485ab794ee652d0991db492c483a4b20dd1 100644 (file)
@@ -602,7 +602,7 @@ test!(build_script_needed_for_host_and_target {
     assert_that(p.cargo_process("build").arg("--target").arg(&target).arg("-v"),
                 execs().with_status(0)
                        .with_stdout_contains(&format!("\
-{compiling} d1 v0.0.0 ({url})", compiling = COMPILING, url = p.url()))
+{compiling} d1 v0.0.0 ({url}/d1)", compiling = COMPILING, url = p.url()))
                        .with_stdout_contains(&format!("\
 {running} `rustc d1[..]build.rs [..] --out-dir {dir}[..]target[..]build[..]d1-[..]`",
     running = RUNNING, dir = p.root().display()))
@@ -612,7 +612,7 @@ test!(build_script_needed_for_host_and_target {
                        .with_stdout_contains(&format!("\
 {running} `rustc d1[..]src[..]lib.rs [..]`", running = RUNNING))
                        .with_stdout_contains(&format!("\
-{compiling} d2 v0.0.0 ({url})", compiling = COMPILING, url = p.url()))
+{compiling} d2 v0.0.0 ({url}/d2)", compiling = COMPILING, url = p.url()))
                        .with_stdout_contains(&format!("\
 {running} `rustc d2[..]src[..]lib.rs [..] \
            -L /path/to/{host}`", running = RUNNING, host = host))
index 4ce4996c0e99afbcb61656814c5fd6e9092ea084..a53a621202f300c9d6366337e9e88ae1cc1982c8 100644 (file)
@@ -101,8 +101,8 @@ test!(doc_deps {
 
     assert_that(p.cargo_process("doc"),
                 execs().with_status(0).with_stdout(&format!("\
-[..] bar v0.0.1 ({dir})
-[..] bar v0.0.1 ({dir})
+[..] bar v0.0.1 ({dir}/bar)
+[..] bar v0.0.1 ({dir}/bar)
 {documenting} foo v0.0.1 ({dir})
 ",
         documenting = DOCUMENTING,
@@ -148,7 +148,7 @@ test!(doc_no_deps {
 
     assert_that(p.cargo_process("doc").arg("--no-deps"),
                 execs().with_status(0).with_stdout(&format!("\
-{compiling} bar v0.0.1 ({dir})
+{compiling} bar v0.0.1 ({dir}/bar)
 {documenting} foo v0.0.1 ({dir})
 ",
         documenting = DOCUMENTING, compiling = COMPILING,
index 11211087b0bd0d050f8dbce9e400deedcfc21ef5..b7f62c2c84f4991abfaa1abdea8233d812aca80c 100644 (file)
@@ -253,7 +253,7 @@ test!(no_feature_doesnt_build {
 
     assert_that(p.cargo("build").arg("--features").arg("bar"),
                 execs().with_status(0).with_stdout(format!("\
-{compiling} bar v0.0.1 ({dir})
+{compiling} bar v0.0.1 ({dir}/bar)
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = p.url())));
     assert_that(p.process(&p.bin("foo")),
@@ -293,7 +293,7 @@ test!(default_feature_pulled_in {
 
     assert_that(p.cargo_process("build"),
                 execs().with_status(0).with_stdout(format!("\
-{compiling} bar v0.0.1 ({dir})
+{compiling} bar v0.0.1 ({dir}/bar)
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = p.url())));
     assert_that(p.process(&p.bin("foo")),
@@ -394,8 +394,8 @@ test!(groups_on_groups_on_groups {
 
     assert_that(p.cargo_process("build"),
                 execs().with_status(0).with_stdout(format!("\
-{compiling} ba[..] v0.0.1 ({dir})
-{compiling} ba[..] v0.0.1 ({dir})
+{compiling} ba[..] v0.0.1 ({dir}/ba[..])
+{compiling} ba[..] v0.0.1 ({dir}/ba[..])
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = p.url())));
 });
@@ -438,8 +438,8 @@ test!(many_cli_features {
 
     assert_that(p.cargo_process("build").arg("--features").arg("bar baz"),
                 execs().with_status(0).with_stdout(format!("\
-{compiling} ba[..] v0.0.1 ({dir})
-{compiling} ba[..] v0.0.1 ({dir})
+{compiling} ba[..] v0.0.1 ({dir}/ba[..])
+{compiling} ba[..] v0.0.1 ({dir}/ba[..])
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = p.url())));
 });
@@ -499,8 +499,8 @@ test!(union_features {
 
     assert_that(p.cargo_process("build"),
                 execs().with_status(0).with_stdout(format!("\
-{compiling} d2 v0.0.1 ({dir})
-{compiling} d1 v0.0.1 ({dir})
+{compiling} d2 v0.0.1 ({dir}/d2)
+{compiling} d1 v0.0.1 ({dir}/d1)
 {compiling} foo v0.0.1 ({dir})
 ", compiling = COMPILING, dir = p.url())));
 });
@@ -533,14 +533,14 @@ test!(many_features_no_rebuilds {
 
     assert_that(p.cargo_process("build"),
                 execs().with_status(0).with_stdout(format!("\
-{compiling} a v0.1.0 ({dir})
+{compiling} a v0.1.0 ({dir}/a)
 {compiling} b v0.1.0 ({dir})
 ", compiling = COMPILING, dir = p.url())));
     p.root().move_into_the_past().unwrap();
 
     assert_that(p.cargo("build").arg("-v"),
                 execs().with_status(0).with_stdout(format!("\
-{fresh} a v0.1.0 ([..])
+{fresh} a v0.1.0 ([..]/a)
 {fresh} b v0.1.0 ([..])
 ", fresh = FRESH)));
 });
index e56e15e9f0f1d3629cf90d67f6e6d9907ce8e9cd..247b654dde4b1f1abae0280682644354c66cad0d 100644 (file)
@@ -124,7 +124,10 @@ test!(no_crate {
 `[..]` is not a crate root; specify a crate to install [..]
 
 Caused by:
-  Could not find Cargo.toml in `[..]`
+  failed to read `[..]Cargo.toml`
+
+Caused by:
+  No such file or directory ([..])
 "));
 });
 
@@ -197,7 +200,7 @@ binary `foo[..]` already exists in destination as part of `foo v0.1.0 [..]`
 });
 
 test!(multiple_crates_error {
-    let p = project("foo")
+    let p = git::repo(&paths::root().join("foo"))
         .file("Cargo.toml", r#"
             [package]
             name = "foo"
@@ -214,14 +217,14 @@ test!(multiple_crates_error {
         .file("a/src/main.rs", "fn main() {}");
     p.build();
 
-    assert_that(cargo_process("install").arg("--path").arg(p.root()),
+    assert_that(cargo_process("install").arg("--git").arg(p.url().to_string()),
                 execs().with_status(101).with_stderr("\
 multiple packages with binaries found: bar, foo
 "));
 });
 
 test!(multiple_crates_select {
-    let p = project("foo")
+    let p = git::repo(&paths::root().join("foo"))
         .file("Cargo.toml", r#"
             [package]
             name = "foo"
@@ -238,12 +241,14 @@ test!(multiple_crates_select {
         .file("a/src/main.rs", "fn main() {}");
     p.build();
 
-    assert_that(cargo_process("install").arg("--path").arg(p.root()).arg("foo"),
+    assert_that(cargo_process("install").arg("--git").arg(p.url().to_string())
+                                        .arg("foo"),
                 execs().with_status(0));
     assert_that(cargo_home(), has_installed_exe("foo"));
     assert_that(cargo_home(), is_not(has_installed_exe("bar")));
 
-    assert_that(cargo_process("install").arg("--path").arg(p.root()).arg("bar"),
+    assert_that(cargo_process("install").arg("--git").arg(p.url().to_string())
+                                        .arg("bar"),
                 execs().with_status(0));
     assert_that(cargo_home(), has_installed_exe("bar"));
 });
@@ -541,7 +546,8 @@ test!(installs_from_cwd_by_default {
         .file("src/main.rs", "fn main() {}");
     p.build();
 
-    assert_that(cargo_process("install"), execs().with_status(0));
+    assert_that(cargo_process("install").cwd(p.root()),
+                execs().with_status(0));
     assert_that(cargo_home(), has_installed_exe("foo"));
 });
 
index 2cea29350d3d15db20ffe0ffd56e86c3be130558..072519da71123f593860a1059fd11bb081e17dc1 100644 (file)
@@ -162,11 +162,24 @@ test!(package_verbose {
     let mut cargo = ::cargo_process();
     cargo.cwd(p.root());
     assert_that(cargo.clone().arg("build"), execs().with_status(0));
-    assert_that(cargo.arg("package").arg("-v").arg("--no-verify"),
+
+    println!("package main repo");
+    assert_that(cargo.clone().arg("package").arg("-v").arg("--no-verify"),
                 execs().with_status(0).with_stdout(&format!("\
 {packaging} foo v0.0.1 ([..])
 {archiving} [..]
 {archiving} [..]
+",
+        packaging = PACKAGING,
+        archiving = ARCHIVING)));
+
+    println!("package sub-repo");
+    assert_that(cargo.arg("package").arg("-v").arg("--no-verify")
+                     .cwd(p.root().join("a")),
+                execs().with_status(0).with_stdout(&format!("\
+{packaging} a v0.0.1 ([..])
+{archiving} [..]
+{archiving} [..]
 ",
         packaging = PACKAGING,
         archiving = ARCHIVING)));
index b41d4e851d7de6aa18e887c6cb618187a2eaefa2..e8a6193cd57b86876193fb5a5c74d650e5525713 100644 (file)
@@ -78,7 +78,7 @@ test!(top_level_overrides_deps {
         .file("foo/src/lib.rs", "");
     assert_that(p.cargo_process("build").arg("-v").arg("--release"),
                 execs().with_status(0).with_stdout(&format!("\
-{compiling} foo v0.0.0 ({url})
+{compiling} foo v0.0.0 ({url}/foo)
 {running} `rustc foo{sep}src{sep}lib.rs --crate-name foo \
         --crate-type dylib --crate-type rlib -C prefer-dynamic \
         -C opt-level=1 \
index bbc531978ad3444454866d06e9ccf2de31bc2de4..0274bd8700317e255f02a45f08c8fb8d16aba48b 100644 (file)
@@ -618,7 +618,7 @@ test!(updating_a_dep {
 {updating} registry `[..]`
 {downloading} bar v0.0.1 (registry file://[..])
 {compiling} bar v0.0.1 (registry file://[..])
-{compiling} a v0.0.1 ({dir})
+{compiling} a v0.0.1 ({dir}/a)
 {compiling} foo v0.0.1 ({dir})
 ", updating = UPDATING, downloading = DOWNLOADING, compiling = COMPILING,
    dir = p.url())));
@@ -640,7 +640,7 @@ test!(updating_a_dep {
 {updating} registry `[..]`
 {downloading} bar v0.1.0 (registry file://[..])
 {compiling} bar v0.1.0 (registry file://[..])
-{compiling} a v0.0.1 ({dir})
+{compiling} a v0.0.1 ({dir}/a)
 {compiling} foo v0.0.1 ({dir})
 ", updating = UPDATING, downloading = DOWNLOADING, compiling = COMPILING,
    dir = p.url())));
index 1cb3550aaf68e6e3e7675a948057c04684394187..cd37c2ea004cf375cbf0a5bb7d78929cbb23349b 100644 (file)
@@ -332,7 +332,7 @@ test!(example_with_release_flag {
 
     assert_that(p.cargo_process("run").arg("-v").arg("--release").arg("--example").arg("a"),
                 execs().with_status(0).with_stdout(&format!("\
-{compiling} bar v0.0.1 ({url})
+{compiling} bar v0.0.1 ({url}/bar)
 {running} `rustc bar{sep}src{sep}bar.rs --crate-name bar --crate-type lib \
         -C opt-level=3 \
         -C metadata=[..] \
@@ -361,7 +361,7 @@ fast2
 
     assert_that(p.cargo("run").arg("-v").arg("--example").arg("a"),
                 execs().with_status(0).with_stdout(&format!("\
-{compiling} bar v0.0.1 ({url})
+{compiling} bar v0.0.1 ({url}/bar)
 {running} `rustc bar{sep}src{sep}bar.rs --crate-name bar --crate-type lib \
         -g \
         -C metadata=[..] \
index cda7726060bf5f412b741deba313ccf7fa580d2d..2816d92a194292f29f2b7c7c0c028f0dde267bb4 100644 (file)
@@ -249,7 +249,7 @@ test!(build_foo_with_bar_dependency {
                 execs()
                 .with_status(0)
                 .with_stdout(format!("\
-{compiling} bar v0.1.0 ({url})
+{compiling} bar v0.1.0 ([..])
 {running} `[..] -g -C [..]`
 {compiling} foo v0.0.1 ({url})
 {running} `[..] -g -Z unstable-options [..]`
@@ -292,11 +292,10 @@ test!(build_only_bar_dependency {
                 execs()
                 .with_status(0)
                 .with_stdout(format!("\
-{compiling} bar v0.1.0 ({url})
+{compiling} bar v0.1.0 ([..])
 {running} `[..]--crate-name bar --crate-type lib [..] -Z unstable-options [..]`
 ",
-                compiling = COMPILING, running = RUNNING,
-                url = foo.url())));
+                compiling = COMPILING, running = RUNNING)));
 });
 
 test!(fail_with_multiple_packages {
index 0951d831fbb6a9b8a1c915d0ff7ebf35fcd88674..8d47bf8973f474453c6f9e70d793483985d3298c 100644 (file)
@@ -89,8 +89,8 @@ test!(rustdoc_foo_with_bar_dependency {
                 execs()
                 .with_status(0)
                 .with_stdout(format!("\
-{compiling} bar v0.0.1 ({url})
-{running} `rustc {bar_dir}{sep}src{sep}lib.rs [..]`
+{compiling} bar v0.0.1 ([..])
+{running} `rustc [..]bar{sep}src{sep}lib.rs [..]`
 {documenting} foo v0.0.1 ({url})
 {running} `rustdoc src{sep}lib.rs --crate-name foo \
         -o {dir}{sep}target{sep}doc \
@@ -101,8 +101,7 @@ test!(rustdoc_foo_with_bar_dependency {
 ",
             running = RUNNING, compiling = COMPILING, sep = SEP,
             documenting = DOCUMENTING,
-            dir = foo.root().display(), url = foo.url(),
-            bar_dir = bar.root().display())));
+            dir = foo.root().display(), url = foo.url())));
 });
 
 test!(rustdoc_only_bar_dependency {
@@ -139,16 +138,15 @@ test!(rustdoc_only_bar_dependency {
                 execs()
                 .with_status(0)
                 .with_stdout(format!("\
-{documenting} bar v0.0.1 ({url})
-{running} `rustdoc {bar_dir}{sep}src{sep}lib.rs --crate-name bar \
+{documenting} bar v0.0.1 ([..])
+{running} `rustdoc [..]bar{sep}src{sep}lib.rs --crate-name bar \
         -o {dir}{sep}target{sep}doc \
         --no-defaults \
         -L dependency={dir}{sep}target{sep}debug{sep}deps \
         -L dependency={dir}{sep}target{sep}debug{sep}deps`
 ",
             running = RUNNING, documenting = DOCUMENTING, sep = SEP,
-            dir = foo.root().display(), url = foo.url(),
-            bar_dir = bar.root().display())));
+            dir = foo.root().display())));
 });
 
 
index 7fc0042d2964e4b3360c2336d9de08d007137fb0..ab5cf5f778ffbbdcec97a7a90a4959c50274b2c0 100644 (file)
@@ -82,7 +82,7 @@ test!(cargo_test_release {
 
     assert_that(p.cargo_process("test").arg("-v").arg("--release"),
                 execs().with_stdout(format!("\
-{compiling} bar v0.0.1 ({dir})
+{compiling} bar v0.0.1 ({dir}/bar)
 {running} [..] -C opt-level=3 [..]
 {compiling} foo v0.1.0 ({dir})
 {running} [..] -C opt-level=3 [..]
@@ -314,7 +314,7 @@ test!(test_with_deep_lib_dep {
     assert_that(p.cargo_process("test"),
                 execs().with_status(0)
                        .with_stdout(&format!("\
-{compiling} foo v0.0.1 ({dir})
+{compiling} foo v0.0.1 ([..])
 {compiling} bar v0.0.1 ({dir})
 {running} target[..]
 
@@ -951,7 +951,7 @@ test!(test_dylib {
     assert_that(p.cargo_process("test"),
                 execs().with_status(0)
                        .with_stdout(&format!("\
-{compiling} bar v0.0.1 ({dir})
+{compiling} bar v0.0.1 ({dir}/bar)
 {compiling} foo v0.0.1 ({dir})
 {running} target[..]foo-[..]
 
@@ -1259,7 +1259,7 @@ test!(selective_testing {
     assert_that(p.cargo("test").arg("-p").arg("d1"),
                 execs().with_status(0)
                        .with_stdout(&format!("\
-{compiling} d1 v0.0.1 ({dir})
+{compiling} d1 v0.0.1 ({dir}/d1)
 {running} target[..]d1-[..]
 
 running 0 tests
@@ -1279,7 +1279,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
     assert_that(p.cargo("test").arg("-p").arg("d2"),
                 execs().with_status(0)
                        .with_stdout(&format!("\
-{compiling} d2 v0.0.1 ({dir})
+{compiling} d2 v0.0.1 ({dir}/d2)
 {running} target[..]d2-[..]
 
 running 0 tests
@@ -1457,7 +1457,7 @@ test!(selective_testing_with_docs {
     assert_that(p.cargo("test").arg("-p").arg("d1"),
                 execs().with_status(0)
                        .with_stdout(&format!("\
-{compiling} d1 v0.0.1 ({dir})
+{compiling} d1 v0.0.1 ({dir}/d1)
 {running} target[..]deps[..]d1[..]
 
 running 0 tests