runners: Don't include case-less suites in -Y/--summary

Note --list-suite-paths was already skipping case-less suites! I think
only -Y/--summary was an outlier.

This is consistent with test.py's matching of suite ids when no cases
are found (test_runner itself doesn't really care, it just reports no
matching cases). Though we do still compile case-less suites and include
them in the test_suites array, which may be confusing in the future.
This commit is contained in:
Christopher Haster
2025-07-20 10:22:22 -05:00
parent c87361508b
commit ba9a45aa01
2 changed files with 16 additions and 0 deletions
+8
View File
@@ -863,6 +863,8 @@ static void summary(void) {
for (size_t i = 0; i < bench_suite_count; i++) {
bench_define_suite(&bench_ids[t], bench_suites[i]);
size_t cases_ = 0;
for (size_t j = 0; j < bench_suites[i]->case_count; j++) {
// does neither suite nor case name match?
if (bench_ids[t].name && !(
@@ -874,6 +876,7 @@ static void summary(void) {
}
cases += 1;
cases_ += 1;
case_forperm(
&bench_ids[t],
bench_suites[i],
@@ -882,6 +885,11 @@ static void summary(void) {
&perms);
}
// no benches found?
if (!cases_) {
continue;
}
suites += 1;
flags |= bench_suites[i]->flags;
}