[fuzz] Print the output of all failed test cases, not one test.
[rust-lightning] / fuzz / src / bin / msg_update_add_htlc_target.rs
index a8b3d4bab32670ebfae51655809efc3468cd1954..dffdb830939d04f8aff0cfc13279432a497ff053 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!();
+       }
 }