feat: record files a launcher never opens

unread_on names the platforms whose launcher points the emulator at other files. RetroBat writes absolute BIOS paths into standalone BlastEm's config, so the default names were reported as required and missing there. Such an entry leaves that platform's gap report and pack, and its emulator page says where it is never opened.
This commit is contained in:
Abdessamad Derraz committed 2026-10-20 10:27:15 +02:00
1 parent 1f64991ff5
commit 40bc07aa3a
5 files changed
+46 -2

No files matched your search

+20
View File
@@ -5774,5 +5774,25 @@ class TheApiSchemaHoldsTheFieldsItPromises(unittest.TestCase):
jsonschema.validate(envelope, schema)
class AFileTheLauncherNeverOpens(unittest.TestCase):
"""RetroBat hands standalone BlastEm absolute paths to its own BIOS
names, so the defaults the emulator would read (cdbios.bin) were listed
as required and missing on RetroBat although nothing there opens them."""
def test_unread_on_drops_the_entry_for_that_platform_only(self):
from validation import deliverable, unread_on
entry = {"name": "cdbios.bin", "unread_on": ["retrobat"]}
self.assertTrue(unread_on(entry, "retrobat"))
self.assertFalse(unread_on(entry, "batocera"))
self.assertFalse(unread_on(entry, ""))
self.assertEqual(deliverable([entry], True, "retrobat"), [])
self.assertEqual(deliverable([entry], True, "batocera"), [entry])
def test_the_gap_report_reads_it(self):
source = (ROOT / "scripts" / "verify.py").read_text(encoding="utf-8")
self.assertIn('unread_on(f, config.get("_key", ""))', source)
if __name__ == "__main__":
unittest.main()