From 992bdd83ce53263b26386506465c959485187e78 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 30 Apr 2021 13:38:20 -0400 Subject: [PATCH] Report per-entry point translation errors in the MSL output snapshots (#808) --- tests/snapshots.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/snapshots.rs b/tests/snapshots.rs index 86d2289590..cf2ce6a48b 100644 --- a/tests/snapshots.rs +++ b/tests/snapshots.rs @@ -164,7 +164,13 @@ fn check_output_msl( allow_point_size: true, }; - let (string, _) = msl::write_string(module, info, options, &pipeline_options).unwrap(); + let (string, tr_info) = msl::write_string(module, info, options, &pipeline_options).unwrap(); + + for (ep, result) in module.entry_points.iter().zip(tr_info.entry_point_names) { + if let Err(error) = result { + panic!("Failed to translate '{}': {}", ep.name, error); + } + } fs::write(destination.with_extension("msl"), string).unwrap(); }