fixup! Tidy FailureCase helpers

This commit is contained in:
Andy Leiserson authored and Erich Gubler committed 2026-08-12 11:54:08 +02:00
1 parent 20e56a987d
commit ce231ae79c
3 files changed
+19 -18

No files matched your search

+6 -8
View File
@@ -167,17 +167,15 @@ impl FailureCase {
}
/// Tests running on either Vulkan driver on macOS.
pub fn mac_vulkan(f: impl Fn(FailureCase) -> FailureCase) -> Vec<Self> {
vec![f(FailureCase::molten_vk()), f(FailureCase::kosmic_krisp())]
pub fn mac_vulkan() -> Vec<Self> {
vec![FailureCase::molten_vk(), FailureCase::kosmic_krisp()]
}
/// Tests running on macOS (both Vulkan and Metal).
pub fn mac(f: impl Fn(FailureCase) -> FailureCase) -> Vec<Self> {
vec![
f(FailureCase::molten_vk()),
f(FailureCase::kosmic_krisp()),
f(FailureCase::backend(wgpu::Backends::METAL)),
]
pub fn mac() -> Vec<Self> {
let mut cases = Self::mac_vulkan();
cases.push(FailureCase::backend(wgpu::Backends::METAL));
cases
}
pub fn lvp_poison_memory(message: &'static str) -> Self {
+1 -1
View File
@@ -54,7 +54,7 @@ static DRAW_MULTIVIEW_NONCONTIGUOUS: GpuTestConfiguration = GpuTestConfiguration
right: None",
));
// https://github.com/gfx-rs/wgpu/issues/9184 and https://github.com/gfx-rs/wgpu/issues/9187
failures.append(&mut FailureCase::mac_vulkan(|case| {
failures.extend(FailureCase::mac_vulkan().into_iter().map(|case| {
case.panic(
"assertion `left == right` failed: Expected 0\n left: Some(255)\n right: None",
)
@@ -18,15 +18,18 @@ static SUBGROUP_OPERATIONS: GpuTestConfiguration = GpuTestConfiguration::new()
//
// Newlines are included in the panic message to ensure that _additional_ failures
// are not matched against.
failures: wgpu_test::FailureCase::mac(|case| {
case
// 26.0 fails only test 28, and not on thread 0
.panic("thread 1 failed tests: 28,\n")
// 14.3 fails 27 and 28
.panic("thread 0 failed tests: 27,\nthread 1 failed tests: 27, 28,\n")
// Prior versions fail 27, 28, and 29
.panic("thread 0 failed tests: 27, 29,\nthread 1 failed tests: 27, 28, 29,\n")
}),
failures: wgpu_test::FailureCase::mac()
.into_iter()
.map(|case| {
case
// 26.0 fails only test 28, and not on thread 0
.panic("thread 1 failed tests: 28,\n")
// 14.3 fails 27 and 28
.panic("thread 0 failed tests: 27,\nthread 1 failed tests: 27, 28,\n")
// Prior versions fail 27, 28, and 29
.panic("thread 0 failed tests: 27, 29,\nthread 1 failed tests: 27, 28, 29,\n")
})
.collect(),
..Default::default()
})
.run_sync(|ctx| {