refactor: scope validation to a platform's cores

This commit is contained in:
Abdessamad Derraz committed 2026-09-03 17:51:34 +02:00
1 parent b4b925ebff
commit 75f4542ea8
2 files changed
+19 -8

No files matched your search

+9 -6
View File
@@ -597,14 +597,17 @@ def generate_pack(
file_status: dict[str, str] = {}
file_reasons: dict[str, str] = {}
# Build emulator-level validation index (same as verify.py)
validation_index = {}
if emu_profiles:
validation_index = _build_validation_index(emu_profiles)
# Filter systems by target if specified
# Build emulator-level validation index from the platform's own
# emulators (same scope as verify.py)
from common import resolve_platform_cores
validation_index = {}
if emu_profiles:
validation_index = _build_validation_index(
{name: emu_profiles[name] for name in resolve_platform_cores(config, emu_profiles)}
)
# Filter systems by target if specified
plat_cores = (
resolve_platform_cores(config, emu_profiles or {}) if target_cores else None
)
+10 -2
View File
@@ -811,10 +811,18 @@ def verify_platform(
for f in profile.get("files", []):
if f.get("hle_fallback"):
hle_index[f.get("name", "")] = True
validation_index = _build_validation_index(profiles)
# Ground truth comes from the emulators the platform runs. A standalone
# profile that loads a same-named file of its own (ZEsarUX's 48K
# cpc6128.rom against cap32's 32K one) has nothing to say about a
# RetroArch pack.
plat_cores = resolve_platform_cores(config, profiles)
validation_index = _build_validation_index(
{name: profiles[name] for name in plat_cores}
)
# Filter systems by target
plat_cores = resolve_platform_cores(config, profiles) if target_cores else None
if not target_cores:
plat_cores = None
verify_systems = filter_systems_by_target(
config.get("systems", {}),
profiles,