Lock stdout once when listing tests

This commit is contained in:
Ben Kimock
2022-07-22 18:39:26 -04:00
parent d68e7ebc38
commit 90dc0b02ae
+1 -1
View File
@@ -137,7 +137,7 @@ fn current_test_count(&self) -> usize {
// List the tests to console, and optionally to logfile. Filters are honored.
pub fn list_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn>) -> io::Result<()> {
let mut output = match term::stdout() {
None => OutputLocation::Raw(io::stdout()),
None => OutputLocation::Raw(io::stdout().lock()),
Some(t) => OutputLocation::Pretty(t),
};