[fuzz] Print the output of all failed test cases, not one test.
[rust-lightning] / fuzz / src / bin / msg_funding_signed_target.rs
index c1b756fe673ba6cc4be9074a8c82d9a4e0a738fa..ea05acdcee1425cae380f116699f2a12365a2cf4 100644 (file)
@@ -93,10 +93,18 @@ fn run_test_cases() {
                        }
                }
        }
+       let mut failed_outputs = Vec::new();
        for (test, thread) in threads.drain(..) {
                if let Some(output) = thread.join().unwrap() {
-                       println!("Output of {}:\n{}", test, output);
-                       panic!();
+                       println!("\nOutput of {}:\n{}\n", test, output);
+                       failed_outputs.push(test);
                }
        }
+       if !failed_outputs.is_empty() {
+               println!("Test cases which failed: ");
+               for case in failed_outputs {
+                       println!("{}", case);
+               }
+               panic!();
+       }
 }