-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Doc tests are not built with specified features #1277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The verbose output makes it clear that the cargo test --features bar --verbose
Compiling foo v0.0.1 (file:///home/andrew/foo)
Running `rustc src/lib.rs --crate-name foo --crate-type lib -g --cfg feature="bar" -C metadata=7cf71ac9a7d9fc8e -C extra-filename=-7cf71ac9a7d9fc8e --out-dir /home/andrew/foo/target --emit=dep-info,link -L dependency=/home/andrew/foo/target -L dependency=/home/andrew/foo/target/deps`
Running `rustc src/lib.rs --crate-name foo --crate-type lib -g --test --cfg feature="bar" -C metadata=d486511c73453e56 -C extra-filename=-d486511c73453e56 --out-dir /home/andrew/foo/target --emit=dep-info,link -L dependency=/home/andrew/foo/target -L dependency=/home/andrew/foo/target/deps`
Running `/home/andrew/foo/target/foo-d486511c73453e56`
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
Doc-tests foo
Running `rustdoc --test /home/andrew/foo/src/lib.rs --crate-name foo -L /home/andrew/foo/target -L /home/andrew/foo/target/deps --extern foo=/home/andrew/foo/target/libfoo-7cf71ac9a7d9fc8e.rlib`
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured |
https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_test.rs#L62-L83 doesn't contain any feature-handling code. Compare with https://github.com/rust-lang/cargo/blob/master/src/cargo/ops/cargo_rustc/mod.rs#L514-L521. |
I'm trying to fix this myself, but I don't see how to get access to the list of features without a |
You'll probably have to add a field to the |
This depends on rust-lang/rust#22131. |
This is a WIP for #1277. I would like to add a test for the new behavior in `tests/test_cargo_test.rs`, but I'm having a hard time getting the output to match. Some feedback would be great to see if this is even the right approach.
I belive this was fixed back in #1284 |
With https://github.com/apasel422/foo and
cargo 0.0.1-pre-nightly (2b9a3d6 2015-01-30 02:47:30 +0000)
The text was updated successfully, but these errors were encountered: