Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(update_backlog): add --preset=promote-not-not-passing #111

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion moz-webgpu-cts/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -965,6 +967,7 @@ fn run(cli: Cli) -> ExitCode {
enum Case {
#[default]
PermaPass,
NotNotPass,
Other,
}
let mut found_write_err = false;
Expand Down Expand Up @@ -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
}
Expand All @@ -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)) {
Expand Down
4 changes: 4 additions & 0 deletions moz-webgpu-cts/src/wpt/metadata/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,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
Loading