mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 22:38:54 -06:00
fix: data trees read the bundled predicate
This commit is contained in:
1 parent
2ff4acb965
commit
14dc75c6fb
2 files changed
+14
-1
No files matched your search
@@ -596,7 +596,7 @@ def _fold_data_directory_readers(
|
||||
# lists its resources, pcee2 lists patches.zip alone
|
||||
# (its build compiles GameIndex.yaml and the shaders in).
|
||||
continue
|
||||
installed = platform_name in (tree.get("installed_on") or [])
|
||||
installed = installed_with_emulator(tree, platform_name)
|
||||
for path, entries in by_path.items():
|
||||
if not path.startswith(prefix):
|
||||
continue
|
||||
|
||||
@@ -92,6 +92,19 @@ class DataDirectoryReaders(unittest.TestCase):
|
||||
self.assertEqual(entry["_cores"], ["armsx2", "lrps2"])
|
||||
self.assertNotIn("hash_conflict", entry)
|
||||
|
||||
def test_a_bundled_tree_brings_the_file_as_a_bundled_file_does(self):
|
||||
"""The tree read installed_on alone: a tree the emulator ships
|
||||
(bundled: true) counted its reader among those the platform must
|
||||
supply, so the entry asked for a file the emulator installs."""
|
||||
self.profiles["armsx2"]["files"][0]["bundled"] = True
|
||||
self.profiles["lrps2"]["data_directories"][0]["bundled"] = True
|
||||
entry = self._entry(self.registry)
|
||||
self.assertEqual(entry["_cores"], ["armsx2", "lrps2"])
|
||||
self.assertEqual(entry["_brought_by"], [])
|
||||
self.assertTrue(entry.get("bundled"))
|
||||
self.profiles["lrps2"]["data_directories"][0]["not_bundled_on"] = ["plat"]
|
||||
self.assertEqual(self._entry(self.registry)["_brought_by"], ["lrps2:libretro"])
|
||||
|
||||
def test_the_gaps_page_hands_truth_its_own_registry(self):
|
||||
"""The divergence table folded the checked-out repository's
|
||||
_data_dirs.yml under generate_site --platforms-dir."""
|
||||
|
||||
Reference in new issue
Block a user