chore: merge the reference variant key

This commit is contained in:
Abdessamad Derraz committed 2026-10-27 23:18:30 +01:00
commit d893823fe1
2 files changed
+7 -2

No files matched your search

+2 -1
View File
@@ -6,7 +6,8 @@
# retro_get_system_info gives): the reference frames a run with
# the full BIOS set reaches. Each was recorded once
# (`recorded_from`, the record id) and reviewed by looking at its
# PNG. `stage: bios` is a screen only the console's own BIOS
# PNG, from the variant `variant` names when that run was a
# check. `stage: bios` is a screen only the console's own BIOS
# draws, `stage: game` a screen of the content. A run that reaches
# one of them boots.
# error_patterns log lines after which a core stops, read from its source
+5 -1
View File
@@ -298,7 +298,11 @@ class OracleTests(unittest.TestCase):
record = records.get(block["recorded_from"])
self.assertIsNotNone(record, f"{item['name']} on {library}: {block['recorded_from']}")
self.assertEqual(record["inputs"]["content"]["sha1"], item["sha1"], item["name"])
for rep in record["variants"][0]["repetitions"]:
# A check names the variant that ran the full set, a run has one.
label = block.get("variant")
chosen = next(v for v in record["variants"] if v["label"] == label) if label \
else record["variants"][0]
for rep in chosen["repetitions"]:
oracle = core_probe.oracle_for(data, item["sha1"], rep["library_name"])
verdict, evidence = core_probe.judge(rep, oracle)
self.assertEqual(verdict, "boots", f"{item['name']} on {library}: {evidence}")