From 22861fde72133ef9c11fe1c4eda122ecaecd4bae Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 3 Dec 2026 01:47:02 -0800 Subject: [PATCH] rt test: rule 2's scan labels each source with `/` on every host The scan labelled each product source by Path::display, which joins its components with `\` on Windows. The labels the tests name and the allowances key on are written with `/`, so on the UHD 630 under Windows (job m3-max-82853, at aed8b7eba3) the_scan_reads_the_translators_product_sources_alone found no "metal2vulkan/src/device/description.rs". And the_product_sources_take_one_path_for_every_device reported allowed lines, such as "metal2vulkan/src/ash_interop\convert.rs:36 DriverId", as findings. The label now joins the path's components with `/`. Test-only: runtime-sources.sha256 is unchanged (recomputed: 3ec63863). --- crates/metal2vulkan-runtime/src/tests/one_path.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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()