50 lines
2.1 KiB
Python
50 lines
2.1 KiB
Python
#!/usr/bin/env python3
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
from __future__ import annotations
|
|
import argparse, json, unittest
|
|
from pathlib import Path
|
|
|
|
P = argparse.ArgumentParser()
|
|
P.add_argument("--root", type=Path, required=True)
|
|
ROOT = P.parse_args().root
|
|
|
|
|
|
class Phase10EB(unittest.TestCase):
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
cls.data = json.loads(
|
|
(ROOT / "manifests/retroarch/phase-1.0eb-public-launch-matrix.json").read_text()
|
|
)
|
|
|
|
def test_search_preserves_public_source_boundary(self):
|
|
scope = self.data["scope"]
|
|
self.assertTrue(scope["public_source_only"])
|
|
self.assertFalse(scope["candidate_binaries_executed"])
|
|
self.assertFalse(scope["proprietary_libraries_opened"])
|
|
self.assertFalse(scope["ps5_or_device_network_used"])
|
|
|
|
def test_independent_lnc_candidates_conflict(self):
|
|
candidates = self.data["candidates"]
|
|
self.assertEqual(candidates["ps5upload"]["parameter_bytes"], 24)
|
|
self.assertEqual(candidates["ps5_upload_suite"]["parameter_bytes"], 256)
|
|
self.assertFalse(self.data["correlation"]["independent_lnc_candidates_agree_on_parameter_size"])
|
|
self.assertTrue(candidates["ps5_upload_suite"]["multiple_fallback_calls"])
|
|
|
|
def test_no_independent_complete_replacement(self):
|
|
correlation = self.data["correlation"]
|
|
self.assertEqual(correlation["independent_bigapp_replacement_lineages"], 1)
|
|
self.assertFalse(correlation["complete_launch_replacement_abi_proven"])
|
|
self.assertFalse(correlation["firmware_960_videoout_ownership_proven"])
|
|
self.assertFalse(correlation["bounded_verified_cleanup_proven"])
|
|
|
|
def test_external_request_is_complete_and_gate_closed(self):
|
|
self.assertEqual(len(self.data["required_external_evidence"]), 7)
|
|
self.assertFalse(any(self.data["decision"][key] for key in (
|
|
"new_adr_allowed", "target_source_allowed", "target_build_allowed",
|
|
"device_authorization_actionable", "device_action_allowed")))
|
|
self.assertFalse(any(self.data["authorization"].values()))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main(argv=[__file__])
|