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
{{ message }}
Repository navigation
rtk cargo test -- --nocapture drops the panic message of a failing test #5063
With --nocapture the harness prints a failing test's panic directly instead of in the failures: section, and the cargo test filter keeps only the test result: line:
$ rtk cargo test -- --nocapture # crate with one failing assert_eq!(1, 2, "boom")
[full output: rtk recall …]
test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Raw cargo prints thread 'tests::fails' panicked at src/main.rs:10:26: assertion left == right failed: boom with left/right. The same happens with the t alias. Reproduced on develop 08a261a and unchanged since v1.2.0 (src/cmds/rust/cargo_cmd.rs and src/core/stream.rs have no diff since the tag). Expected: a failed run keeps the panic text of each failing test.
Activity
rtk-wshm-sync-bot commentedon Nov 10, 2026
🔍 Automated Triage
bugmediumSummary
With
--nocapture, rtk's cargo test filter drops panic/assertion details for failing tests, leaving only the summary line.📁 Relevant files
src/cmds/rust/cargo_cmd.rssrc/core/stream.rsSuggested Actions
rtk cargo test -- --nocaptureon a crate with a failing assert_eq! to confirmfailures:section, not inline panicsTriaged automatically by wshm · This is an automated analysis, not a human review.
fix(cargo): show a failed test run as printed when it shows no failur…