mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-01 00:27:20 -05:00
feat: let a reference name its variant
A reference taken from a check names the variant that ran the full set, and the test judges that variant's repetitions.
This commit is contained in:
1 parent
c639a1b3e5
commit
64af0a5d83
2 files changed
+7
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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}")
|
||||
|
||||
Reference in new issue
Block a user