mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-01 13:58:55 -06:00
refactor: build platform packs without printing
build_platform_pack and build_split_packs return what the build came to and print nothing. print_platform_pack holds the report lines, and generate_pack and generate_split_packs compose the two. The variant choice, the plan and the data directory pass return their notices instead of printing them. The callers that silenced stdout to get a record now call the builder.
This commit is contained in:
1 parent
977d3f6874
commit
d8570c6480
15 files changed
+295
-205
No files matched your search
@@ -149,10 +149,11 @@ class ASplitBuildsOnlyTheTargetsSystems(unittest.TestCase):
|
||||
def record(*_a, **kw):
|
||||
if kw.get("system_filter"):
|
||||
asked.append(kw["system_filter"])
|
||||
return
|
||||
return platformpack.PlatformPackOutcome(zip_path=None)
|
||||
|
||||
with tempfile.TemporaryDirectory() as out, \
|
||||
mock.patch.object(platformpack, "generate_pack", record), \
|
||||
mock.patch.object(platformpack, "build_platform_pack", record), \
|
||||
mock.patch.object(platformpack, "print_split_packs"), \
|
||||
mock.patch.object(platformpack, "collect_emulator_extras", return_value=[]), \
|
||||
mock.patch.object(manifest, "collect_emulator_extras", return_value=[]):
|
||||
packs_platformpack.generate_split_packs(
|
||||
|
||||
Reference in new issue
Block a user