mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-27 20:08:51 -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
+5
-6
@@ -2343,7 +2343,7 @@ class TestE2E(unittest.TestCase):
|
||||
"""
|
||||
from orchestrate.consistency import check_consistency
|
||||
from packs.packcounts import PackCounts, write_pack_counts
|
||||
from packs.platformpack import generate_pack
|
||||
from packs.platformpack import build_platform_pack
|
||||
from packs.verifyoutput import write_pack_destinations
|
||||
|
||||
profiles = load_emulator_profiles(self.emulators_dir)
|
||||
@@ -2352,11 +2352,10 @@ class TestE2E(unittest.TestCase):
|
||||
groups, group_results = [], []
|
||||
for platform in ("test_existence", "test_md5"):
|
||||
sink: list[PackCounts] = []
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
generate_pack(
|
||||
platform, self.platforms_dir, self.db, self.bios_dir, output_dir,
|
||||
emulators_dir=self.emulators_dir, emu_profiles=profiles, counts=sink,
|
||||
)
|
||||
build_platform_pack(
|
||||
platform, self.platforms_dir, self.db, self.bios_dir, output_dir,
|
||||
emulators_dir=self.emulators_dir, emu_profiles=profiles, counts=sink,
|
||||
)
|
||||
self.assertEqual(len(sink), 1)
|
||||
packs.append((platform, [platform], sink[0]))
|
||||
config = load_platform_config(platform, self.platforms_dir)
|
||||
|
||||
Reference in new issue
Block a user