mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-23 18:17:53 -06:00
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:
1 parent
a732e69251
commit
ed19ae4198
15 files changed
+69
-67
No files matched your search
+4
-10
@@ -10,6 +10,7 @@ Usage:
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from core.paths import TRUTH_DIR
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
@@ -17,8 +18,7 @@ import sys
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from core.cli import add_repo_inputs
|
||||
from model.cliargs import platform_arg, require_platform
|
||||
from model.registry import list_registered_platforms
|
||||
from model.cliargs import platform_arg, selected_platforms
|
||||
from model.platforms import load_platform_config, native_layer
|
||||
from model.safeparse import require_yaml, yaml_load
|
||||
from model.targets import truth_target_dir
|
||||
@@ -203,7 +203,7 @@ def main() -> None:
|
||||
help="same as --format markdown, the spelling validate_pr uses",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--truth-dir", default="dist/truth",
|
||||
"--truth-dir", default=TRUTH_DIR,
|
||||
help="directory of the truth models generate_truth writes (default: "
|
||||
"%(default)s)",
|
||||
)
|
||||
@@ -215,13 +215,7 @@ def main() -> None:
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.all:
|
||||
platforms = list_registered_platforms(
|
||||
args.platforms_dir
|
||||
)
|
||||
else:
|
||||
require_platform(args.platform, args.platforms_dir)
|
||||
platforms = [args.platform]
|
||||
platforms = selected_platforms(args)
|
||||
|
||||
reports: list[dict] = []
|
||||
formatter = _format_markdown if args.format == "markdown" else _format_terminal
|
||||
|
||||
Reference in new issue
Block a user