mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-13 21:43:55 -06:00
fix: keep a buildbot core beside its standalone
installable_cores removed every buildbot name the image builds, so a libretro core sharing its name with a standalone package was lost: Batocera runs amiberry standalone and its x86_64 boards fetch amiberry_libretro. A name now compares within its build mode, and the resolver and the layouts treat such a core as the emulator's libretro build, run both ways. Batocera gains amiberry, azahar, cannonball, cemu, dosbox, ecwolf, eduke32, fsuae, openmsx, rpcs3, supermodel, vita3k, xemu and ymir as installable, KNULLI cannonball.
This commit is contained in:
1 parent
96faec98a4
commit
bc8669c45c
7 files changed
+78
-11
No files matched your search
@@ -660,13 +660,15 @@ class AmiberryOnEachPlatform(unittest.TestCase):
|
||||
|
||||
class AmiberryBuildEachPlatformShips(unittest.TestCase):
|
||||
"""Each platform resolves the name amiberry to the build its own package
|
||||
compiles. RetroBat keeps the 8.5.0 libretro core beside its standalone."""
|
||||
compiles. RetroBat keeps the 8.5.0 libretro core beside its standalone,
|
||||
and Batocera's x86_64 boards fetch it with RetroArch's core downloader
|
||||
(installable_cores)."""
|
||||
|
||||
OWN = {
|
||||
"rocknix": {"amiberry-5.6.5"},
|
||||
"amberelec": {"amiberry-7.1.1"},
|
||||
"emuelec": {"amiberry-8.0.0"},
|
||||
"batocera": {"amiberry-7.1.1-332"},
|
||||
"batocera": {"amiberry", "amiberry-7.1.1-332"},
|
||||
"knulli": {"amiberry-7.1.1"},
|
||||
"recalbox": {"amiberry-8.2.2"},
|
||||
"retrobat": {"amiberry", "amiberry-8.3.0"},
|
||||
|
||||
@@ -299,7 +299,40 @@ class CoreDownloaderReach(unittest.TestCase):
|
||||
if entry["architecture"] == "aarch64":
|
||||
self.assertNotIn("downloads", entry)
|
||||
with self.subTest(platform=platform):
|
||||
self.assertEqual(set(config["installable_cores"]), fetched - set(config["cores"]))
|
||||
built = ((set(config["cores"]) - set(config.get("standalone_cores") or []))
|
||||
| set(config.get("dual_mode_cores") or []))
|
||||
self.assertEqual(set(config["installable_cores"]), fetched - built)
|
||||
|
||||
def test_a_standalone_name_keeps_its_buildbot_core(self):
|
||||
"""Batocera runs amiberry standalone, and its x86_64 boards fetch
|
||||
amiberry_libretro: removing every name the image builds lost the
|
||||
libretro core to the name it shares with the standalone package."""
|
||||
from common import DUAL_MODE_PREFIX, resolve_platform_cores, standalone_set # noqa: PLC0415
|
||||
from scraper.batocera_scraper import installable_cores # noqa: PLC0415
|
||||
from scraper.targets.batocera_targets_scraper import BuildSelection # noqa: PLC0415
|
||||
|
||||
selection = BuildSelection(
|
||||
targets={"x86_64": {"architecture": "x86_64", "cores": [],
|
||||
"downloads": "linux-x86_64"}},
|
||||
emulators=frozenset(), listed=frozenset(), symbols=frozenset(), packages={},
|
||||
)
|
||||
found = installable_cores(selection, ["amiberry", "mgba", "dolphin"],
|
||||
["amiberry", "dolphin"], ["dolphin"])
|
||||
self.assertIn("amiberry", found)
|
||||
self.assertNotIn("mgba", found)
|
||||
self.assertNotIn("dolphin", found)
|
||||
|
||||
profiles = {
|
||||
"amiberry": {"type": "libretro", "cores": ["amiberry"], "systems": ["amiga"]},
|
||||
"amiberry-7": {"type": "standalone", "cores": ["amiberry"], "systems": ["amiga"],
|
||||
"built_by": ["demo"], "source": "https://x/amiberry"},
|
||||
}
|
||||
config = {"_key": "demo", "cores": ["amiberry"], "standalone_cores": ["amiberry"],
|
||||
"installable_cores": ["amiberry"]}
|
||||
self.assertEqual(resolve_platform_cores(config, profiles), {"amiberry", "amiberry-7"})
|
||||
self.assertEqual(resolve_platform_cores({**config, "installable_cores": []}, profiles),
|
||||
{"amiberry-7"})
|
||||
self.assertIn(DUAL_MODE_PREFIX + "amiberry", standalone_set(config))
|
||||
|
||||
|
||||
class KnulliPerBoard(unittest.TestCase):
|
||||
|
||||
Reference in new issue
Block a user