Skip to content

Commit

Permalink
ReportProcessingPreset::Set
Browse files Browse the repository at this point in the history
  • Loading branch information
sagudev committed May 28, 2024
1 parent 773f118 commit 039200b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion moz-webgpu-cts/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ enum ReportProcessingPreset {
#[value(alias("same-fx"))]
Merge,
ResetAll,
/// Set's only reported results to new value
Set,
/// Resets only bad->good
SetGood,
}
Expand Down Expand Up @@ -630,6 +632,10 @@ fn run(cli: Cli) -> ExitCode {
Some(rep) => meta | rep,
None => meta,
},
ReportProcessingPreset::Set => |meta, rep| match rep {
Some(rep) => rep,
None => meta,
},
ReportProcessingPreset::SetGood => {
|meta: Expectation<_>, rep: Option<Expectation<_>>| match rep {
Some(rep) => {
Expand Down Expand Up @@ -684,7 +690,7 @@ fn run(cli: Cli) -> ExitCode {

if test_entry.reported.is_empty() {
match preset {
ReportProcessingPreset::Merge => {
ReportProcessingPreset::Merge | ReportProcessingPreset::Set => {
log::warn!("no entries found in reports for {test_path:?}")
}
ReportProcessingPreset::ResetAll
Expand Down

0 comments on commit 039200b

Please sign in to comment.