mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 21:43:23 -05:00
fix: count core archives among the core files
This commit is contained in:
1 parent
55983f6b01
commit
a24e17535f
2 files changed
+23
-1
No files matched your search
+4
-1
@@ -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
|
||||
|
||||
@@ -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()
|
||||
Reference in new issue
Block a user