Stop the false build_src_flags warning, share the idedata error tuple, make the no-tests guard per platform

This commit is contained in:
J. Nick Koston
2026-08-23 16:48:36 -05:00
parent 3f10a8ca36
commit f1b2258661
7 changed files with 46 additions and 13 deletions
+16 -3
View File
@@ -1075,13 +1075,26 @@ def test_components(
)
# Renamed or removed fixtures must shrink coverage loudly, and the
# reference-baseline fallback below must not mask an empty match
# reference-baseline fallback below must not mask an empty match. The
# check is per platform: a component whose fixture exists only for other
# platforms contributes nothing to this leg.
def _has_platform_test(component: str) -> bool:
return any(
not platform_filter or test.stem.split(".")[-1].startswith(platform_filter)
for test in all_tests.get(component, [])
)
if fail_on_no_tests and (
unmatched := [
p for p in component_patterns if p and "*" not in p and p not in all_tests
p
for p in component_patterns
if p and "*" not in p and not _has_platform_test(p)
]
):
print(f"No tests found for requested component(s): {', '.join(unmatched)}")
target = f"{platform_filter} " if platform_filter else ""
print(
f"No {target}tests found for requested component(s): {', '.join(unmatched)}"
)
return 1
# If no components found, build a reference configuration for baseline comparison