fix: data trees read the bundled predicate

This commit is contained in:
Abdessamad Derraz committed 2026-11-23 23:07:45 +01:00
1 parent 2ff4acb965
commit 14dc75c6fb
2 files changed
+14 -1

No files matched your search

+1 -1
View File
@@ -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
+13
View File
@@ -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."""