mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-20 18:59:07 -05:00
fix: raise on a registry missing a platform file
list_registered_platforms skipped a registered platform whose YAML was missing and returned an empty list without a registry. verify --all --strict, every --all build, the CI matrix and the site then ran over fewer platforms and exited 0, and install.py kept serving the stale manifest. Both now raise and name the file.
This commit is contained in:
1 parent
c42c756b4a
commit
9fa1f45e92
2 files changed
+29
-3
No files matched your search
@@ -5355,5 +5355,24 @@ class ThePackCheckAppliesTheFrontendRule(unittest.TestCase):
|
||||
self.assertIsNotNone(_check_member_hash(zf, "bios/x.bin", entry, "md5"))
|
||||
|
||||
|
||||
class ABrokenRegistryIsNotAnEmptyOne(unittest.TestCase):
|
||||
"""A registered platform whose YAML was renamed was skipped without a
|
||||
word, and a missing registry read as no platforms: verify --all --strict
|
||||
and every --all build passed having checked nothing."""
|
||||
|
||||
def test_both_raise(self):
|
||||
from scripts.common import list_registered_platforms
|
||||
|
||||
with tempfile.TemporaryDirectory(dir=TMP_ROOT) as tmp:
|
||||
with self.assertRaises(FileNotFoundError):
|
||||
list_registered_platforms(tmp)
|
||||
Path(tmp, "_registry.yml").write_text(
|
||||
"platforms:\n rocknix:\n config: rocknix.yml\n", encoding="utf-8"
|
||||
)
|
||||
with self.assertRaises(FileNotFoundError) as caught:
|
||||
list_registered_platforms(tmp)
|
||||
self.assertIn("rocknix", str(caught.exception))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user