diff --git a/crates/metal2vulkan-runtime/src/tests/one_path.rs b/crates/metal2vulkan-runtime/src/tests/one_path.rs index f6585b89b..86c6a2761 100644 --- a/crates/metal2vulkan-runtime/src/tests/one_path.rs +++ b/crates/metal2vulkan-runtime/src/tests/one_path.rs @@ -330,11 +330,15 @@ fn translator_sources(name: &str) -> Vec<(String, String)> { .into_iter() .filter(|(path, _)| !test_modules.iter().any(|module| path.starts_with(module))) .map(|(path, text)| { + // Joined with `/` on every host: `Path::display` joins with `\` on Windows, and the + // labels the tests name and the allowances key on are written with `/`. let label = path .strip_prefix(&root) .unwrap_or(&path) - .display() - .to_string(); + .components() + .map(|part| part.as_os_str().to_string_lossy()) + .collect::>() + .join("/"); (format!("{name}/src/{label}"), without_inline_tests(&text)) }) .collect()