mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 14:28:54 -06:00
refactor: move the probe inputs out of tests/
content.yml, oracle.yml, pack_content.yml and observations.yml are read by core_probe, the probes and the site build: they are inputs, not fixtures. measurements/ holds append-only <emulator>.jsonl records only, so they move to campaign/ at the root.
This commit is contained in:
1 parent
f9826e90cc
commit
5f354c8faf
20 files changed
+30
-28
No files matched your search
+3
-3
@@ -4,10 +4,10 @@
|
||||
A maintainer starts each pass. For each emulator profile in scope, the
|
||||
campaign takes the core (the libretro x86_64 Linux nightly, else a build of
|
||||
the profile's pinned commit), the test content of each of its systems
|
||||
(tests/campaign/content.yml, fetched through romfetch when it is not on
|
||||
(campaign/content.yml, fetched through romfetch when it is not on
|
||||
disk), and runs core_probe.py. The boot oracle of core_probe judges every
|
||||
run: boots, bios_error, crash, hang or unknown, against the reference frames
|
||||
and error patterns of tests/campaign/oracle.yml.
|
||||
and error patterns of campaign/oracle.yml.
|
||||
|
||||
files every declared file the collection holds, staged: the full set,
|
||||
and which files the core opens
|
||||
@@ -96,7 +96,7 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
help=f"romfetch command (default: ${ROMFETCH_ENV}, else romfetch on PATH)")
|
||||
scope.add_argument("--offline", action="store_true", help="no buildbot, no romfetch, no build")
|
||||
scope.add_argument("--content-file", default=str(CONTENT_FILE),
|
||||
help="the test content list (default: tests/campaign/content.yml)")
|
||||
help="the test content list (default: campaign/content.yml)")
|
||||
scope.add_argument("--allow-unsandboxed", action="store_true",
|
||||
help="run cores and builds without bubblewrap when it is missing (refused by default)")
|
||||
run_p = sub.add_parser("run", parents=[scope], help="one pass: cores, content, checks, rules")
|
||||
|
||||
@@ -1148,7 +1148,7 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
help="seconds per repetition, after which the run is killed and judged a hang")
|
||||
common.add_argument("--oracle", default=None, metavar="FILE",
|
||||
help="reference frames and error patterns the verdicts are judged against "
|
||||
"(default: tests/campaign/oracle.yml)")
|
||||
"(default: campaign/oracle.yml)")
|
||||
common.add_argument("--no-trace", action="store_true", help="do not run the worker under strace")
|
||||
common.add_argument("--require-sandbox", action="store_true",
|
||||
help="refuse to run the core unless bubblewrap can isolate it")
|
||||
@@ -1175,7 +1175,7 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
rejudge.add_argument("--emulator", action="append", default=[],
|
||||
help="only these emulators' records (default: every one)")
|
||||
rejudge.add_argument("--oracle", default=None, metavar="FILE",
|
||||
help="the oracle to judge against (default: tests/campaign/oracle.yml)")
|
||||
help="the oracle to judge against (default: campaign/oracle.yml)")
|
||||
rejudge.add_argument("--dry-run", action="store_true",
|
||||
help="print what would be appended, write nothing")
|
||||
worker = sub.add_parser("_worker", help="internal: one run in this process, started by the others")
|
||||
@@ -1348,7 +1348,7 @@ def check_result(variants: list[dict], observable: str) -> dict:
|
||||
|
||||
BOOTS, BIOS_ERROR, CRASH, HANG, UNKNOWN = "boots", "bios_error", "crash", "hang", "unknown"
|
||||
VERDICTS = (BOOTS, BIOS_ERROR, CRASH, HANG, UNKNOWN)
|
||||
DEFAULT_ORACLE = ROOT / "tests" / "campaign" / "oracle.yml"
|
||||
DEFAULT_ORACLE = ROOT / "campaign" / "oracle.yml"
|
||||
|
||||
|
||||
def oracle_for(data: dict, content_sha1: str | None, library_name: str | None) -> dict:
|
||||
|
||||
@@ -8,8 +8,8 @@ root, in one or both of the ways a user gets it:
|
||||
installer install.py --dest on the scratch root, from that pack and the
|
||||
published manifest (install/<platform>.json), with no network
|
||||
|
||||
Then for each system a test game covers (tests/campaign/content.yml and
|
||||
tests/campaign/pack_content.yml), it resolves the libretro cores the platform
|
||||
Then for each system a test game covers (campaign/content.yml and
|
||||
campaign/pack_content.yml), it resolves the libretro cores the platform
|
||||
runs for that system (platform config, target file, standalone and dual-mode
|
||||
lists), and runs the game through core_probe.py with the system directory
|
||||
taken from that layout.
|
||||
|
||||
@@ -26,7 +26,7 @@ if TYPE_CHECKING:
|
||||
from typing_extensions import Unpack
|
||||
|
||||
|
||||
CONTENT_FILE = REPO_ROOT / "tests" / "campaign" / "content.yml"
|
||||
CONTENT_FILE = REPO_ROOT / "campaign" / "content.yml"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ from resolve.standalone import platform_launches
|
||||
from resolve.entryscope import filter_files_by_mode
|
||||
|
||||
|
||||
PACK_CONTENT_FILE = REPO_ROOT / "tests" / "campaign" / "pack_content.yml"
|
||||
PACK_CONTENT_FILE = REPO_ROOT / "campaign" / "pack_content.yml"
|
||||
|
||||
|
||||
MAX_ROUNDS = 6
|
||||
|
||||
@@ -278,7 +278,7 @@ def collect(root: Path = REPO_ROOT, stored_records: list | None = None) -> list[
|
||||
from model.measurements import live, read_records
|
||||
|
||||
content: dict[str, list[tuple[str, Content]]] = {}
|
||||
for system, items in load_content(root / "tests" / "campaign" / "content.yml").items():
|
||||
for system, items in load_content(root / "campaign" / "content.yml").items():
|
||||
for item in items:
|
||||
content.setdefault(item.name, []).append((system, item))
|
||||
profiles = load_emulator_profiles(str(root / "emulators"))
|
||||
|
||||
@@ -126,7 +126,7 @@ def run_variant(args: argparse.Namespace, emu: Emulator, tree: Path, oracle: dic
|
||||
|
||||
|
||||
def emulator_oracle(emu: Emulator, path: Path, content_sha1: str) -> dict:
|
||||
"""The oracle core_probe reads (tests/campaign/oracle.yml), looked up by
|
||||
"""The oracle core_probe reads (campaign/oracle.yml), looked up by
|
||||
the content's sha1 and the emulator's name, with the emulator's own
|
||||
error strings added as patterns. Without the file the oracle names the
|
||||
module that holds every pattern."""
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
the game boots without it.
|
||||
|
||||
For a system whose profile marks its BIOS entries with `region:`, each test
|
||||
game of a region (tests/campaign/content.yml) runs through core_probe four
|
||||
game of a region (campaign/content.yml) runs through core_probe four
|
||||
times, each a record in measurements/<emulator>.jsonl:
|
||||
|
||||
full every regional BIOS the profile declares
|
||||
|
||||
@@ -51,7 +51,7 @@ SQLITE_SCHEMA_VERSION = "3"
|
||||
BULKY_OBSERVABLES = ("frame_hashes",)
|
||||
INDEX_SCHEMA_VERSION = 1
|
||||
# What a maintainer saw in an issue's runs, by record subject.
|
||||
OBSERVATIONS = Path("tests") / "campaign" / "observations.yml"
|
||||
OBSERVATIONS = Path("campaign") / "observations.yml"
|
||||
# A Proof line lists this many record links at most, else one link to the file.
|
||||
MAX_RECORD_LINKS = 8
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
common.add_argument("--samples", type=int, default=60, help="screen samples per repetition")
|
||||
common.add_argument("--interval", type=float, default=1.0, help="seconds between two samples")
|
||||
common.add_argument("--oracle", metavar="FILE",
|
||||
help="the boot oracle (default: tests/campaign/oracle.yml, as core_probe)")
|
||||
help="the boot oracle (default: campaign/oracle.yml, as core_probe)")
|
||||
common.add_argument("--png-dir", help="write each distinct sampled screen of repetition 0 as PNG")
|
||||
common.add_argument("--record", metavar="DIR", nargs="?", const=str(REPO_ROOT),
|
||||
help="append the record to measurements/<emulator>.jsonl in the checkout DIR")
|
||||
|
||||
Reference in new issue
Block a user