Files
chimera-gfx-Public/tests/test_retroarch_phase10dc.py
Chimera GFX release export a6037502d7
phase0-ci / build-and-audit (push) Successful in 2m14s
Publish Chimera GFX source
2026-09-03 03:27:14 +02:00

13 lines
1.3 KiB
Python

#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
from __future__ import annotations
import argparse,copy,importlib.util,json
from pathlib import Path
p=argparse.ArgumentParser();p.add_argument("--root",type=Path,required=True);root=p.parse_args().root.resolve();s=importlib.util.spec_from_file_location("v",root/"tools/validate_retroarch_phase10dc.py");assert s and s.loader;v=importlib.util.module_from_spec(s);s.loader.exec_module(v);original=json.loads((root/"manifests/retroarch/phase-1.0dc-inactive-bigapp-comparison-gate.json").read_text())
mutations=[lambda r:r["activation"].update(active=True),lambda r:r["activation"].update(run_id="LIVE"),lambda r:r["authorizations"].update(ps5_connection_authorized=True),lambda r:r["implementation_boundary"].update(socket_present=True),lambda r:r["candidate_contract"].update(exact_payload_sha256="0"*64),lambda r:r["candidate_contract"].update(fixed_existing_title="FAKE00000"),lambda r:r["forbidden_effects"].update(automatic_retry=False),lambda r:r["decision"].update(device_action_allowed=True)]
for index,mutation in enumerate(mutations,1):
value=copy.deepcopy(original);mutation(value)
if not v.errors(value):print("FAIL",index);raise SystemExit(1)
print("PASS",index)
print("Phase-1.0DC guardrails passed:",len(mutations))