mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 20:38:52 -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
@@ -8,14 +8,15 @@ Usage:
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from core.paths import TRUTH_DIR
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.dirname(__file__))
|
||||
from model.targets import target_scope, truth_target_dir
|
||||
from model.cliargs import platform_arg, require_platform
|
||||
from model.registry import list_registered_platforms, load_data_dir_registry, load_platform_registry
|
||||
from model.cliargs import platform_arg, selected_platforms
|
||||
from model.registry import load_data_dir_registry, load_platform_registry
|
||||
from model.database import load_optional_database
|
||||
from model.profiles import load_emulator_profiles
|
||||
from model.platforms import load_platform_config
|
||||
@@ -26,7 +27,7 @@ from resolve.truth import generate_platform_truth
|
||||
|
||||
yaml = require_yaml()
|
||||
|
||||
DEFAULT_OUTPUT_DIR = "dist/truth"
|
||||
DEFAULT_OUTPUT_DIR = TRUTH_DIR
|
||||
|
||||
|
||||
def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
|
||||
@@ -63,13 +64,7 @@ def main(argv: list[str] | None = None) -> None:
|
||||
|
||||
db = load_optional_database(args.db)
|
||||
|
||||
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)
|
||||
|
||||
# A named platform without that target is refused, as verify and
|
||||
# generate_pack refuse it: skipped, it printed Done. and exited 0 with
|
||||
|
||||
Reference in new issue
Block a user