From bbca91c1c75c292adcedb0f9db6447afc1454a34 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Thu, 30 May 2024 18:06:40 -0400 Subject: [PATCH] WIP: feat(update_backlog): add `--preset=promote-not-not-passing` TODO: Validate that this is useful. --- moz-webgpu-cts/src/main.rs | 17 +++++++++++++++++ moz-webgpu-cts/src/shared.rs | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/moz-webgpu-cts/src/main.rs b/moz-webgpu-cts/src/main.rs index 58fedda..c35b354 100644 --- a/moz-webgpu-cts/src/main.rs +++ b/moz-webgpu-cts/src/main.rs @@ -131,6 +131,8 @@ enum OnZeroItem { enum UpdateBacklogPreset { /// Remove tests that expect only `PASS` outcomes on all platforms from `backlog`. PromotePermaPassing, + /// Remove tests that, at most, expect `PASS`, `TIMEOUT`, and `NOTRUN` outcomes from `backlog`. + PromoteNotNotPassing, } fn main() -> ExitCode { @@ -1387,6 +1389,7 @@ fn run(cli: Cli) -> ExitCode { enum Case { #[default] PermaPass, + NotNotPass, Other, } let mut found_write_err = false; @@ -1431,6 +1434,12 @@ fn run(cli: Cli) -> ExitCode { [(platform, build_profile)]; if let Some(SubtestOutcome::Pass) = expected.as_permanent() { Case::PermaPass + } else if expected.is_subset( + SubtestOutcome::Pass + | SubtestOutcome::Timeout + | SubtestOutcome::NotRun, + ) { + Case::NotNotPass } else { Case::Other } @@ -1450,6 +1459,14 @@ fn run(cli: Cli) -> ExitCode { properties.implementation_status = None; } } + UpdateBacklogPreset::PromoteNotNotPassing => { + if matches!( + value_across_all_platforms(), + Ok(Case::PermaPass | Case::NotNotPass) + ) { + properties.implementation_status = None; + } + } } } match write_to_file(&file_path, metadata::format_file(&file)) { diff --git a/moz-webgpu-cts/src/shared.rs b/moz-webgpu-cts/src/shared.rs index 9fc65f7..3b0121b 100644 --- a/moz-webgpu-cts/src/shared.rs +++ b/moz-webgpu-cts/src/shared.rs @@ -95,6 +95,10 @@ where { self.inner().is_superset(rep.inner()) } + + pub fn is_subset(&self, rep: EnumSet) -> bool { + self.inner().is_subset(rep) + } } impl Display for Expected