-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
cargo test doesn't capture print from threads #42474
Copy link
Copy link
Closed
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.P-lowLow priorityLow priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-feature-acceptedCategory: A feature request that has been accepted pending implementation.Category: A feature request that has been accepted pending implementation.P-lowLow priorityLow priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I've filed this bug in rust-lang/cargo but I'm afraid rust-lang/rust is the correct repo for this.
I ran the tests for one of my crates that uses threads in its example code. I've noticed it printed some lines to stdout, even though
--nocapturewasn't set, but not all of them. It appears that text printed from new threads are not correctly captured, I think this is not intended.Reproduce
Output
Meta
rustc --version --verbose: