From 24d161604b733bd1108e289faa62beaa5c4a7073 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Sat, 17 Oct 2026 04:45:13 +0200 Subject: [PATCH] fix: let retrodeck's components name its cores The registry list added clk and gsplus, which RetroDECK does not ship as components, current or archived, and overrode the list the scraper reads from the component manifests. --- platforms/_registry.yml | 22 --------------------- tests/test_scraper_contract.py | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 22 deletions(-) diff --git a/platforms/_registry.yml b/platforms/_registry.yml index 756606e8..183f0c33 100644 --- a/platforms/_registry.yml +++ b/platforms/_registry.yml @@ -306,28 +306,6 @@ platforms: - username: monster-penguin contribution: platform support pr: 36 - cores: - - azahar - - cemu - - clk - - dolphin - - duckstation - - gsplus - - gzdoom - - mame - - melonds - - openbor - - pcsx2 - - pico-8 - - ppsspp - - primehack - - retroarch - - rpcs3 - - ruffle - - solarus - - vita3k - - xemu - - xroar target_scraper: null target_source: null install: diff --git a/tests/test_scraper_contract.py b/tests/test_scraper_contract.py index 7e12e5d7..4602fb6d 100644 --- a/tests/test_scraper_contract.py +++ b/tests/test_scraper_contract.py @@ -295,6 +295,42 @@ class RetroBatCoresFromItsES(unittest.TestCase): self.assertIn("snes9x", platform["cores"]) +class RocknixRunsItsStandaloneEmulators(unittest.TestCase): + """ROCKNIX declared all_libretro while it packages duckstation, dolphin, + ppsspp and 33 other emulators standalone, and read rocknix-systems on + the next branch under the release's version.""" + + def test_package_names_reach_the_profiles(self): + from scraper.rocknix_scraper import standalone_emulators + + self.assertEqual( + standalone_emulators(["duckstation-sa", "hatarisa", "openbor"]), + ["duckstation", "duckstation-sa", "hatari", "hatarisa", "openbor"], + ) + + def test_the_platform_file_is_read_at_its_release(self): + import yaml + + root = Path(__file__).resolve().parents[1] + platform = yaml.safe_load((root / "platforms" / "rocknix.yml").read_text()) + self.assertIn(f"/distribution/{platform['version']}/", platform["source"]) + self.assertIn("retroarch", platform["cores"]) + registry = yaml.safe_load((root / "platforms" / "_registry.yml").read_text()) + self.assertNotIn("cores", registry["platforms"]["rocknix"]) + + +class RetroDeckCoresAreItsComponents(unittest.TestCase): + """The registry added clk and gsplus to RetroDECK, which ships neither + as a component, current or archived.""" + + def test_the_registry_leaves_the_list_to_the_scraper(self): + import yaml + + root = Path(__file__).resolve().parents[1] + registry = yaml.safe_load((root / "platforms" / "_registry.yml").read_text()) + self.assertNotIn("cores", registry["platforms"]["retrodeck"]) + + class UnreadableReleaseStopsTheScrape(unittest.TestCase): """A failed tag lookup fell back to master, or to an empty or invented version. BizHawk, RomM, Batocera and Recalbox then wrote a YAML read from