mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-29 12:58:51 -06:00
refactor: hand the native model its profiles
This commit is contained in:
1 parent
7baeb6475c
commit
19bcc76c8f
5 files changed
+34
-20
No files matched your search
@@ -169,7 +169,7 @@ class NativeCacheTests(unittest.TestCase):
|
||||
|
||||
from resolve.truth import log as truth_log
|
||||
|
||||
def noisy(truth, scraped):
|
||||
def noisy(truth, scraped, profiles):
|
||||
truth_log.warning("WARNING: hash conflict for GameIndex.yaml (sha1: a vs b, core yaps2)")
|
||||
print("other diagnostic", file=sys.stderr)
|
||||
return {}, None
|
||||
|
||||
@@ -91,6 +91,13 @@ TRUTH = {
|
||||
},
|
||||
}
|
||||
|
||||
# The profiles that name the runners: beetle_psx answers to the buildbot's
|
||||
# mednafen_psx, duckstation has a standalone build.
|
||||
PROFILES = {
|
||||
"beetle_psx": {"type": "libretro", "cores": ["mednafen_psx"]},
|
||||
"duckstation": {"type": "standalone + libretro"},
|
||||
}
|
||||
|
||||
SCRAPED = {
|
||||
# The cores the platform runs, by its own names: an addition is written
|
||||
# with the runner that wants it.
|
||||
@@ -2443,7 +2450,7 @@ class BatoceraExport(unittest.TestCase):
|
||||
},
|
||||
}
|
||||
}
|
||||
systems, report = build_native_model(truth, SCRAPED)
|
||||
systems, report = build_native_model(truth, SCRAPED, PROFILES)
|
||||
(foreign,) = systems["nintendo-snes"].files
|
||||
self.assertTrue(foreign.foreign_system)
|
||||
own = next(fe for fe in systems["psx"].files if fe.name == "scph7001.bin")
|
||||
@@ -2956,7 +2963,7 @@ class AnAdditionCarriesItsRunner(unittest.TestCase):
|
||||
{"name": "b.bin", "md5": "2" * 32, "_cores": ["duckstation"]},
|
||||
{"name": "c.bin", "md5": "3" * 32, "_cores": ["no-such-core"]},
|
||||
]}}}
|
||||
systems, _ = build_native_model(truth, scraped)
|
||||
systems, _ = build_native_model(truth, scraped, PROFILES)
|
||||
runners = {fe.name: fe.runners for fe in systems["psx"].files}
|
||||
self.assertEqual(runners["a.bin"], [(False, "mednafen_psx")])
|
||||
self.assertEqual(runners["b.bin"], [(True, "duckstation")])
|
||||
|
||||
Reference in new issue
Block a user