Skip to content

Commit

Permalink
auto merge of #410 : alexcrichton/cargo/fix-doctest-with-dep, r=wycats
Browse files Browse the repository at this point in the history
The movement of tests to the main `target` directory forgot to update a spot
where rustdoc used a -L flag.

Closes #411
  • Loading branch information
bors committed Aug 20, 2014
2 parents 02ace34 + 2ead380 commit 19b4833
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cargo/ops/cargo_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ pub fn run_tests(manifest_path: &Path,
let mut p = compile.process("rustdoc")
.arg("--test").arg(lib)
.arg("--crate-name").arg(name)
.arg("-L").arg("target/test")
.arg("-L").arg("target/test/deps")
.arg("-L").arg(&compile.root_output)
.arg("-L").arg(&compile.deps_output)
.cwd(package.get_root());

// FIXME(rust-lang/rust#16272): this should just always be passed.
Expand Down
17 changes: 13 additions & 4 deletions tests/test_cargo_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,14 @@ test!(test_with_deep_lib_dep {
[dependencies.foo]
path = "../foo"
[lib]
name = "bar"
doctest = false
"#)
.file("src/lib.rs", "
extern crate foo;
/// ```
/// bar::bar();
/// ```
pub fn bar() {}
#[test]
fn bar_test() {
foo::foo();
Expand Down Expand Up @@ -265,8 +266,16 @@ test bar_test ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
{doctest} bar
running 1 test
test bar_0 ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
",
compiling = COMPILING, running = RUNNING,
doctest = DOCTEST,
dir = p.url()).as_slice()));
})

Expand Down

0 comments on commit 19b4833

Please sign in to comment.