diff --git a/tests/campaign/oracle.yml b/tests/campaign/oracle.yml index 10e10f538..7724d4268 100644 --- a/tests/campaign/oracle.yml +++ b/tests/campaign/oracle.yml @@ -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 diff --git a/tests/test_core_probe.py b/tests/test_core_probe.py index ec5491236..942d20b48 100644 --- a/tests/test_core_probe.py +++ b/tests/test_core_probe.py @@ -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}")