diff --git a/moz-webgpu-cts/src/main.rs b/moz-webgpu-cts/src/main.rs index f3cd9c1..b8e2c47 100644 --- a/moz-webgpu-cts/src/main.rs +++ b/moz-webgpu-cts/src/main.rs @@ -269,6 +269,8 @@ enum UpdateBacklogSubcommand { #[clap(long, default_value_t = true)] only_across_all_platforms: bool, }, + /// Remove tests that, at most, expect `PASS`, `TIMEOUT`, and `NOTRUN` outcomes from `backlog`. + PromoteNotNotPassing, } fn main() -> ExitCode { @@ -965,6 +967,7 @@ fn run(cli: Cli) -> ExitCode { enum Case { #[default] PermaPass, + NotNotPass, Other, } let mut found_write_err = false; @@ -1003,6 +1006,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 } @@ -1027,10 +1036,20 @@ fn run(cli: Cli) -> ExitCode { properties.implementation_status = Some(cases.map(|case| match case { Case::PermaPass => ImplementationStatus::Implementing, - Case::Other => ImplementationStatus::Backlog, + Case::NotNotPass | Case::Other => { + ImplementationStatus::Backlog + } })); } } + UpdateBacklogSubcommand::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/wpt/metadata/properties.rs b/moz-webgpu-cts/src/wpt/metadata/properties.rs index ee8bcb8..5cf7e9b 100644 --- a/moz-webgpu-cts/src/wpt/metadata/properties.rs +++ b/moz-webgpu-cts/src/wpt/metadata/properties.rs @@ -90,6 +90,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