Running/listing tests in a workspace with a root package fails
Closed this issue · 3 comments
Issue
It looks like cargo nextest list
isn't listing tests in the workspace members when a root package is present: https://doc.rust-lang.org/cargo/reference/workspaces.html#root-package, e.g. https://github.com/rouge8/test-ws-rust
Original report
I ran into the issue today. I create a simple repo to help reproducing the problem at https://github.com/tuanbass/test-ws-rust
open foo/src/lib.rs
and try to run the test.
But the fix, while necessary, still does not resolve the root cause. No more crash, but the test was not run.
The root cause seem is occurred when determined the cwd
to run cargo nextest
command for rust project with workspace enable.
When open such project, the cwd
is set to root project's path not the member's one. Hence cargo nextest
cannot found any test/test suite.
Originally posted by @tuanbass in #33 (comment)