Skip to content

Commit 847a783

Browse files
sanchitlegalaiSanchit Sahay
authored andcommitted
Adding a note to hint --nocapture usage
1 parent fa64658 commit 847a783

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/cargo/ops/cargo_test.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -442,14 +442,9 @@ fn report_test_error(
442442
err = test_error.context(err);
443443
}
444444

445-
crate::display_error(&err, &mut ws.gctx().shell());
446-
447-
let harness: bool = unit_err.unit.target.harness();
448-
let nocapture: bool = test_args.contains(&"--nocapture");
449-
450-
if !is_simple && executed && harness && !nocapture {
451-
drop(ws.gctx().shell().note(
452-
"test exited abnormally; to see the full output pass --nocapture to the harness.",
453-
));
454-
}
445+
crate::display_error(&err, &mut ws.config().shell());
446+
drop(ws.config().shell().note(
447+
"test was terminated by the signal, stderr might be truncated, \
448+
pass `--nocapture` disable output buffering.",
449+
));
455450
}

0 commit comments

Comments
 (0)