about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Kimock <kimockb@gmail.com>2022-07-22 18:39:26 -0400
committerBen Kimock <kimockb@gmail.com>2022-07-22 18:39:26 -0400
commit90dc0b02ae38185eee3e6490f7ff47b50297f22b (patch)
tree4bcff031c999daa777679897562d55992061166d
parentd68e7ebc38cb42b8b237392b28045edeec761503 (diff)
downloadrust-90dc0b02ae38185eee3e6490f7ff47b50297f22b.tar.gz
rust-90dc0b02ae38185eee3e6490f7ff47b50297f22b.zip
Lock stdout once when listing tests
-rw-r--r--library/test/src/console.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/test/src/console.rs b/library/test/src/console.rs
index dc0123cf432..e9dda98966d 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<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),
     };