Repository: gfx-rs/wgpu (language: rust)

Issue:
Runing `cargo xtask test` requires Vulkan SDK for all tests
This is a byproduct of how the benchmarks are initialized. Broken in #7190, need to refactor benchmarks to not be so damn fickle to write.



Discussion / hints:

Fix patch:
diff --git a/benches/benches/shader.rs b/benches/benches/shader.rs
index d7d8c5fc56..fee85adbf8 100644
--- a/benches/benches/shader.rs
+++ b/benches/benches/shader.rs
@@ -170,16 +170,24 @@ fn frontends(c: &mut Criterion) {
 
     // Assemble all the SPIR-V assembly.
     let mut assembled_spirv = Vec::<Vec<u32>>::new();
-    for input in &inputs_spirv.inner {
-        let output = Command::new("spirv-as")
+    'spirv: for input in &inputs_spirv.inner {
+        let output = match Command::new("spirv-as")
             .arg(&input.filename)
             .arg("-o")
             .arg("-")
             .output()
-            .expect(
-                "Failed to execute spirv-as. It can be installed \
-           q by installing the Vulkan SDK and adding it to your path.",
-            );
+        {
+            Ok(output) => output,
+            Err(e) => {
+                eprintln!(
+                    "Failed to execute spirv-as: {e}\n\
+                    spvasm benchmarks will be skipped.\n\
+                    spirv-as can be installed by installing the Vulkan SDK and adding \
+                        it to your PATH.",
+                );
+                break 'spirv;
+            }
+        };
 
         if !output.status.success() {
             panic!(


Test patch: