@@ -47,8 +47,12 @@ impl<T: Write> TerseFormatter<T> {
4747 self . write_short_result ( "." , term:: color:: GREEN )
4848 }
4949
50- pub fn write_failed ( & mut self ) -> io:: Result < ( ) > {
51- self . write_short_result ( "F" , term:: color:: RED )
50+ pub fn write_failed ( & mut self , name : & str ) -> io:: Result < ( ) > {
51+ // Put failed tests on their own line and include the test name, so that it's faster
52+ // to see which test failed without having to wait for them all to run.
53+ self . write_plain ( format ! ( "\n {name} --- " ) ) ?;
54+ self . write_pretty ( "F" , term:: color:: RED ) ?;
55+ self . write_progress ( )
5256 }
5357
5458 pub fn write_ignored ( & mut self ) -> io:: Result < ( ) > {
@@ -65,15 +69,21 @@ impl<T: Write> TerseFormatter<T> {
6569 color : term:: color:: Color ,
6670 ) -> io:: Result < ( ) > {
6771 self . write_pretty ( result, color) ?;
68- if self . test_column % QUIET_MODE_MAX_COLUMN == QUIET_MODE_MAX_COLUMN - 1 {
72+ self . test_column += 1 ;
73+ if self . test_column == QUIET_MODE_MAX_COLUMN {
6974 // We insert a new line regularly in order to flush the
7075 // screen when dealing with line-buffered output (e.g., piping to
7176 // `stamp` in the rust CI).
72- let out = format ! ( " {}/{}\n " , self . test_column + 1 , self . total_test_count) ;
73- self . write_plain ( out) ?;
77+ self . write_progress ( ) ?;
7478 }
7579
76- self . test_column += 1 ;
80+ Ok ( ( ) )
81+ }
82+
83+ fn write_progress ( & mut self ) -> io:: Result < ( ) > {
84+ let out = format ! ( " {}/{}\n " , self . test_column, self . total_test_count) ;
85+ self . write_plain ( out) ?;
86+ self . test_column = 0 ;
7787 Ok ( ( ) )
7888 }
7989
@@ -213,7 +223,7 @@ impl<T: Write> OutputFormatter for TerseFormatter<T> {
213223 match * result {
214224 TestResult :: TrOk => self . write_ok ( ) ,
215225 TestResult :: TrFailed | TestResult :: TrFailedMsg ( _) | TestResult :: TrTimedFail => {
216- self . write_failed ( )
226+ self . write_failed ( desc . name . as_slice ( ) )
217227 }
218228 TestResult :: TrIgnored => self . write_ignored ( ) ,
219229 TestResult :: TrBench ( ref bs) => {
0 commit comments