diff options
author | Hajime-san <41257923+Hajime-san@users.noreply.github.com> | 2024-08-20 10:27:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-20 01:27:36 +0000 |
commit | 19bcb40059f6ba730b6d05d8edf005c6b40f6ff8 (patch) | |
tree | e7c60d8957a8609199a3dad24455518cc36fac32 /cli/tools/test/reporters/pretty.rs | |
parent | 4f49f703c10afcde7155baac2b494fa6670c0115 (diff) |
feat(cli/tools): add a subcommand `--hide-stacktraces` for test (#24095)
Diffstat (limited to 'cli/tools/test/reporters/pretty.rs')
-rw-r--r-- | cli/tools/test/reporters/pretty.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cli/tools/test/reporters/pretty.rs b/cli/tools/test/reporters/pretty.rs index cb9f2c435..4120bbfb5 100644 --- a/cli/tools/test/reporters/pretty.rs +++ b/cli/tools/test/reporters/pretty.rs @@ -20,6 +20,7 @@ pub struct PrettyTestReporter { HashMap<usize, IndexMap<usize, (TestStepDescription, TestStepResult, u64)>>, summary: TestSummary, writer: Box<dyn std::io::Write>, + failure_format_options: TestFailureFormatOptions, } impl PrettyTestReporter { @@ -29,6 +30,7 @@ impl PrettyTestReporter { filter: bool, repl: bool, cwd: Url, + failure_format_options: TestFailureFormatOptions, ) -> PrettyTestReporter { PrettyTestReporter { parallel, @@ -45,6 +47,7 @@ impl PrettyTestReporter { child_results_buffer: Default::default(), summary: TestSummary::new(), writer: Box::new(std::io::stdout()), + failure_format_options, } } @@ -395,7 +398,13 @@ impl TestReporter for PrettyTestReporter { _test_steps: &IndexMap<usize, TestStepDescription>, ) { self.write_output_end(); - common::report_summary(&mut self.writer, &self.cwd, &self.summary, elapsed); + common::report_summary( + &mut self.writer, + &self.cwd, + &self.summary, + elapsed, + &self.failure_format_options, + ); if !self.repl { writeln!(&mut self.writer).unwrap(); } |