Skip to content

Commit

Permalink
feat(triage): add total test and subtest counts
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed Nov 27, 2024
1 parent aa82c1f commit 14c2165
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions moz-webgpu-cts/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,13 @@ fn run(cli: Cli) -> ExitCode {
}
}

let test_count = u64::try_from(tests_by_name.len()).unwrap();
let subtest_count = tests_by_name
.values()
.map(|test| u64::try_from(test.inner.subtests.len()).unwrap())
.sum::<u64>();
let mut analysis = Analysis::default();

for (test_name, test) in tests_by_name {
let TaggedTest {
orig_path: _,
Expand Down Expand Up @@ -773,6 +779,7 @@ fn run(cli: Cli) -> ExitCode {
}
}
log::info!("finished analysis, printing to `stdout`…");
println!("Total: {test_count} test(s), {subtest_count} subtest(s)");
analysis.for_each_platform(|platform, analysis| {
let show_zero_count_item = match on_zero_item {
OnZeroItem::Show => true,
Expand Down

0 comments on commit 14c2165

Please sign in to comment.