Skip to content

Commit

Permalink
WIP: feat(update_backlog): add --preset=promote-not-not-passing
Browse files Browse the repository at this point in the history
TODO: Validate that this is useful.
  • Loading branch information
ErichDonGubler committed May 30, 2024
1 parent 11e74ca commit bbca91c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions moz-webgpu-cts/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -1387,6 +1389,7 @@ fn run(cli: Cli) -> ExitCode {
enum Case {
#[default]
PermaPass,
NotNotPass,
Other,
}
let mut found_write_err = false;
Expand Down Expand Up @@ -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
}
Expand All @@ -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)) {

Check failure on line 1472 in moz-webgpu-cts/src/main.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

this expression creates a reference which is immediately dereferenced by the compiler

Check failure on line 1472 in moz-webgpu-cts/src/main.rs

View workflow job for this annotation

GitHub Actions / Clippy (beta)

this expression creates a reference which is immediately dereferenced by the compiler
Expand Down
4 changes: 4 additions & 0 deletions moz-webgpu-cts/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ where
{
self.inner().is_superset(rep.inner())
}

pub fn is_subset(&self, rep: EnumSet<Out>) -> bool {
self.inner().is_subset(rep)
}
}

impl<Out> Display for Expected<Out>
Expand Down

0 comments on commit bbca91c

Please sign in to comment.