refactor: split the manifest build from its entry

This commit is contained in:
Abdessamad Derraz committed 2026-11-24 06:18:03 +01:00
1 parent c186a2acbd
commit e9206e7cc8
5 files changed
+547 -530

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ COMMANDS = {
"packs/platformpack.py", "packs/platformreport.py", "packs/emulatorpack.py",
"packs/md5pack.py", "packs/targets.py",
"packs/manifestentry.py", "packs/manifestcores.py", "packs/standalone.py",
"packs/manifest.py", "packs/finalize.py", "packs/outputdir.py", "packs/variants.py",
"packs/manifest.py", "packs/manifestbuild.py", "packs/finalize.py", "packs/outputdir.py", "packs/variants.py",
"packs/manifestrun.py", "packs/packcheck.py", "packs/runscope.py", "packs/platformrun.py",
"packs/packoptions.py", "packs/packmodes.py", "packs/packcounts.py",
"packs/emulatorentries.py", "packs/integrity.py",
+1 -1
View File
@@ -545,7 +545,7 @@ class TestBuilderAndVerifierAgree(unittest.TestCase):
# override lookup both sides must perform. The old anchor was a string
# the test above forbids, so the window was the whole file.
mode_test = re.compile(r"""[=!]=\s*["'](?:md5|sha1|existence)["']""")
for name in ("packs/platformpack.py", "packs/manifest.py", "packs/coverage.py"):
for name in ("packs/platformpack.py", "packs/manifestbuild.py", "packs/coverage.py"):
source = Path(__file__).resolve().parents[1] / "scripts" / name
body = source.read_text(encoding="utf-8")
anchors = [m.start() for m in re.finditer(r"slot_overrides\.get\(", body)]
+4 -4
View File
@@ -150,7 +150,7 @@ class ASplitBuildsOnlyTheTargetsSystems(unittest.TestCase):
def test_no_part_is_asked_for_a_dropped_system(self):
from unittest import mock
from packs import manifest, platformpack
from packs import manifestbuild, platformpack
from packs import platformpack as packs_platformpack
from model.profiles import load_emulator_profiles
@@ -167,7 +167,7 @@ class ASplitBuildsOnlyTheTargetsSystems(unittest.TestCase):
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=[]):
mock.patch.object(manifestbuild, "collect_emulator_extras", return_value=[]):
packs_platformpack.generate_split_packs(
"retroarch", platforms, {"files": {}}, "bios", out,
emu_profiles=profiles,
@@ -316,7 +316,7 @@ class TheSplitDirectoryReadsThePackStem(unittest.TestCase):
def test_a_reserved_character_is_made_safe_as_in_the_full_pack(self):
from unittest import mock
from packs import manifest, md5pack, naming
from packs import manifest, manifestbuild, md5pack, naming
from packs import platformpack as packs_platformpack
config = {"platform": "Foo: Bar", "version": "release/1.22", "systems": {}}
@@ -326,7 +326,7 @@ class TheSplitDirectoryReadsThePackStem(unittest.TestCase):
mock.patch.object(manifest, "load_platform_config", return_value=config), \
mock.patch.object(md5pack, "load_platform_config", return_value=config), \
mock.patch.object(packs_platformpack, "collect_emulator_extras", return_value=[]), \
mock.patch.object(manifest, "collect_emulator_extras", return_value=[]):
mock.patch.object(manifestbuild, "collect_emulator_extras", return_value=[]):
packs_platformpack.generate_split_packs(
"foo", "platforms", {"files": {}}, "bios", out, emu_profiles={},
)