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:
@@ -863,6 +863,8 @@ static void summary(void) {
|
|||||||
for (size_t i = 0; i < bench_suite_count; i++) {
|
for (size_t i = 0; i < bench_suite_count; i++) {
|
||||||
bench_define_suite(&bench_ids[t], bench_suites[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++) {
|
for (size_t j = 0; j < bench_suites[i]->case_count; j++) {
|
||||||
// does neither suite nor case name match?
|
// does neither suite nor case name match?
|
||||||
if (bench_ids[t].name && !(
|
if (bench_ids[t].name && !(
|
||||||
@@ -874,6 +876,7 @@ static void summary(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cases += 1;
|
cases += 1;
|
||||||
|
cases_ += 1;
|
||||||
case_forperm(
|
case_forperm(
|
||||||
&bench_ids[t],
|
&bench_ids[t],
|
||||||
bench_suites[i],
|
bench_suites[i],
|
||||||
@@ -882,6 +885,11 @@ static void summary(void) {
|
|||||||
&perms);
|
&perms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// no benches found?
|
||||||
|
if (!cases_) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
suites += 1;
|
suites += 1;
|
||||||
flags |= bench_suites[i]->flags;
|
flags |= bench_suites[i]->flags;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -833,6 +833,8 @@ static void summary(void) {
|
|||||||
for (size_t i = 0; i < test_suite_count; i++) {
|
for (size_t i = 0; i < test_suite_count; i++) {
|
||||||
test_define_suite(&test_ids[t], test_suites[i]);
|
test_define_suite(&test_ids[t], test_suites[i]);
|
||||||
|
|
||||||
|
size_t cases_ = 0;
|
||||||
|
|
||||||
for (size_t j = 0; j < test_suites[i]->case_count; j++) {
|
for (size_t j = 0; j < test_suites[i]->case_count; j++) {
|
||||||
// does neither suite nor case name match?
|
// does neither suite nor case name match?
|
||||||
if (test_ids[t].name && !(
|
if (test_ids[t].name && !(
|
||||||
@@ -844,6 +846,7 @@ static void summary(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cases += 1;
|
cases += 1;
|
||||||
|
cases_ += 1;
|
||||||
case_forperm(
|
case_forperm(
|
||||||
&test_ids[t],
|
&test_ids[t],
|
||||||
test_suites[i],
|
test_suites[i],
|
||||||
@@ -852,6 +855,11 @@ static void summary(void) {
|
|||||||
&perms);
|
&perms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// no tests found?
|
||||||
|
if (!cases_) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
suites += 1;
|
suites += 1;
|
||||||
flags |= test_suites[i]->flags;
|
flags |= test_suites[i]->flags;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user