fix: accept only registered platforms

require_platform checks the registry instead of any platforms/<name>.yml:
verify --platform _shared reported 0/0 present and exited 0. --all and
--platform resolve through model.cliargs.selected_platforms in auto_fetch,
generate_truth, diff_truth, export_native and verify. The truth directory
is core.paths.TRUTH_DIR for its writer and its three readers, and the
remaining literal database and profile paths read core.paths and
add_repo_inputs.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 06:04:31 +01:00
1 parent a732e69251
commit ed19ae4198
15 files changed
+69 -67

No files matched your search

+2 -2
View File
@@ -19,6 +19,7 @@ import re
from dataclasses import dataclass
from pathlib import Path
from core.cli import add_repo_inputs
from model.profiles import load_emulator_profiles
from model.region import REGIONS, normalize_declared
from model.safeparse import yaml_load
@@ -243,8 +244,7 @@ def main() -> int:
help=f"extra-file rules to check (default {EXTRAS_FILE})")
parser.add_argument("--headers", type=Path, default=HEADERS_FILE,
help=f"header readers the triggers name (default {HEADERS_FILE})")
parser.add_argument("--emulators-dir", default="emulators",
help="profiles the rules are checked against (default emulators)")
add_repo_inputs(parser, "emulators")
parser.add_argument("--json", action="store_true", help="print the summary as JSON")
args = parser.parse_args()
from model.cliargs import work_from_repo_root