diff --git a/scripts/verify.py b/scripts/verify.py index 17c89783..d0169248 100644 --- a/scripts/verify.py +++ b/scripts/verify.py @@ -1122,8 +1122,11 @@ def _print_undeclared_section(result: dict, verbose: bool) -> None: if not undeclared: return - bios_files = [u for u in undeclared if u.get("category", "bios") == "bios"] + # Everything that is not game data is firmware the core loads, archives + # included: a bios_zip sat in neither list, so a required one that was + # missing was never printed. game_data = [u for u in undeclared if u.get("category", "bios") == "game_data"] + bios_files = [u for u in undeclared if u.get("category", "bios") != "game_data"] req_not_in_repo = [ u diff --git a/tests/test_verify_listing.py b/tests/test_verify_listing.py index 7c3a0b47..d52dff3f 100644 --- a/tests/test_verify_listing.py +++ b/tests/test_verify_listing.py @@ -96,5 +96,24 @@ class EmulatorPackReadsThePlatformsDir(unittest.TestCase): self.assertEqual(seen, ["elsewhere"]) + +class CoreArchivesAreCounted(unittest.TestCase): + def test_a_missing_required_bios_zip_is_printed(self): + import contextlib # noqa: PLC0415 + import io # noqa: PLC0415 + + sys.path.insert(0, str(REPO_ROOT / "scripts")) + import verify # noqa: PLC0415 + + result = {"undeclared_files": [ + {"name": "neogeo.zip", "category": "bios_zip", "required": True, + "in_repo": False, "emulator": "fbneo"}, + ]} + out = io.StringIO() + with contextlib.redirect_stdout(out): + verify._print_undeclared_section(result, verbose=False) + self.assertIn("1 required missing", out.getvalue()) + self.assertIn("neogeo.zip", out.getvalue()) + if __name__ == "__main__": unittest.main()