From cb5bb738cb4ff3b5590911a3b18801f64566516c Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Tue, 27 Oct 2026 07:11:45 +0100 Subject: [PATCH] fix: core probe through run_cli, documented The probe skipped run_cli, accepted option prefixes in its shared options, left three options undocumented and was missing from the published schemas. The worker runs under -I, so the script directory is put back on sys.path before importing common. --- scripts/core_probe.py | 8 ++++++-- wiki/tools.md | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/core_probe.py b/scripts/core_probe.py index da6c92986..a52b9e5c1 100644 --- a/scripts/core_probe.py +++ b/scripts/core_probe.py @@ -742,7 +742,7 @@ def build_parser() -> argparse.ArgumentParser: formatter_class=argparse.RawDescriptionHelpFormatter, fromfile_prefix_chars="@") sub = parser.add_subparsers(dest="mode", required=True) - common = argparse.ArgumentParser(add_help=False, fromfile_prefix_chars="@") + common = argparse.ArgumentParser(add_help=False, allow_abbrev=False, fromfile_prefix_chars="@") common.add_argument("--core", required=True, help="libretro .so to load") common.add_argument("--content", help="content to load (a .cue is identified with its tracks)") common.add_argument("--content-label", help="identity of the content, e.g. its Redump name") @@ -976,4 +976,8 @@ def main(argv: Sequence[str] | None = None) -> int: if __name__ == "__main__": - sys.exit(main()) + # The worker runs under -I, which leaves the script directory off sys.path. + sys.path.insert(0, str(Path(__file__).resolve().parent)) + from common import run_cli + + run_cli(main) diff --git a/wiki/tools.md b/wiki/tools.md index 424628d3d..492e0c734 100644 --- a/wiki/tools.md +++ b/wiki/tools.md @@ -734,6 +734,8 @@ strace the record says that tracing was unavailable. | Option | Effect | |--------|--------| | `--system-file DEST=SRC` | copy SRC into a staged system directory as DEST | +| `--content-label` | identity of the content, such as its Redump name, copied into the record | +| `--work-dir`, `--timeout` | scratch directory for the staged runs, and seconds allowed per repetition (default 1800) | | `--option KEY=VALUE` | core option. Unset options take the first value the core declares | | `--frames`, `--warmup` | frames timed, and frames run before timing starts | | `--press FRAME:BUTTON[:LEN]` | hold a libretro joypad button on port 0 (`a`, `b`, `start`, `up`...). A menu may need 15 frames or more to see it |