mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 12:19:13 -05:00
fix: fold case in the site gap report too
This commit is contained in:
1 parent
91a9d2279e
commit
768b42e807
2 files changed
+29
-1
No files matched your search
@@ -654,14 +654,22 @@ def build_emulator_gap_report(
|
||||
for k, v in profiles.items()
|
||||
if v.get("type") not in ("alias", "test")
|
||||
}
|
||||
from common import standalone_set
|
||||
from common import platform_declarations, standalone_set
|
||||
from validation import case_folded_slots
|
||||
|
||||
# The command line passes these too: without them a RetroBat file named
|
||||
# 32X_G_BIOS.BIN read as missing for a core opening 32X_G_BIOS.bin.
|
||||
folded = frozenset().union(*(
|
||||
case_folded_slots(cov["config"], platform_declarations(cov["config"], db))
|
||||
for cov in coverages.values()
|
||||
))
|
||||
return run_cross_reference(
|
||||
unique_profiles, declared, db,
|
||||
data_names=data_names, all_declared=all_declared,
|
||||
standalone_cores=set().union(
|
||||
*(standalone_set(cov["config"]) for cov in coverages.values())
|
||||
),
|
||||
folded_slots=folded,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -97,5 +97,25 @@ class TheRunningBuildPlacesTheGap(unittest.TestCase):
|
||||
self.assertEqual(self._gap_paths(set()), ["Cemu/keys.txt"])
|
||||
|
||||
|
||||
class EveryGapReportFoldsCase(unittest.TestCase):
|
||||
"""The command line passed folded_slots and the site did not, so the
|
||||
gaps page listed RetroBat files the CLI report settled."""
|
||||
|
||||
def test_each_cross_reference_call_passes_the_folded_slots(self):
|
||||
import ast
|
||||
|
||||
for script in ("cross_reference.py", "generate_site.py"):
|
||||
source = (REPO_ROOT / "scripts" / script).read_text(encoding="utf-8")
|
||||
calls = [
|
||||
node for node in ast.walk(ast.parse(source))
|
||||
if isinstance(node, ast.Call)
|
||||
and getattr(node.func, "id", "") in ("cross_reference", "run_cross_reference")
|
||||
]
|
||||
with self.subTest(script=script):
|
||||
self.assertTrue(calls)
|
||||
for call in calls:
|
||||
self.assertIn("folded_slots", {kw.arg for kw in call.keywords})
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user