You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello, when I try to use the new ctest feature, I get compilation errors if I have other tests in the tests/ directory.
How to reproduce: create example-project/tests/other.rs with the following content:
use example_project::OddCounter;#[test]fntest(){}
When I run cargo test, that integration test is compiled and runs fine, but when I run cargo ctest, I get this error:
error[E0432]: unresolved import `example_project`
--> tests/other.rs:1:5
|
1 | use example_project::OddCounter;
| ^^^^^^^^^^^^^^^ use of undeclared crate or module `example_project`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.
Error: CliError { error: Some(could not compile `example-project`
is it changing the crate name?
The text was updated successfully, but these errors were encountered:
I'll look at it now, the test reuses the context used by build, and that one does not have the rlib among its targets. Let me see if that's the problem.
It was, also I discovered that expecting all linkers to implement -l:{filename} is too strong. I ended up force-feeding the .a itself to the compiler. Hopefully that works well enough for everybody.
hello, when I try to use the new ctest feature, I get compilation errors if I have other tests in the
tests/
directory.How to reproduce: create
example-project/tests/other.rs
with the following content:When I run
cargo test
, that integration test is compiled and runs fine, but when I runcargo ctest
, I get this error:is it changing the crate name?
The text was updated successfully, but these errors were encountered: