From 90dc0b02ae38185eee3e6490f7ff47b50297f22b Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Fri, 22 Jul 2022 18:39:26 -0400 Subject: [PATCH] Lock stdout once when listing tests --- library/test/src/console.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/test/src/console.rs b/library/test/src/console.rs index dc0123cf43266..e9dda98966de3 100644 --- a/library/test/src/console.rs +++ b/library/test/src/console.rs @@ -137,7 +137,7 @@ impl ConsoleTestState { // List the tests to console, and optionally to logfile. Filters are honored. pub fn list_tests_console(opts: &TestOpts, tests: Vec) -> io::Result<()> { let mut output = match term::stdout() { - None => OutputLocation::Raw(io::stdout()), + None => OutputLocation::Raw(io::stdout().lock()), Some(t) => OutputLocation::Pretty(t), };