mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-25 10:58:52 -06:00
docs: name the probe modules where they live
This commit is contained in:
1 parent
cacd290d2e
commit
fa408c4299
8 files changed
+16
-15
No files matched your search
+1
-1
@@ -21,7 +21,7 @@ and error patterns of tests/campaign/oracle.yml.
|
||||
bench with --bench only: the content timed, warm-up excluded
|
||||
|
||||
Every run is a record in measurements/<emulator>.jsonl. The fixed rule table
|
||||
(campaign_rules.py) reads the verdicts, never a comparison of frames. A
|
||||
(probes/rules.py) reads the verdicts, never a comparison of frames. A
|
||||
verdict the table settles is written into the profile with the record ids
|
||||
as `evidence:`. Any other goes to measurements/findings.jsonl, where the
|
||||
site lists it as open. Each pass adds one line to
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""The measurements the site shows, from the records under measurements/.
|
||||
|
||||
The records are core probe runs, one append-only .jsonl per emulator with one
|
||||
full record per line (measurement_records.py). From them the build writes,
|
||||
full record per line (model/measurements.py). From them the build writes,
|
||||
never committed:
|
||||
|
||||
public/data/measurements/index.json the compact index the explorer and
|
||||
|
||||
@@ -843,7 +843,7 @@ def _format_errors() -> list[str]:
|
||||
|
||||
def _measurement_errors(root: Path | None = None) -> list[str]:
|
||||
"""Every record line under measurements/, against its schema and the
|
||||
rules measurement_records.read_records applies."""
|
||||
rules model.measurements.read_records applies."""
|
||||
from model import measurements as mr
|
||||
|
||||
root = root or ROOT
|
||||
|
||||
@@ -26,7 +26,7 @@ from pathlib import Path
|
||||
from typing import ClassVar
|
||||
|
||||
import core_probe
|
||||
from model import measurements as measurement_records
|
||||
from model import measurements as mr
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
@@ -313,7 +313,7 @@ class OracleTests(unittest.TestCase):
|
||||
again with the oracle as it stands, every repetition of that run
|
||||
boots, so a frame copied wrong or a stage mislabelled fails here."""
|
||||
data, _ = core_probe.load_oracle(core_probe.DEFAULT_ORACLE)
|
||||
records = {s.record["id"]: s.record for s in measurement_records.read_records(REPO_ROOT)}
|
||||
records = {s.record["id"]: s.record for s in mr.read_records(REPO_ROOT)}
|
||||
checked = 0
|
||||
for item in data.get("content") or ():
|
||||
for library, block in item["references"].items():
|
||||
@@ -526,7 +526,7 @@ class FakeCoreTests(unittest.TestCase):
|
||||
for p in record_dir.rglob("*") if p.is_file() and ".git" not in p.parts],
|
||||
["measurements/fake.jsonl"])
|
||||
line = json.loads((record_dir / "measurements" / "fake.jsonl").read_text())
|
||||
self.assertEqual(measurement_records.check_line(line), [])
|
||||
self.assertEqual(mr.check_line(line), [])
|
||||
# The line is the record the run printed, id included.
|
||||
self.assertEqual(line, record)
|
||||
try:
|
||||
@@ -600,7 +600,7 @@ class FakeCoreTests(unittest.TestCase):
|
||||
self.assertEqual(again["variants"][0]["repetitions"][0]["logs"], first["variants"][0]["repetitions"][0]["logs"])
|
||||
self.assertEqual(again["recorded_at"], first["recorded_at"])
|
||||
self.assertIn("judged_at", again)
|
||||
self.assertEqual(measurement_records.check_line(again), [])
|
||||
self.assertEqual(mr.check_line(again), [])
|
||||
self.assert_schema(again)
|
||||
# Judged once: a second pass has nothing to add.
|
||||
with contextlib.redirect_stdout(io.StringIO()), contextlib.redirect_stderr(io.StringIO()):
|
||||
@@ -633,7 +633,7 @@ class FakeCoreTests(unittest.TestCase):
|
||||
except ImportError:
|
||||
return
|
||||
schema = json.loads((REPO_ROOT / "schemas" / "core-probe-record.schema.json").read_text())
|
||||
sealed = measurement_records.seal({**record, "emulator": "fake", "subject": "s"})
|
||||
sealed = mr.seal({**record, "emulator": "fake", "subject": "s"})
|
||||
self.assertEqual([e.message for e in Draft202012Validator(schema).iter_errors(sealed)], [])
|
||||
|
||||
def test_a_run_waits_for_the_host_lock_and_frees_it(self) -> None:
|
||||
|
||||
@@ -27,7 +27,7 @@ from model import measurements as mr
|
||||
import pack_probe as pp
|
||||
from probes import packlayout
|
||||
from probes import packprobe
|
||||
from model import profiles as model_profiles
|
||||
from model.profiles import load_emulator_profiles
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
|
||||
@@ -358,7 +358,7 @@ class RealLayouts(unittest.TestCase):
|
||||
self.assertEqual(set(lay.files), members)
|
||||
self.assertEqual(lay.files["scph5501.bin"], "scph5501.bin")
|
||||
self.assertEqual(lay.source["pack"]["members"], len(members))
|
||||
swan = model_profiles.load_emulator_profiles(str(REPO_ROOT / "emulators"))["swanstation"]
|
||||
swan = load_emulator_profiles(str(REPO_ROOT / "emulators"))["swanstation"]
|
||||
self.assertIn("scph5501.bin", packprobe.initial_stage(lay, swan, []))
|
||||
|
||||
def test_installer_path(self) -> None:
|
||||
|
||||
@@ -1164,19 +1164,19 @@ class SourceLinksOnlyWhereTheFileIs(unittest.TestCase):
|
||||
def test_every_rendered_link_is_recorded(self):
|
||||
record = json.loads(sources.SOURCE_PATHS.read_text(encoding="utf-8"))
|
||||
pages = sorted(_built(DOCS / "emulators").rglob("*.md*")) + sorted(DOCS.glob("gaps*.md*"))
|
||||
from model import measurements as measurement_records
|
||||
from model import measurements as mr
|
||||
|
||||
# A Tested block links a record line and its data file in this
|
||||
# repository. The records are append-only, so a file a permalink
|
||||
# names is still in the tree.
|
||||
records = set(measurement_records.tree_files(REPO_ROOT))
|
||||
records = set(mr.tree_files(REPO_ROOT))
|
||||
checked, stray = 0, []
|
||||
for page in pages:
|
||||
for found in _PERMALINK.finditer(page.read_text(encoding="utf-8")):
|
||||
key = f"{found['host']}/{found['slug']}@{found['pin']}"
|
||||
path = urllib.parse.unquote(found["path"])
|
||||
if "/Abdess/retrobios/" in found[0]:
|
||||
if path.startswith(f"{measurement_records.RECORDS_DIR}/") and path not in records:
|
||||
if path.startswith(f"{mr.RECORDS_DIR}/") and path not in records:
|
||||
stray.append((page.name, key, path))
|
||||
continue
|
||||
checked += 1
|
||||
|
||||
@@ -39,6 +39,7 @@ scripts/ all tooling (Python and pyyaml, jsonschema for schema c
|
||||
scraper/targets/ hardware target scrapers (one *_targets_scraper.py per platform)
|
||||
exporter/ native format exporters (batocera, recalbox, emudeck...)
|
||||
sitegen/ the site and README generators: pages, navigation, data files
|
||||
probes/ real-condition runs: the campaign, the pack and region probes
|
||||
install/ JSON install manifests per platform
|
||||
targets/ JSON target manifests per platform (cores per architecture)
|
||||
install.py the installer, with install.sh and install.ps1 to start it,
|
||||
|
||||
+2
-2
@@ -1067,7 +1067,7 @@ host (CPU, kernel, Python, load before and after) and each input by hash.
|
||||
Core log lines arrive through the libretro log interface. Floating-point
|
||||
arguments of a log line cannot be read from Python and print as `<double>`.
|
||||
|
||||
A record is stored whole, as one line (`measurement_records.py`): the claim,
|
||||
A record is stored whole, as one line (`model/measurements.py`): the claim,
|
||||
method, result, host, core build, frontend commit, inputs by hash, and every
|
||||
repetition of every variant in full (per-frame hashes, core logs, declared
|
||||
options), with the raw timing values the statistics come from. The id is the
|
||||
@@ -1131,7 +1131,7 @@ python scripts/campaign.py gate # the checks behind a commit
|
||||
| Core | The x86_64 Linux nightly from `buildbot.libretro.com`, for each name of the profile's `cores:` the buildbot publishes, downloaded again only when its `ETag` or `Last-Modified` changes. The record keeps the artifact URL, the `.so` sha256 and the `retro_get_system_info` version. With no nightly, the profile's `source_commit` is cloned and built once with `make` (`Makefile.libretro` first), the failure kept so it is not tried again for that commit. Host git only fetches into bare mirrors (`.cache/campaign/mirrors/`), one per repository, submodules included, that it alone touches: no working tree, never bound into a sandbox, and earlier working-tree clones are deleted. It runs with no user or system config, https as the only transport, and `-c` overrides emptying hooks, `core.fsmonitor`, `core.sshCommand`, `core.gitProxy`, credential helpers and every filter driver the mirror's config defines. The commit and each submodule at the commit its tree records are exported with `git archive` into a fresh folder, and `make` runs there in the same bubblewrap sandbox as a core, that folder the one writable path. The core copied out is the newest `*_libretro.so` that is a regular file inside that folder, opened without following links. The record's `build_command` says which isolation was used. A standalone emulator is `pending: standalone` |
|
||||
| Content | Each system's games come from `tests/campaign/content.yml`, by catalog name and with the reason each was chosen. They are read from `.cache/test-content/<romfetch system>/<name>/`, each file checked against its `identity.json`. Missing content is fetched with `romfetch get <system> <name> --json` when romfetch is on `PATH`, in `RETROBIOS_ROMFETCH` or given with `--romfetch`. Otherwise the checks are `pending: content`, with romfetch's exit code and error code when it failed. Content never enters git, and a record keeps only its identity |
|
||||
| Checks | `files` stages every declared file the collection holds (the full set) and reads which ones the core opens (strace). `none` runs the game with no BIOS at all. `negative` runs, for each declared file of the game's region the collection holds, the file alone, then zeros of its size, its first half and up to two other regions' dumps staged under its name. An entry neither the full set nor its own run opened is staged where the core looked for it (`path`), else flagged. The `boot_file:` entry is also staged under the names the core looked for with no BIOS (`alias`). `variants` runs each `.variants/` copy of a file the core opened. Each runs twice from a fresh process and is judged by the boot oracle. `bench` (only with `--bench`) times the game once the full set boots, warm-up excluded, 5 repetitions |
|
||||
| Rules | `campaign_rules.py`, a fixed table of pure functions (below). A field the table settles is written into the profile, with `evidence:` naming the record ids. Anything else is a line of `measurements/findings.jsonl` |
|
||||
| Rules | `probes/rules.py`, a fixed table of pure functions (below). A field the table settles is written into the profile, with `evidence:` naming the record ids. Anything else is a line of `measurements/findings.jsonl` |
|
||||
| Content reuse | A game stays on disk until the last emulator that needs it in the pass is done, then the campaign deletes it if it fetched it. Past `--cache-cap-gb` (default 20) the least recently used goes first. An entry marked `pinned:`, or one the campaign did not fetch, is never deleted |
|
||||
|
||||
| Verdicts | Field | Written |
|
||||
|
||||
Reference in new issue
Block a user