Skip to content

Commit

Permalink
feat(update-expected): accept and warn on empty exec. reports
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Jun 11, 2024
1 parent 7b64a0e commit 45843f1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions moz-webgpu-cts/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ fn run(cli: Cli) -> ExitCode {
.map_err(Report::msg)
.wrap_err("failed to open file")
.and_then(|reader| {
serde_json::from_reader::<_, ExecutionReport>(reader)
serde_json::from_reader::<_, Option<ExecutionReport>>(reader)
.into_diagnostic()
.wrap_err("failed to parse JSON")
})
Expand All @@ -410,11 +410,19 @@ fn run(cli: Cli) -> ExitCode {
});

for res in exec_reports_receiver {
let (_path, exec_report) = match res {
let (path, exec_report) = match res {
Ok(ok) => ok,
Err(AlreadyReportedToCommandline) => return ExitCode::FAILURE,
};

let exec_report = match exec_report {
Some(some) => some,
None => {
log::warn!("empty report found: {}", path.display());
continue;
}
};

let ExecutionReport {
run_info:
RunInfo {
Expand Down

0 comments on commit 45843f1

Please sign in to comment.