mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-29 12:58:51 -06:00
fix: read targets from the config's own tree
resolve_platform_cores and offer_boards read the RetroArch and platform targets under the repository, whatever --platforms-dir a run was given, behind a process-long cache. load_platform_config now records the directory it read (_platforms_dir), the resolver reads targets from it, the cache is keyed on that directory, and downloadable_on takes it from its callers. The key is kept out of the published registry export.
This commit is contained in:
1 parent
6aca93231a
commit
8780398518
7 files changed
+69
-22
No files matched your search
@@ -645,7 +645,7 @@ class TheContractsValidate(unittest.TestCase):
|
||||
self.skipTest("jsonschema is a tooling dependency")
|
||||
|
||||
from model.registry import list_registered_platforms
|
||||
from model.platforms import load_platform_config
|
||||
from model.platforms import PLATFORMS_DIR_KEY, load_platform_config
|
||||
|
||||
schema = json.loads((REPO_ROOT / "schemas" / "platform.schema.json").read_text())
|
||||
validator = Draft202012Validator(schema)
|
||||
@@ -658,7 +658,11 @@ class TheContractsValidate(unittest.TestCase):
|
||||
self.assertEqual(errors, [])
|
||||
self.assertIn("install", registry)
|
||||
self.assertNotIn("_key", registry)
|
||||
self.assertEqual(set(contract) | set(registry) | {"_key"}, set(config) | {"_key"})
|
||||
# The directory a run loaded the config from is no published field.
|
||||
self.assertNotIn(PLATFORMS_DIR_KEY, registry)
|
||||
unpublished = {"_key", PLATFORMS_DIR_KEY}
|
||||
self.assertEqual(set(contract) | set(registry) | unpublished,
|
||||
set(config) | unpublished)
|
||||
|
||||
def test_every_schema_id_is_the_address_it_is_served_at(self):
|
||||
for path in sorted((REPO_ROOT / "schemas").glob("*.schema.json")):
|
||||
|
||||
Reference in new issue
Block a user