mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-27 06:07:24 -05:00
fix: name every --all-variants pack in its check
--verify-packs after an --all-variants build rebuilt only the full pack's name and opened it alone. The five narrowed packs of the same run passed without a line. Each one is now named with the hash check the build ran on its members.
This commit is contained in:
1 parent
348c56e94c
commit
83d49d93a8
3 files changed
+72
-31
No files matched your search
@@ -53,6 +53,7 @@ class VerifyPackChoice(unittest.TestCase):
|
||||
"output_dir": str(self.out),
|
||||
"target": None,
|
||||
"regions": [],
|
||||
"all_variants": False,
|
||||
}
|
||||
values.update(overrides)
|
||||
return argparse.Namespace(**values)
|
||||
@@ -93,6 +94,27 @@ class VerifyPackChoice(unittest.TestCase):
|
||||
self._run(self._args())
|
||||
self.assertEqual(ctx.exception.code, 1)
|
||||
|
||||
def test_all_variants_names_every_variant_it_built(self):
|
||||
"""After --all-variants the check opened the full pack only: the five
|
||||
narrowed packs the same run wrote passed without a line."""
|
||||
import contextlib
|
||||
import io
|
||||
|
||||
names = []
|
||||
for source, required in self.gp.ALL_VARIANTS:
|
||||
tags = "".join(
|
||||
tag for tag, _ in self.gp._narrowings(source, None, None, False, required)
|
||||
)
|
||||
names.append(f"{self.stem}{tags}_BIOS_Pack.zip")
|
||||
self._touch(names[-1])
|
||||
out = io.StringIO()
|
||||
with contextlib.redirect_stdout(out):
|
||||
checked = self._run(self._args(all_variants=True))
|
||||
self.assertEqual(checked, [("retroarch", f"{self.stem}_BIOS_Pack.zip")])
|
||||
printed = out.getvalue()
|
||||
for name in names[1:]:
|
||||
self.assertIn(f"[{name}]: hashes checked during the build", printed)
|
||||
|
||||
def test_include_archived_reaches_the_archived_pack(self):
|
||||
stem = self.gp._platform_pack_stem(["retropie"], "retropie", "platforms")
|
||||
self._touch(f"{stem}_BIOS_Pack.zip")
|
||||
|
||||
Reference in new issue
Block a user