mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-24 12:49:03 -05:00
The standalone build reads BIOS files from its data directory root, not from dc/ (core/oslib/oslib.cpp:118-196, core/stdclass.cpp:95-125, core/linux-dist/main.cpp:74-99). Each entry now carries standalone_path.
32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
"""Flycast's two builds read the same files from two directories.
|
|
|
|
The libretro port looks in <system>/dc/ (shell/libretro/libretro.cpp:2249-2250).
|
|
The standalone emulator looks in its data directory, whose root holds the
|
|
files with no dc/ level (core/oslib/oslib.cpp:118-196, core/stdclass.cpp:95-125).
|
|
Without standalone_path the standalone layout of a pack fell back on path:
|
|
and put every file one directory too deep.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
import yaml
|
|
|
|
PROFILE = Path(__file__).resolve().parent.parent / "emulators" / "flycast.yml"
|
|
|
|
|
|
class FlycastStandaloneLayout(unittest.TestCase):
|
|
def test_every_entry_has_the_data_directory_layout(self) -> None:
|
|
profile = yaml.safe_load(PROFILE.read_text(encoding="utf-8"))
|
|
self.assertEqual(profile["type"], "standalone + libretro")
|
|
for entry in profile["files"]:
|
|
with self.subTest(entry=entry["name"]):
|
|
self.assertTrue(entry["path"].startswith("dc/"))
|
|
self.assertEqual(entry.get("standalone_path"), entry["path"][len("dc/"):])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|