From 2653a93239ec1b8afe3bf2ee7b895d8e979414a3 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 18 Jul 2023 09:36:50 +0000 Subject: [PATCH 1/8] Prepare status emitters for progress bars --- src/lib.rs | 3 ++- src/status_emitter.rs | 36 ++++++++++++++++++++++++++---------- tests/integration.rs | 8 +++++++- 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 59166518..0de8405f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -215,7 +215,7 @@ pub fn run_tests_generic( args: Args, file_filter: impl Fn(&Path, &Args) -> bool + Sync, per_file_config: impl Fn(&Config, &Path) -> Option + Sync, - mut status_emitter: impl StatusEmitter + Send, + status_emitter: impl StatusEmitter + Send, ) -> Result<()> { config.fill_host_and_target()?; @@ -244,6 +244,7 @@ pub fn run_tests_generic( todo.push_back(entry.path()); } } else if file_filter(&path, &args) { + status_emitter.register_test(&path); // Forward .rs files to the test workers. submit.send(path).unwrap(); } diff --git a/src/status_emitter.rs b/src/status_emitter.rs index 3929fb8a..dadef2f8 100644 --- a/src/status_emitter.rs +++ b/src/status_emitter.rs @@ -10,10 +10,15 @@ use std::{ num::NonZeroUsize, path::Path, process::Command, + sync::atomic::{AtomicUsize, Ordering}, }; /// A generic way to handle the output of this crate. pub trait StatusEmitter: Sync { + /// Invoked the moment we know a test will later be run. + /// Useful for progress bars and such. + fn register_test(&self, path: &Path); + /// Invoked before each failed test prints its errors along with a drop guard that can /// gets invoked afterwards. fn failed_test<'a>( @@ -25,7 +30,7 @@ pub trait StatusEmitter: Sync { ) -> Box; /// A test has finished, handle the result immediately. - fn test_result(&mut self, _path: &Path, _revision: &str, _result: &TestResult) {} + fn test_result(&self, _path: &Path, _revision: &str, _result: &TestResult) {} /// Create a report about the entire test run at the end. #[allow(clippy::type_complexity)] @@ -50,7 +55,7 @@ impl Summary for () {} pub struct Text { /// In case of `Some`, the `usize` is the number of tests /// that were already executed. - quiet: Option, + quiet: Option, } impl Text { @@ -60,11 +65,14 @@ impl Text { } /// Print one `.` per test that gets run. pub fn quiet() -> Self { - Self { quiet: Some(0) } + Self { + quiet: Some(AtomicUsize::new(0)), + } } } impl StatusEmitter for Text { + fn register_test(&self, _path: &Path) {} fn failed_test<'a>( &self, revision: &str, @@ -99,17 +107,17 @@ impl StatusEmitter for Text { Box::new(Guard(stderr)) } - fn test_result(&mut self, path: &Path, revision: &str, result: &TestResult) { - if let Some(n) = &mut self.quiet { + fn test_result(&self, path: &Path, revision: &str, result: &TestResult) { + if let Some(n) = &self.quiet { // Humans start counting at 1 - *n += 1; + let n = n.fetch_add(1, Ordering::Release); match result { TestResult::Ok => eprint!("{}", ".".green()), TestResult::Errored { .. } => eprint!("{}", "F".red().bold()), TestResult::Ignored => eprint!("{}", "i".yellow()), TestResult::Filtered => {} } - if *n % 100 == 0 { + if (n + 1) % 100 == 0 { eprintln!(" {}", n); } } else { @@ -439,6 +447,7 @@ pub struct Gha { } impl StatusEmitter for Gha { + fn register_test(&self, _path: &Path) {} fn failed_test( &self, revision: &str, @@ -456,7 +465,7 @@ impl StatusEmitter for Gha { } } - fn test_result(&mut self, _path: &Path, _revision: &str, _result: &TestResult) {} + fn test_result(&self, _path: &Path, _revision: &str, _result: &TestResult) {} fn finalize( &self, @@ -520,6 +529,10 @@ impl StatusEmitter for Gha { } impl StatusEmitter for (T, U) { + fn register_test(&self, path: &Path) { + self.0.register_test(path); + self.1.register_test(path); + } fn failed_test<'a>( &'a self, revision: &'a str, @@ -533,7 +546,7 @@ impl StatusEmitter for (T, U) { )) } - fn test_result(&mut self, path: &Path, revision: &str, result: &TestResult) { + fn test_result(&self, path: &Path, revision: &str, result: &TestResult) { self.0.test_result(path, revision, result); self.1.test_result(path, revision, result); } @@ -553,6 +566,9 @@ impl StatusEmitter for (T, U) { } impl StatusEmitter for Box { + fn register_test(&self, path: &Path) { + (**self).register_test(path); + } fn failed_test<'a>( &'a self, revision: &'a str, @@ -563,7 +579,7 @@ impl StatusEmitter for Box { (**self).failed_test(revision, path, cmd, stderr) } - fn test_result(&mut self, path: &Path, revision: &str, result: &TestResult) { + fn test_result(&self, path: &Path, revision: &str, result: &TestResult) { (**self).test_result(path, revision, result); } diff --git a/tests/integration.rs b/tests/integration.rs index 13bdb1fa..1041781e 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -79,6 +79,12 @@ fn run(name: &str, mode: Mode) -> Result<()> { config.stderr_filter("program not found", "No such file or directory"); config.stderr_filter(" \\(os error [0-9]+\\)", ""); + let text = if args.quiet { + ui_test::status_emitter::Text::quiet() + } else { + ui_test::status_emitter::Text::verbose() + }; + run_tests_generic( config, args, @@ -109,7 +115,7 @@ fn run(name: &str, mode: Mode) -> Result<()> { }, |_, _| None, ( - ui_test::status_emitter::Text::verbose(), + text, ui_test::status_emitter::Gha:: { name: format!("{mode:?}"), }, From 1e43b31d73e9b3ed36413b38036b8e21b4b5d336 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 18 Jul 2023 11:22:11 +0000 Subject: [PATCH 2/8] Refactor status tracking to have one structure per test --- src/lib.rs | 49 +++---- src/status_emitter.rs | 314 +++++++++++++++++++++++++++--------------- 2 files changed, 223 insertions(+), 140 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0de8405f..6a789c53 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,7 +17,7 @@ use lazy_static::lazy_static; use parser::{ErrorMatch, MaybeWithLine, OptWithLine, Revisioned, WithLine}; use regex::bytes::{Captures, Regex}; use rustc_stderr::{Diagnostics, Level, Message}; -use status_emitter::StatusEmitter; +use status_emitter::{StatusEmitter, TestStatus}; use std::borrow::Cow; use std::collections::{HashSet, VecDeque}; use std::num::NonZeroUsize; @@ -205,8 +205,7 @@ pub enum TestResult { struct TestRun { result: TestResult, - path: PathBuf, - revision: String, + status: Box, } /// A version of `run_tests` that allows more fine-grained control over running tests. @@ -244,23 +243,25 @@ pub fn run_tests_generic( todo.push_back(entry.path()); } } else if file_filter(&path, &args) { - status_emitter.register_test(&path); + let status = status_emitter.register_test(path); // Forward .rs files to the test workers. - submit.send(path).unwrap(); + submit.send(status).unwrap(); } } }, |receive, finished_files_sender| -> Result<()> { - for path in receive { + for status in receive { + let path = status.path(); let maybe_config; - let config = match per_file_config(&config, &path) { + let config = match per_file_config(&config, path) { None => &config, Some(config) => { maybe_config = config; &maybe_config } }; - let result = match std::panic::catch_unwind(|| parse_and_test_file(&path, config)) { + let result = match std::panic::catch_unwind(|| parse_and_test_file(&status, config)) + { Ok(res) => res, Err(err) => { finished_files_sender.send(TestRun { @@ -274,8 +275,7 @@ pub fn run_tests_generic( )], stderr: vec![], }, - path, - revision: String::new(), + status, })?; continue; } @@ -288,7 +288,7 @@ pub fn run_tests_generic( }, |finished_files_recv| { for run in finished_files_recv { - status_emitter.test_result(&run.path, &run.revision, &run.result); + run.status.done(&run.result); results.push(run); } @@ -309,14 +309,14 @@ pub fn run_tests_generic( command, errors, stderr, - } => failures.push((run.path, command, run.revision, errors, stderr)), + } => failures.push((run.status, command, errors, stderr)), } } let mut failure_emitter = status_emitter.finalize(failures.len(), succeeded, ignored, filtered); - for (path, command, revision, errors, stderr) in &failures { - let _guard = status_emitter.failed_test(revision, path, command, stderr); - failure_emitter.test_failure(path, revision, errors); + for (status, command, errors, stderr) in &failures { + let _guard = status.failed_test(command, stderr); + failure_emitter.test_failure(status, errors); } if failures.is_empty() { @@ -363,8 +363,8 @@ pub fn run_and_collect( }) } -fn parse_and_test_file(path: &Path, config: &Config) -> Vec { - let comments = match parse_comments_in_file(path) { +fn parse_and_test_file(status: &dyn TestStatus, config: &Config) -> Vec { + let comments = match parse_comments_in_file(status.path()) { Ok(comments) => comments, Err((stderr, errors)) => { return vec![TestRun { @@ -373,8 +373,7 @@ fn parse_and_test_file(path: &Path, config: &Config) -> Vec { errors, stderr, }, - path: path.into(), - revision: "".into(), + status: status.for_revision(""), }] } }; @@ -385,15 +384,15 @@ fn parse_and_test_file(path: &Path, config: &Config) -> Vec { .unwrap_or_else(|| vec![String::new()]) .into_iter() .map(|revision| { + let status = status.for_revision(&revision); // Ignore file if only/ignore rules do (not) apply if !test_file_conditions(&comments, config, &revision) { return TestRun { result: TestResult::Ignored, - path: path.into(), - revision, + status, }; } - let (command, errors, stderr) = run_test(path, config, &revision, &comments); + let (command, errors, stderr) = run_test(status.path(), config, &revision, &comments); let result = if errors.is_empty() { TestResult::Ok } else { @@ -403,11 +402,7 @@ fn parse_and_test_file(path: &Path, config: &Config) -> Vec { stderr, } }; - TestRun { - result, - revision, - path: path.into(), - } + TestRun { result, status } }) .collect() } diff --git a/src/status_emitter.rs b/src/status_emitter.rs index dadef2f8..9ee22b45 100644 --- a/src/status_emitter.rs +++ b/src/status_emitter.rs @@ -8,29 +8,20 @@ use std::{ fmt::{Debug, Write as _}, io::Write as _, num::NonZeroUsize, - path::Path, + panic::RefUnwindSafe, + path::{Path, PathBuf}, process::Command, - sync::atomic::{AtomicUsize, Ordering}, + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc, + }, }; /// A generic way to handle the output of this crate. pub trait StatusEmitter: Sync { /// Invoked the moment we know a test will later be run. /// Useful for progress bars and such. - fn register_test(&self, path: &Path); - - /// Invoked before each failed test prints its errors along with a drop guard that can - /// gets invoked afterwards. - fn failed_test<'a>( - &'a self, - revision: &'a str, - path: &'a Path, - cmd: &'a Command, - stderr: &'a [u8], - ) -> Box; - - /// A test has finished, handle the result immediately. - fn test_result(&self, _path: &Path, _revision: &str, _result: &TestResult) {} + fn register_test(&self, path: PathBuf) -> Box; /// Create a report about the entire test run at the end. #[allow(clippy::type_complexity)] @@ -43,10 +34,29 @@ pub trait StatusEmitter: Sync { ) -> Box; } +/// Information about a specific test run. +pub trait TestStatus: Send + Sync + RefUnwindSafe { + /// Create a copy of this test for a new revision. + fn for_revision(&self, revision: &str) -> Box; + + /// Invoked before each failed test prints its errors along with a drop guard that can + /// gets invoked afterwards. + fn failed_test<'a>(&'a self, cmd: &'a Command, stderr: &'a [u8]) -> Box; + + /// A test has finished, handle the result immediately. + fn done(&self, _result: &TestResult) {} + + /// The path of the test file. + fn path(&self) -> &Path; + + /// The revision, usually an empty string. + fn revision(&self) -> &str; +} + /// Report a summary at the end of a test run. pub trait Summary { /// A test has finished, handle the result. - fn test_failure(&mut self, _path: &Path, _revision: &str, _errors: &Errors) {} + fn test_failure(&mut self, _status: &dyn TestStatus, _errors: &Errors) {} } impl Summary for () {} @@ -55,7 +65,7 @@ impl Summary for () {} pub struct Text { /// In case of `Some`, the `usize` is the number of tests /// that were already executed. - quiet: Option, + quiet: Option>, } impl Text { @@ -66,48 +76,19 @@ impl Text { /// Print one `.` per test that gets run. pub fn quiet() -> Self { Self { - quiet: Some(AtomicUsize::new(0)), + quiet: Some(Arc::new(AtomicUsize::new(0))), } } } -impl StatusEmitter for Text { - fn register_test(&self, _path: &Path) {} - fn failed_test<'a>( - &self, - revision: &str, - path: &Path, - cmd: &Command, - stderr: &'a [u8], - ) -> Box { - eprintln!(); - let path = path.display().to_string(); - eprint!("{}", path.underline().bold()); - let revision = if revision.is_empty() { - String::new() - } else { - format!(" (revision `{revision}`)") - }; - eprint!("{revision}"); - eprint!(" {}", "FAILED:".red().bold()); - eprintln!(); - eprintln!("command: {cmd:?}"); - eprintln!(); - - #[derive(Debug)] - struct Guard<'a>(&'a [u8]); - impl<'a> Drop for Guard<'a> { - fn drop(&mut self) { - eprintln!("full stderr:"); - std::io::stderr().write_all(self.0).unwrap(); - eprintln!(); - eprintln!(); - } - } - Box::new(Guard(stderr)) - } +struct TextTest { + quiet: Option>, + path: PathBuf, + revision: String, +} - fn test_result(&self, path: &Path, revision: &str, result: &TestResult) { +impl TestStatus for TextTest { + fn done(&self, result: &TestResult) { if let Some(n) = &self.quiet { // Humans start counting at 1 let n = n.fetch_add(1, Ordering::Release); @@ -129,17 +110,72 @@ impl StatusEmitter for Text { }; eprint!( "{}{} ... ", - path.display(), - if revision.is_empty() { + self.path.display(), + if self.revision.is_empty() { "".into() } else { - format!(" ({revision})") + format!(" ({})", self.revision) } ); eprintln!("{result}"); } } + fn failed_test<'a>(&self, cmd: &Command, stderr: &'a [u8]) -> Box { + eprintln!(); + let path = self.path.display().to_string(); + eprint!("{}", path.underline().bold()); + let revision = if self.revision.is_empty() { + String::new() + } else { + format!(" (revision `{}`)", self.revision) + }; + eprint!("{revision}"); + eprint!(" {}", "FAILED:".red().bold()); + eprintln!(); + eprintln!("command: {cmd:?}"); + eprintln!(); + + #[derive(Debug)] + struct Guard<'a>(&'a [u8]); + impl<'a> Drop for Guard<'a> { + fn drop(&mut self) { + eprintln!("full stderr:"); + std::io::stderr().write_all(self.0).unwrap(); + eprintln!(); + eprintln!(); + } + } + Box::new(Guard(stderr)) + } + + fn path(&self) -> &Path { + &self.path + } + + fn for_revision(&self, revision: &str) -> Box { + assert_eq!(self.revision, ""); + Box::new(Self { + quiet: self.quiet.clone(), + path: self.path.clone(), + revision: revision.to_owned(), + }) + } + + fn revision(&self) -> &str { + &self.revision + } +} + +impl StatusEmitter for Text { + fn register_test(&self, path: PathBuf) -> Box { + Box::new(TextTest { + quiet: self.quiet.clone(), + path, + revision: String::new(), + }) + } + fn finalize( &self, failures: usize, @@ -168,15 +204,19 @@ impl StatusEmitter for Text { } impl Summary for Summarizer { - fn test_failure(&mut self, path: &Path, revision: &str, errors: &Errors) { + fn test_failure(&mut self, status: &dyn TestStatus, errors: &Errors) { for error in errors { - print_error(error, &path.display().to_string()); + print_error(error, &status.path().display().to_string()); } - self.failures.push(if revision.is_empty() { - format!(" {}", path.display()) + self.failures.push(if status.revision().is_empty() { + format!(" {}", status.path().display()) } else { - format!(" {} (revision {revision})", path.display()) + format!( + " {} (revision {})", + status.path().display(), + status.revision() + ) }); } } @@ -446,26 +486,49 @@ pub struct Gha { pub name: String, } -impl StatusEmitter for Gha { - fn register_test(&self, _path: &Path) {} - fn failed_test( - &self, - revision: &str, - path: &Path, - _cmd: &Command, - _stderr: &[u8], - ) -> Box { +#[derive(Clone)] +struct PathAndRev { + path: PathBuf, + revision: String, +} + +impl TestStatus for PathAndRev { + fn path(&self) -> &Path { + &self.path + } + + fn for_revision(&self, revision: &str) -> Box { + assert_eq!(self.revision, ""); + Box::new(Self { + path: self.path.clone(), + revision: revision.to_owned(), + }) + } + + fn failed_test(&self, _cmd: &Command, _stderr: &[u8]) -> Box { if GROUP { Box::new(github_actions::group(format_args!( - "{}:{revision}", - path.display() + "{}:{}", + self.path.display(), + self.revision ))) } else { Box::new(()) } } - fn test_result(&self, _path: &Path, _revision: &str, _result: &TestResult) {} + fn revision(&self) -> &str { + &self.revision + } +} + +impl StatusEmitter for Gha { + fn register_test(&self, path: PathBuf) -> Box { + Box::new(PathAndRev:: { + path, + revision: String::new(), + }) + } fn finalize( &self, @@ -483,16 +546,17 @@ impl StatusEmitter for Gha { } impl Summary for Summarizer { - fn test_failure(&mut self, path: &Path, revision: &str, errors: &Errors) { - let revision = if revision.is_empty() { + fn test_failure(&mut self, status: &dyn TestStatus, errors: &Errors) { + let revision = if status.revision().is_empty() { "".to_string() } else { - format!(" (revision: {revision})") + format!(" (revision: {})", status.revision()) }; for error in errors { - gha_error(error, &path.display().to_string(), &revision); + gha_error(error, &status.path().display().to_string(), &revision); } - self.failures.push(format!("{}{revision}", path.display())); + self.failures + .push(format!("{}{revision}", status.path().display())); } } impl Drop for Summarizer { @@ -528,27 +592,42 @@ impl StatusEmitter for Gha { } } -impl StatusEmitter for (T, U) { - fn register_test(&self, path: &Path) { - self.0.register_test(path); - self.1.register_test(path); - } - fn failed_test<'a>( - &'a self, - revision: &'a str, - path: &'a Path, - cmd: &'a Command, - stderr: &'a [u8], - ) -> Box { +impl TestStatus for (T, U) { + fn done(&self, result: &TestResult) { + self.0.done(result); + self.1.done(result); + } + + fn failed_test<'a>(&'a self, cmd: &'a Command, stderr: &'a [u8]) -> Box { Box::new(( - self.0.failed_test(revision, path, cmd, stderr), - self.1.failed_test(revision, path, cmd, stderr), + self.0.failed_test(cmd, stderr), + self.1.failed_test(cmd, stderr), )) } - fn test_result(&self, path: &Path, revision: &str, result: &TestResult) { - self.0.test_result(path, revision, result); - self.1.test_result(path, revision, result); + fn path(&self) -> &Path { + let path = self.0.path(); + assert_eq!(path, self.1.path()); + path + } + + fn revision(&self) -> &str { + let rev = self.0.revision(); + assert_eq!(rev, self.1.revision()); + rev + } + + fn for_revision(&self, revision: &str) -> Box { + Box::new((self.0.for_revision(revision), self.1.for_revision(revision))) + } +} + +impl StatusEmitter for (T, U) { + fn register_test(&self, path: PathBuf) -> Box { + Box::new(( + self.0.register_test(path.clone()), + self.1.register_test(path), + )) } fn finalize( @@ -565,22 +644,31 @@ impl StatusEmitter for (T, U) { } } -impl StatusEmitter for Box { - fn register_test(&self, path: &Path) { - (**self).register_test(path); +impl TestStatus for Box { + fn done(&self, result: &TestResult) { + (**self).done(result); + } + + fn path(&self) -> &Path { + (**self).path() } - fn failed_test<'a>( - &'a self, - revision: &'a str, - path: &'a Path, - cmd: &'a Command, - stderr: &'a [u8], - ) -> Box { - (**self).failed_test(revision, path, cmd, stderr) + + fn revision(&self) -> &str { + (**self).revision() + } + + fn for_revision(&self, revision: &str) -> Box { + (**self).for_revision(revision) } - fn test_result(&self, path: &Path, revision: &str, result: &TestResult) { - (**self).test_result(path, revision, result); + fn failed_test<'a>(&'a self, cmd: &'a Command, stderr: &'a [u8]) -> Box { + (**self).failed_test(cmd, stderr) + } +} + +impl StatusEmitter for Box { + fn register_test(&self, path: PathBuf) -> Box { + (**self).register_test(path) } fn finalize( @@ -595,8 +683,8 @@ impl StatusEmitter for Box { } impl Summary for (Box, Box) { - fn test_failure(&mut self, path: &Path, revision: &str, errors: &Errors) { - self.0.test_failure(path, revision, errors); - self.1.test_failure(path, revision, errors); + fn test_failure(&mut self, status: &dyn TestStatus, errors: &Errors) { + self.0.test_failure(status, errors); + self.1.test_failure(status, errors); } } From c4799e85c781a037bfcbbaff01251478e8f30e77 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 18 Jul 2023 13:40:33 +0000 Subject: [PATCH 3/8] Add progress bars --- Cargo.lock | 147 +++++++++++++++--- Cargo.toml | 1 + src/lib.rs | 15 +- src/status_emitter.rs | 92 +++++++---- tests/integrations/basic-bin/Cargo.lock | 147 +++++++++++++++--- tests/integrations/basic-fail-mode/Cargo.lock | 147 +++++++++++++++--- tests/integrations/basic-fail/Cargo.lock | 147 +++++++++++++++--- tests/integrations/basic/Cargo.lock | 147 +++++++++++++++--- 8 files changed, 715 insertions(+), 128 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eb00f5e5..55f179cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,7 +71,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -81,7 +81,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -286,7 +286,7 @@ checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ "is-terminal", "lazy_static", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -295,6 +295,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335" +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode 0.3.6", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -362,6 +375,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d9d8664cf849d7d0f3114a3a387d2f5e4303176d746d5a951aaddc66dfe9240" +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -376,7 +395,7 @@ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -461,6 +480,19 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +[[package]] +name = "indicatif" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "instant" version = "0.1.12" @@ -478,7 +510,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.2", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -489,7 +521,7 @@ checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", "rustix 0.38.4", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -543,6 +575,12 @@ dependencies = [ "adler", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" version = "0.31.1" @@ -579,6 +617,12 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +[[package]] +name = "portable-atomic" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" + [[package]] name = "prettydiff" version = "0.6.4" @@ -598,7 +642,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" dependencies = [ "csv", - "encode_unicode", + "encode_unicode 1.0.0", "is-terminal", "lazy_static", "term", @@ -743,7 +787,7 @@ dependencies = [ "io-lifetimes", "libc", "linux-raw-sys 0.3.8", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -756,7 +800,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.3", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -889,7 +933,7 @@ dependencies = [ "fastrand", "redox_syscall 0.3.5", "rustix 0.37.23", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -998,6 +1042,7 @@ dependencies = [ "comma", "crossbeam-channel", "distance", + "indicatif", "lazy_static", "prettydiff", "regex", @@ -1078,13 +1123,37 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1093,51 +1162,93 @@ version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.0" diff --git a/Cargo.toml b/Cargo.toml index 0ddf2c3b..1c73ca94 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ comma = "1.0.0" distance = "0.4.0" clap = { version = "4.3.11", features = ["derive"] } anyhow = "1.0.6" +indicatif = "0.17.5" prettydiff = "0.6.4" [dependencies.regex] diff --git a/src/lib.rs b/src/lib.rs index 6a789c53..398d66b4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -119,16 +119,18 @@ pub fn run_tests(config: Config) -> Result<()> { let name = config.root_dir.display().to_string(); let args = Args::parse(); + let text = if args.quiet { + status_emitter::Text::quiet() + } else { + status_emitter::Text::verbose() + }; run_tests_generic( config, args, default_file_filter, default_per_file_config, - ( - status_emitter::Text::verbose(), - status_emitter::Gha:: { name }, - ), + (text, status_emitter::Gha:: { name }), ) } @@ -378,10 +380,11 @@ fn parse_and_test_file(status: &dyn TestStatus, config: &Config) -> Vec } }; // Run the test for all revisions - comments + let revisions = comments .revisions .clone() - .unwrap_or_else(|| vec![String::new()]) + .unwrap_or_else(|| vec![String::new()]); + revisions .into_iter() .map(|revision| { let status = status.for_revision(&revision); diff --git a/src/status_emitter.rs b/src/status_emitter.rs index 9ee22b45..76673429 100644 --- a/src/status_emitter.rs +++ b/src/status_emitter.rs @@ -2,6 +2,7 @@ use bstr::ByteSlice; use colored::Colorize; +use indicatif::{MultiProgress, ProgressBar, ProgressDrawTarget}; use crate::{github_actions, parser::Pattern, rustc_stderr::Message, Error, Errors, TestResult}; use std::{ @@ -11,10 +12,7 @@ use std::{ panic::RefUnwindSafe, path::{Path, PathBuf}, process::Command, - sync::{ - atomic::{AtomicUsize, Ordering}, - Arc, - }, + time::Duration, }; /// A generic way to handle the output of this crate. @@ -62,45 +60,57 @@ pub trait Summary { impl Summary for () {} /// A human readable output emitter. +#[derive(Clone)] pub struct Text { - /// In case of `Some`, the `usize` is the number of tests - /// that were already executed. - quiet: Option>, + all: MultiProgress, + progress: Option, } impl Text { /// Print one line per test that gets run. pub fn verbose() -> Self { - Self { quiet: None } + Self { + all: MultiProgress::new(), + progress: None, + } } - /// Print one `.` per test that gets run. + /// Print a progress bar. pub fn quiet() -> Self { + let all = MultiProgress::new(); + let progress = ProgressBar::new(0); + all.add(progress.clone()); Self { - quiet: Some(Arc::new(AtomicUsize::new(0))), + all, + progress: Some(progress), } } } +#[derive(Clone)] struct TextTest { - quiet: Option>, + text: Text, path: PathBuf, revision: String, + spinner: ProgressBar, +} + +fn spinner(path: &Path, revision: &str, all: &MultiProgress) -> ProgressBar { + let msg = if revision.is_empty() { + path.display().to_string() + } else { + format!("{} ({revision})", path.display()) + }; + let spinner = ProgressBar::new_spinner().with_message(msg); + spinner.enable_steady_tick(Duration::from_millis(100)); + all.add(spinner.clone()); + spinner } impl TestStatus for TextTest { fn done(&self, result: &TestResult) { - if let Some(n) = &self.quiet { - // Humans start counting at 1 - let n = n.fetch_add(1, Ordering::Release); - match result { - TestResult::Ok => eprint!("{}", ".".green()), - TestResult::Errored { .. } => eprint!("{}", "F".red().bold()), - TestResult::Ignored => eprint!("{}", "i".yellow()), - TestResult::Filtered => {} - } - if (n + 1) % 100 == 0 { - eprintln!(" {}", n); - } + if let Some(progress) = &self.text.progress { + progress.inc(1); + self.spinner.finish_and_clear(); } else { let result = match result { TestResult::Ok => "ok".green(), @@ -108,8 +118,8 @@ impl TestStatus for TextTest { TestResult::Ignored => "ignored (in-test comment)".yellow(), TestResult::Filtered => return, }; - eprint!( - "{}{} ... ", + let msg = format!( + "{}{} ... {result}", self.path.display(), if self.revision.is_empty() { "".into() @@ -117,7 +127,11 @@ impl TestStatus for TextTest { format!(" ({})", self.revision) } ); - eprintln!("{result}"); + if ProgressDrawTarget::stderr().is_hidden() { + eprintln!("{msg}"); + } else { + self.spinner.finish_with_message(msg); + } } } @@ -155,11 +169,20 @@ impl TestStatus for TextTest { fn for_revision(&self, revision: &str) -> Box { assert_eq!(self.revision, ""); - Box::new(Self { - quiet: self.quiet.clone(), - path: self.path.clone(), - revision: revision.to_owned(), - }) + if revision.is_empty() { + Box::new(self.clone()) + } else { + if let Some(progress) = &self.text.progress { + progress.inc_length(1); + } + let spinner = spinner(&self.path, &self.revision, &self.text.all); + Box::new(Self { + text: self.text.clone(), + path: self.path.clone(), + revision: revision.to_owned(), + spinner, + }) + } } fn revision(&self) -> &str { @@ -169,8 +192,13 @@ impl TestStatus for TextTest { impl StatusEmitter for Text { fn register_test(&self, path: PathBuf) -> Box { + if let Some(progress) = &self.progress { + progress.inc_length(1); + } + let spinner = spinner(&path, "", &self.all); Box::new(TextTest { - quiet: self.quiet.clone(), + text: self.clone(), + spinner, path, revision: String::new(), }) diff --git a/tests/integrations/basic-bin/Cargo.lock b/tests/integrations/basic-bin/Cargo.lock index 546bab0a..8ba2c25c 100644 --- a/tests/integrations/basic-bin/Cargo.lock +++ b/tests/integrations/basic-bin/Cargo.lock @@ -71,7 +71,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -81,7 +81,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -294,7 +294,7 @@ checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ "is-terminal", "lazy_static", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -303,6 +303,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335" +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode 0.3.6", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -370,6 +383,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d9d8664cf849d7d0f3114a3a387d2f5e4303176d746d5a951aaddc66dfe9240" +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -384,7 +403,7 @@ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -469,6 +488,19 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +[[package]] +name = "indicatif" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "instant" version = "0.1.12" @@ -486,7 +518,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.2", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -497,7 +529,7 @@ checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", "rustix 0.38.4", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -551,6 +583,12 @@ dependencies = [ "adler", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" version = "0.31.1" @@ -587,6 +625,12 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +[[package]] +name = "portable-atomic" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" + [[package]] name = "prettydiff" version = "0.6.4" @@ -606,7 +650,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" dependencies = [ "csv", - "encode_unicode", + "encode_unicode 1.0.0", "is-terminal", "lazy_static", "term", @@ -751,7 +795,7 @@ dependencies = [ "io-lifetimes", "libc", "linux-raw-sys 0.3.8", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -764,7 +808,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.3", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -897,7 +941,7 @@ dependencies = [ "fastrand", "redox_syscall 0.3.5", "rustix 0.37.23", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1006,6 +1050,7 @@ dependencies = [ "comma", "crossbeam-channel", "distance", + "indicatif", "lazy_static", "prettydiff", "regex", @@ -1086,13 +1131,37 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1101,51 +1170,93 @@ version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.0" diff --git a/tests/integrations/basic-fail-mode/Cargo.lock b/tests/integrations/basic-fail-mode/Cargo.lock index 84df8b6f..d6cc7d01 100644 --- a/tests/integrations/basic-fail-mode/Cargo.lock +++ b/tests/integrations/basic-fail-mode/Cargo.lock @@ -71,7 +71,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -81,7 +81,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -294,7 +294,7 @@ checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ "is-terminal", "lazy_static", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -303,6 +303,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335" +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode 0.3.6", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -370,6 +383,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d9d8664cf849d7d0f3114a3a387d2f5e4303176d746d5a951aaddc66dfe9240" +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -384,7 +403,7 @@ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -469,6 +488,19 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +[[package]] +name = "indicatif" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "instant" version = "0.1.12" @@ -486,7 +518,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.2", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -497,7 +529,7 @@ checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", "rustix 0.38.4", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -551,6 +583,12 @@ dependencies = [ "adler", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" version = "0.31.1" @@ -587,6 +625,12 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +[[package]] +name = "portable-atomic" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" + [[package]] name = "prettydiff" version = "0.6.4" @@ -606,7 +650,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" dependencies = [ "csv", - "encode_unicode", + "encode_unicode 1.0.0", "is-terminal", "lazy_static", "term", @@ -751,7 +795,7 @@ dependencies = [ "io-lifetimes", "libc", "linux-raw-sys 0.3.8", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -764,7 +808,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.3", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -897,7 +941,7 @@ dependencies = [ "fastrand", "redox_syscall 0.3.5", "rustix 0.37.23", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1006,6 +1050,7 @@ dependencies = [ "comma", "crossbeam-channel", "distance", + "indicatif", "lazy_static", "prettydiff", "regex", @@ -1086,13 +1131,37 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1101,51 +1170,93 @@ version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.0" diff --git a/tests/integrations/basic-fail/Cargo.lock b/tests/integrations/basic-fail/Cargo.lock index 72736d76..604af000 100644 --- a/tests/integrations/basic-fail/Cargo.lock +++ b/tests/integrations/basic-fail/Cargo.lock @@ -71,7 +71,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -81,7 +81,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -294,7 +294,7 @@ checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ "is-terminal", "lazy_static", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -303,6 +303,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335" +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode 0.3.6", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -370,6 +383,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d9d8664cf849d7d0f3114a3a387d2f5e4303176d746d5a951aaddc66dfe9240" +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -384,7 +403,7 @@ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -469,6 +488,19 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +[[package]] +name = "indicatif" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "instant" version = "0.1.12" @@ -486,7 +518,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.2", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -497,7 +529,7 @@ checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", "rustix 0.38.4", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -551,6 +583,12 @@ dependencies = [ "adler", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" version = "0.31.1" @@ -587,6 +625,12 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +[[package]] +name = "portable-atomic" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" + [[package]] name = "prettydiff" version = "0.6.4" @@ -606,7 +650,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" dependencies = [ "csv", - "encode_unicode", + "encode_unicode 1.0.0", "is-terminal", "lazy_static", "term", @@ -751,7 +795,7 @@ dependencies = [ "io-lifetimes", "libc", "linux-raw-sys 0.3.8", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -764,7 +808,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.3", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -897,7 +941,7 @@ dependencies = [ "fastrand", "redox_syscall 0.3.5", "rustix 0.37.23", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1006,6 +1050,7 @@ dependencies = [ "comma", "crossbeam-channel", "distance", + "indicatif", "lazy_static", "prettydiff", "regex", @@ -1086,13 +1131,37 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1101,51 +1170,93 @@ version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.0" diff --git a/tests/integrations/basic/Cargo.lock b/tests/integrations/basic/Cargo.lock index 44444e4a..2a48b73d 100644 --- a/tests/integrations/basic/Cargo.lock +++ b/tests/integrations/basic/Cargo.lock @@ -71,7 +71,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -81,7 +81,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -294,7 +294,7 @@ checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ "is-terminal", "lazy_static", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -303,6 +303,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335" +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode 0.3.6", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + [[package]] name = "crossbeam-channel" version = "0.5.8" @@ -370,6 +383,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d9d8664cf849d7d0f3114a3a387d2f5e4303176d746d5a951aaddc66dfe9240" +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -384,7 +403,7 @@ checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -469,6 +488,19 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +[[package]] +name = "indicatif" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "instant" version = "0.1.12" @@ -486,7 +518,7 @@ checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ "hermit-abi 0.3.2", "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -497,7 +529,7 @@ checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", "rustix 0.38.4", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -551,6 +583,12 @@ dependencies = [ "adler", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" version = "0.31.1" @@ -587,6 +625,12 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +[[package]] +name = "portable-atomic" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edc55135a600d700580e406b4de0d59cb9ad25e344a3a091a97ded2622ec4ec6" + [[package]] name = "prettydiff" version = "0.6.4" @@ -606,7 +650,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eea25e07510aa6ab6547308ebe3c036016d162b8da920dbb079e3ba8acf3d95a" dependencies = [ "csv", - "encode_unicode", + "encode_unicode 1.0.0", "is-terminal", "lazy_static", "term", @@ -751,7 +795,7 @@ dependencies = [ "io-lifetimes", "libc", "linux-raw-sys 0.3.8", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -764,7 +808,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.3", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -897,7 +941,7 @@ dependencies = [ "fastrand", "redox_syscall 0.3.5", "rustix 0.37.23", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1006,6 +1050,7 @@ dependencies = [ "comma", "crossbeam-channel", "distance", + "indicatif", "lazy_static", "prettydiff", "regex", @@ -1086,13 +1131,37 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets", + "windows-targets 0.48.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -1101,51 +1170,93 @@ version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.0" From 2b46bbc56fc19e8c6b9874ca53ad0562d6df1718 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 18 Jul 2023 15:34:01 +0000 Subject: [PATCH 4/8] Don't treat build script dependencies as conflicting, they are obvious to detect --- src/dependencies.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dependencies.rs b/src/dependencies.rs index 14c3fc90..5e7611e8 100644 --- a/src/dependencies.rs +++ b/src/dependencies.rs @@ -86,6 +86,13 @@ pub fn build_dependencies(config: &mut Config) -> Result { continue }; if let cargo_metadata::Message::CompilerArtifact(artifact) = message { + if artifact + .filenames + .iter() + .any(|f| f.ends_with("build-script-build")) + { + continue; + } for filename in &artifact.filenames { import_paths.insert(filename.parent().unwrap().into()); } From 445e2bbe066022e4950a6cce6c9f49fe1b55ecf6 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 18 Jul 2023 15:34:27 +0000 Subject: [PATCH 5/8] Only try to parse json lines as rustfix suggestions and silently ignore other lines --- src/lib.rs | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 398d66b4..21e04cbb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -730,19 +730,27 @@ fn run_rustfix( let fixed_code = (no_run_rustfix.is_none() && config.rustfix) .then_some(()) .and_then(|()| { - let input = std::str::from_utf8(stderr).unwrap(); - let suggestions = rustfix::get_suggestions_from_json( - input, - &HashSet::new(), - if let Mode::Yolo = config.mode { - rustfix::Filter::Everything - } else { - rustfix::Filter::MachineApplicableOnly - }, - ) - .unwrap_or_else(|err| { - panic!("could not deserialize diagnostics json for rustfix {err}:{input}") - }); + let suggestions = std::str::from_utf8(stderr) + .unwrap() + .lines() + .flat_map(|line| { + if !line.starts_with('{') { + return vec![]; + } + rustfix::get_suggestions_from_json( + line, + &HashSet::new(), + if let Mode::Yolo = config.mode { + rustfix::Filter::Everything + } else { + rustfix::Filter::MachineApplicableOnly + }, + ) + .unwrap_or_else(|err| { + panic!("could not deserialize diagnostics json for rustfix {err}:{line}") + }) + }) + .collect::>(); if suggestions.is_empty() { return None; } From 901b3713ef1ba69b171dcfb4001081b1d3917091 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 24 Jul 2023 14:59:31 +0000 Subject: [PATCH 6/8] Reexport clap, so we always show the right version of `clap::Parse` --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 21e04cbb..21ddb93a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,6 +9,7 @@ //! A crate to run the Rust compiler (or other binaries) and test their command line output. use bstr::ByteSlice; +pub use clap; use clap::Parser; pub use color_eyre; use color_eyre::eyre::{eyre, Result}; From e67fcc0d9fe83ce3142e85b09f2acd05d4e2ac6c Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 24 Jul 2023 14:59:51 +0000 Subject: [PATCH 7/8] Accept strings as paths, too --- src/config.rs | 6 +++--- tests/integrations/basic-bin/tests/ui_tests.rs | 2 +- tests/integrations/basic-fail-mode/tests/ui_tests.rs | 2 +- tests/integrations/basic-fail/tests/ui_tests.rs | 2 +- tests/integrations/basic-fail/tests/ui_tests_bless.rs | 2 +- .../basic-fail/tests/ui_tests_invalid_program.rs | 2 +- .../basic-fail/tests/ui_tests_invalid_program2.rs | 2 +- tests/integrations/basic/tests/ui_tests.rs | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/config.rs b/src/config.rs index af4ff5e6..31f82f7d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -60,7 +60,7 @@ pub struct Config { impl Config { /// Create a configuration for testing the output of running /// `rustc` on the test files. - pub fn rustc(root_dir: PathBuf) -> Self { + pub fn rustc(root_dir: impl Into) -> Self { Self { host: None, target: None, @@ -73,7 +73,7 @@ impl Config { #[cfg(windows)] (Match::Exact(vec![b'\r']), b""), ], - root_dir, + root_dir: root_dir.into(), mode: Mode::Fail { require_patterns: true, }, @@ -100,7 +100,7 @@ impl Config { /// Create a configuration for testing the output of running /// `cargo` on the test `Cargo.toml` files. - pub fn cargo(root_dir: PathBuf) -> Self { + pub fn cargo(root_dir: impl Into) -> Self { Self { program: CommandBuilder::cargo(), edition: None, diff --git a/tests/integrations/basic-bin/tests/ui_tests.rs b/tests/integrations/basic-bin/tests/ui_tests.rs index b92d4477..8fbe7ef9 100644 --- a/tests/integrations/basic-bin/tests/ui_tests.rs +++ b/tests/integrations/basic-bin/tests/ui_tests.rs @@ -4,7 +4,7 @@ fn main() -> ui_test::color_eyre::Result<()> { let path = "../../../target"; let mut config = Config { dependencies_crate_manifest_path: Some("Cargo.toml".into()), - ..Config::rustc("tests/actual_tests".into()) + ..Config::rustc("tests/actual_tests") }; if std::env::var_os("BLESS").is_some() { config.output_conflict_handling = OutputConflictHandling::Bless diff --git a/tests/integrations/basic-fail-mode/tests/ui_tests.rs b/tests/integrations/basic-fail-mode/tests/ui_tests.rs index 34cc0921..4470da33 100644 --- a/tests/integrations/basic-fail-mode/tests/ui_tests.rs +++ b/tests/integrations/basic-fail-mode/tests/ui_tests.rs @@ -7,7 +7,7 @@ fn main() -> ui_test::color_eyre::Result<()> { mode: Mode::Fail { require_patterns: true, }, - ..Config::rustc("tests/actual_tests".into()) + ..Config::rustc("tests/actual_tests") }; if std::env::var_os("BLESS").is_some() { config.output_conflict_handling = OutputConflictHandling::Bless diff --git a/tests/integrations/basic-fail/tests/ui_tests.rs b/tests/integrations/basic-fail/tests/ui_tests.rs index 75ba1929..8c28c87c 100644 --- a/tests/integrations/basic-fail/tests/ui_tests.rs +++ b/tests/integrations/basic-fail/tests/ui_tests.rs @@ -11,7 +11,7 @@ fn main() -> ui_test::color_eyre::Result<()> { ), // Make sure our tests are ordered for reliable output. num_test_threads: NonZeroUsize::new(1).unwrap(), - ..Config::rustc("tests/actual_tests".into()) + ..Config::rustc("tests/actual_tests") }; // hide binaries generated for successfully passing tests diff --git a/tests/integrations/basic-fail/tests/ui_tests_bless.rs b/tests/integrations/basic-fail/tests/ui_tests_bless.rs index 32d5987f..3c8e105b 100644 --- a/tests/integrations/basic-fail/tests/ui_tests_bless.rs +++ b/tests/integrations/basic-fail/tests/ui_tests_bless.rs @@ -21,7 +21,7 @@ fn main() -> ui_test::color_eyre::Result<()> { // Make sure our tests are ordered for reliable output. num_test_threads: NonZeroUsize::new(1).unwrap(), mode, - ..Config::rustc(root_dir.into()) + ..Config::rustc(root_dir) }; if std::env::var_os("BLESS").is_some() { config.output_conflict_handling = OutputConflictHandling::Bless diff --git a/tests/integrations/basic-fail/tests/ui_tests_invalid_program.rs b/tests/integrations/basic-fail/tests/ui_tests_invalid_program.rs index 1bbaa6c6..df1a76c0 100644 --- a/tests/integrations/basic-fail/tests/ui_tests_invalid_program.rs +++ b/tests/integrations/basic-fail/tests/ui_tests_invalid_program.rs @@ -10,7 +10,7 @@ fn main() -> ui_test::color_eyre::Result<()> { ), // Make sure our tests are ordered for reliable output. num_test_threads: NonZeroUsize::new(1).unwrap(), - ..Config::rustc("tests/actual_tests".into()) + ..Config::rustc("tests/actual_tests") }; run_tests_generic( diff --git a/tests/integrations/basic-fail/tests/ui_tests_invalid_program2.rs b/tests/integrations/basic-fail/tests/ui_tests_invalid_program2.rs index 56755541..280fe511 100644 --- a/tests/integrations/basic-fail/tests/ui_tests_invalid_program2.rs +++ b/tests/integrations/basic-fail/tests/ui_tests_invalid_program2.rs @@ -11,7 +11,7 @@ fn main() -> ui_test::color_eyre::Result<()> { ), // Make sure our tests are ordered for reliable output. num_test_threads: NonZeroUsize::new(1).unwrap(), - ..Config::rustc("tests/actual_tests".into()) + ..Config::rustc("tests/actual_tests") }; run_tests_generic( diff --git a/tests/integrations/basic/tests/ui_tests.rs b/tests/integrations/basic/tests/ui_tests.rs index 7386da63..85706342 100644 --- a/tests/integrations/basic/tests/ui_tests.rs +++ b/tests/integrations/basic/tests/ui_tests.rs @@ -6,7 +6,7 @@ fn main() -> ui_test::color_eyre::Result<()> { let mut config = Config { dependencies_crate_manifest_path: Some("Cargo.toml".into()), num_test_threads: NonZeroUsize::new(1).unwrap(), - ..Config::rustc("tests/actual_tests".into()) + ..Config::rustc("tests/actual_tests") }; if std::env::var_os("BLESS").is_some() { config.output_conflict_handling = OutputConflictHandling::Bless; From 4b5d599b41e65d1e777b9ad466ff37c0b67aa80c Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 26 Jul 2023 09:19:36 +0000 Subject: [PATCH 8/8] Make sure we count the progress bar length correctly --- src/status_emitter.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/status_emitter.rs b/src/status_emitter.rs index 76673429..ee124bc9 100644 --- a/src/status_emitter.rs +++ b/src/status_emitter.rs @@ -12,6 +12,7 @@ use std::{ panic::RefUnwindSafe, path::{Path, PathBuf}, process::Command, + sync::atomic::AtomicBool, time::Duration, }; @@ -86,12 +87,12 @@ impl Text { } } -#[derive(Clone)] struct TextTest { text: Text, path: PathBuf, revision: String, - spinner: ProgressBar, + spinner: Option, + first: AtomicBool, } fn spinner(path: &Path, revision: &str, all: &MultiProgress) -> ProgressBar { @@ -110,7 +111,7 @@ impl TestStatus for TextTest { fn done(&self, result: &TestResult) { if let Some(progress) = &self.text.progress { progress.inc(1); - self.spinner.finish_and_clear(); + self.spinner.as_ref().unwrap().finish_and_clear(); } else { let result = match result { TestResult::Ok => "ok".green(), @@ -130,7 +131,7 @@ impl TestStatus for TextTest { if ProgressDrawTarget::stderr().is_hidden() { eprintln!("{msg}"); } else { - self.spinner.finish_with_message(msg); + self.spinner.as_ref().unwrap().finish_with_message(msg); } } } @@ -169,20 +170,19 @@ impl TestStatus for TextTest { fn for_revision(&self, revision: &str) -> Box { assert_eq!(self.revision, ""); - if revision.is_empty() { - Box::new(self.clone()) - } else { + if !self.first.swap(false, std::sync::atomic::Ordering::Relaxed) { if let Some(progress) = &self.text.progress { progress.inc_length(1); } - let spinner = spinner(&self.path, &self.revision, &self.text.all); - Box::new(Self { - text: self.text.clone(), - path: self.path.clone(), - revision: revision.to_owned(), - spinner, - }) } + let spinner = spinner(&self.path, &self.revision, &self.text.all); + Box::new(Self { + text: self.text.clone(), + path: self.path.clone(), + revision: revision.to_owned(), + spinner: Some(spinner), + first: AtomicBool::new(false), + }) } fn revision(&self) -> &str { @@ -195,12 +195,12 @@ impl StatusEmitter for Text { if let Some(progress) = &self.progress { progress.inc_length(1); } - let spinner = spinner(&path, "", &self.all); Box::new(TextTest { text: self.clone(), - spinner, + spinner: None, path, revision: String::new(), + first: AtomicBool::new(true), }) }