mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: print missing core files under their count
They came after the held-but-not-packed line and read as files installed with their emulator (finding 79).
This commit is contained in:
1 parent
5e4becf876
commit
666883ad53
2 files changed
+20
-7
No files matched your search
+8
-7
@@ -1853,13 +1853,8 @@ def _print_undeclared_section(result: dict, verbose: bool) -> None:
|
||||
f" Core files: {core_in_pack} in pack, {core_missing_req} required missing, "
|
||||
f"{core_missing_opt} optional missing{listed}"
|
||||
)
|
||||
if bundled:
|
||||
names = ", ".join(sorted({u["name"] for u in bundled}))
|
||||
print(f" Bundled with their emulator, not collected: {names}")
|
||||
if unplaced:
|
||||
print(f" Core files held but not packed: {len(unplaced)} "
|
||||
f"({_omission_reasons(unplaced)})")
|
||||
|
||||
# The missing files follow the line that counts them: printed after the
|
||||
# held-but-not-packed line, they read as files installed with their emulator.
|
||||
for u in req_not_in_repo:
|
||||
_print_undeclared_entry(u, "MISSING (required)", verbose)
|
||||
for u in req_hle_not_in_repo:
|
||||
@@ -1867,6 +1862,12 @@ def _print_undeclared_section(result: dict, verbose: bool) -> None:
|
||||
if verbose:
|
||||
for u in opt_not_in_repo:
|
||||
_print_undeclared_entry(u, "MISSING (optional)", verbose)
|
||||
if bundled:
|
||||
names = ", ".join(sorted({u["name"] for u in bundled}))
|
||||
print(f" Bundled with their emulator, not collected: {names}")
|
||||
if unplaced:
|
||||
print(f" Core files held but not packed: {len(unplaced)} "
|
||||
f"({_omission_reasons(unplaced)})")
|
||||
|
||||
if game_data:
|
||||
gd_missing = [u for u in game_data if not u["in_repo"]]
|
||||
|
||||
@@ -190,6 +190,18 @@ class HeldButNotPackedNamesEachReason(unittest.TestCase):
|
||||
"Game data held but not packed: 3 (2 installed with its emulator, "
|
||||
"1 no platform slug for its system)", text)
|
||||
|
||||
def test_a_missing_file_follows_the_line_that_counts_it(self):
|
||||
"""Indented under 'held but not packed: 102 (installed with its
|
||||
emulator)', Batocera's one missing sfiii2a.zip read as one of them."""
|
||||
missing = {"name": "sfiii2a.zip", "emulator": "FinalBurn Neo", "required": True,
|
||||
"in_repo": False, "category": "bios"}
|
||||
lines = self._printed(
|
||||
[missing, self._entry("a.rom", "installed with its emulator")]
|
||||
).splitlines()
|
||||
self.assertTrue(lines[0].startswith(" Core files: "), lines)
|
||||
self.assertIn("MISSING (required): FinalBurn Neo needs sfiii2a.zip", lines[1])
|
||||
self.assertTrue(lines[2].startswith(" Core files held but not packed: "), lines)
|
||||
|
||||
def test_a_single_reason_reads_as_before(self):
|
||||
text = self._printed([self._entry("a.rom", "installed with its emulator")] * 2)
|
||||
self.assertIn("Core files held but not packed: 2 (installed with its emulator)", text)
|
||||
|
||||
Reference in new issue
Block a user