fix: skip the mame ref audit on a partial cache

The audit reads driver sources from the upstream cache offline. An empty cache skipped, but one holding some drivers raised NotCachedError and failed the suite. It now skips naming the file. The testing guide lists the semantic gate test.
This commit is contained in:
Abdessamad Derraz committed 2026-10-22 16:49:10 +02:00
1 parent 76af36d903
commit bc3577ea57
2 files changed
+9 -4

No files matched your search

+8 -3
View File
@@ -117,9 +117,14 @@ class TestCorpusStaysCorrect(unittest.TestCase):
self.skipTest("no upstream cache")
for name in ("mame", "mamearcade", "mamemess", "groovymame"):
with self.subTest(emulator=name):
findings, agreed, _ = mame_ref_audit.audit(
name, str(ROOT / "emulators"), str(cache), True
)
try:
findings, agreed, _ = mame_ref_audit.audit(
name, str(ROOT / "emulators"), str(cache), True
)
except mame_ref_audit.upstream.NotCachedError as exc:
# A cache that holds some drivers and not others is as
# cold as an empty one for this profile.
self.skipTest(f"{name}: {exc}")
if not agreed and not findings:
self.skipTest(f"{name}: driver sources not cached")
self.assertEqual(