fix: the global gap report keeps standalone files

With no platform named, cross_reference passed no standalone cores, so every dual profile was laid out as libretro only. The CLI and the site's gaps page left out 133 files that Batocera and RetroBat run standalone and that no platform declares (eka2l1 90, dolphin 21, cemu 11). Both now pass the union of every platform's standalone cores.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 01:17:35 +02:00
1 parent ec755b3abb
commit c6db200beb
3 files changed
+32

No files matched your search

+10
View File
@@ -853,6 +853,16 @@ def main() -> None:
)
profiles = {k: v for k, v in profiles.items() if k in relevant}
standalone_cores = standalone_set(config)
else:
# The tree as every platform runs it: a profile some platform runs
# standalone keeps its standalone entries. Laid out as libretro only,
# eka2l1, dolphin and xenia-edge lost 133 files no platform declares.
from common import list_registered_platforms
standalone_cores = set().union(*(
standalone_set(load_platform_config(name, args.platforms_dir))
for name in list_registered_platforms(args.platforms_dir, include_archived=True)
))
if not profiles:
if args.emulator and args.target and set(args.emulator.split(",")) & run_anywhere:
+5
View File
@@ -618,9 +618,14 @@ def build_emulator_gap_report(
for k, v in profiles.items()
if v.get("type") not in ("alias", "test")
}
from common import standalone_set
return run_cross_reference(
unique_profiles, declared, db,
data_names=data_names, all_declared=all_declared,
standalone_cores=set().union(
*(standalone_set(cov["config"]) for cov in coverages.values())
),
)
+17
View File
@@ -5287,5 +5287,22 @@ class ReportsHoldTheDataTrees(unittest.TestCase):
))
class TheTreeKeepsStandaloneEntries(unittest.TestCase):
"""With no platform named, the gap report laid every dual profile out as
libretro only: eka2l1, dolphin and xenia-edge lost 133 files that
Batocera and RetroBat run standalone and no platform declares."""
def test_a_standalone_only_entry_is_reported(self):
if not (ROOT / "database.json").exists():
self.skipTest("database.json is not built")
out = subprocess.run(
[sys.executable, "scripts/cross_reference.py", "--emulator", "eka2l1"],
cwd=ROOT, capture_output=True, text=True, timeout=600, check=True,
).stdout
undeclared = re.search(r"(\d+) undeclared", out)
self.assertIsNotNone(undeclared, out[-500:])
self.assertGreater(int(undeclared.group(1)), 0)
if __name__ == "__main__":
unittest.main()