The Windows runner of the `check` job failed three of these tests; the script was right.
- Its TEMP is an 8.3 short path (C:\Users\RUNNER~1\...), and [IO.Path]::GetFullPath, which the script uses for
every folder it compares and records, expands short names: the printed gate path and abba.json's folders were
the long spelling of what the tests gave. The tests now take the real path of their temporary folders and
compare paths after realpath and normcase.
- Its console colours PowerShell's error text and wraps it with the escape sequences inside the wrap, which
unwrapped() did not join. The tests now run pwsh with NO_COLOR=1, and unwrapped() removes colour sequences
before it joins the wrapped lines.
- arm_settings applies the space and length rules only to a value the runtime's settings line shows as it is:
one of ASCII letters, digits and " ._,:+=*-", the `plain` test of d3d12/apps/leonida/src/leonida.rs line 65,
mirrored and quoted in d3d12_ab_compare.py's new SOURCES, which a contract test checks against leonida.rs.
Any other value (a folder with a space, a long path) shows as "<hidden, N chars>", which `check` takes as
shown, so it can be an arm.
- A name given twice in one arm counts with its last value, as the gate keeps it.
- `settings` names an item by its position (and its LEONIDA_ name), never by its text, so no path is said back.
- The runner refuses a checkout inside -Out, where a re-run's clean-up could reach it.
- The files the runner writes are written beside themselves and moved over, so abba.json, rewritten after every
run, is never found cut short; an -Out whose abba.json exists but is not readable as this runner's is refused
as such ("no readable abba.json of this runner").
- docs/measuring_fps.md and the script's header say the same.
- A re-run deletes runs, abba.json and comparison.* only when -Out's abba.json is this runner's (its schema); an
-Out holding any of those without it is refused and kept. Each arm's scripts\game-gate.ps1, -Game,
-DataTemplate and the data folders are checked before anything is deleted (two-build mode needs the gate in
each checkout).
- -Out may not be -Game, -DataTemplate or a data folder, nor be inside one or hold one (full paths without an
ending separator, case ignored on Windows). -Retry is 0 or more.
- One reading of an arm's settings, d3d12_ab_compare.py's arm_settings(): the way game-gate.ps1 reads -More
(split at ";", name and value trimmed). The runner refuses before the first run what the runtime's settings
line could never show (not LEONIDA_NAME=value, a value with a space or over 120 characters), through the new
`settings` command, and passes the arm's text to `check --more`, which compares with the same reading.
- `check` builds on run_value, so a run that counts has one definition (a PASS without a frame rate is left out
and run again), and takes AFTER_WORLD_S from tools/game_gate.py. Its docstring no longer says it prints no
argument text.
- abba.json holds the folders and checkouts as well, and is written at the start and after each run, so an error
leaves it. abba.json, comparison.txt, comparison.json and ab-excluded.txt are LF with one final newline.
- An empty -More or -PlayArgs is not passed to the gate (PowerShell 7.0 to 7.2 drop an empty argument).
- Tests: the stand-in gate notes the parameters it gets and can end a run with another exe, another setting or
no frame rate; new cases for each point above, a slot left out on every try keeping its place, and the bytes
of the files written. test_d3d12_ab_compare.py removes its temporary folders.
- docs/measuring_fps.md: the refusals, the gate each checkout needs, the record and the re-run.
2 pairs are 2 runs a side, and `abba` needs 3 runs a side (side and linear trend) or 4 pairs (a verdict from
the pairs themselves): such a run could never give a comparison and would only say so, exit 1, after about an
hour of gate runs. The runner now refuses -Pairs below 3 before any run, and says why. The header comment and
docs/measuring_fps.md say the minimum; the dry-run tests that plan use 3 pairs, and the refusals cover 1 and 2.
- A run into an -Out used before first deletes what the earlier one wrote there (runs, abba.json,
comparison.*): a run folder of the same name kept its ab-excluded.txt, which left a good run out while
abba.json said left_out null, and its data copy.
- A warm-up or discarded run whose gate fails stops the runner at once, before the measured runs.
- Every call of d3d12_ab_compare.py (plan, check, abba) has its exit code checked before its output is
used: a failed comparator writes no comparison. The runner exits 1 when the runs left give no
comparison (too few runs, unbalanced pairs), 0 with one.
- abba.json records the arms' inputs (more, more_a, more_b, play_args, max_minutes, retry) and each run's
commit.
- The guard on -Out covers the runner's own checkout in two-build mode, appends
[IO.Path]::DirectorySeparatorChar, and -DataA/-DataB (and the checkouts) compare as full paths without an
ending separator, so "dir" and "dir\" are one folder.
- tests/test_game_abba.py runs the script over a stand-in gate that writes run.json and summary.json:
a failed and a cut-short run left out and retried, the outputs, a re-run into the same -Out, a failed
warm-up or discarded run, a failing comparator, too few runs left, and the record's fields.
- docs/measuring_fps.md: the re-run, the stop on a failed warm-up, the exit codes and abba.json's fields.
A summary.json cut short (a gate stopped while writing it), not JSON, or not an object made `check` and
`abba` raise. Both now read it through read_summary() and give "unreadable summary" as the reason the run
is left out, so the runner retries the slot instead of recording nothing and comparing without it.
The runner takes the order from d3d12_ab_compare.py plan (warm-up runs, discarded runs, then ABBA pairs) and
runs each slot through scripts/game-gate.ps1, for one exe with two settings or for two builds (a checkout and
a data folder per arm). Each measured run is checked by the new `d3d12_ab_compare.py check`: its gate passed,
the pipeline cache was warm before the measured window, its exe is its arm's first one, and its arm's own
settings show in the runtime's settings line when there is one. A run that fails gets an ab-excluded.txt,
which `abba` now leaves out, and its slot runs again (-Retry, 1). The runner ends with the comparison in
<Out>/comparison.txt and comparison.json, and abba.json says what ran and what was left out. -DryRun prints
the plan and the gate commands. It needs PowerShell 7 (#Requires).
Carry of #1121 (X64-RECOMP-VEX-BOUNDS). The conflict in tests/test_x64_recomp.py only placed the PR's two new tests after main's existing ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewers on #340 (Oliwettoo, aslan2142) noted that the in-process gen.main
tests print the tool's progress line and its 'no COM folder' error into the
test output. Redirect stdout and stderr around those two calls.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up from #934: the bank export directory check ran after
os.makedirs, so a refused run left an empty output folder. Both
collision checks now run first, and a test checks that out/ is not
created.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The directory is [begin, end), as in runtime/src/pe_loader.cpp. A mutation that made
the end inclusive survived. Reported by enlighted-agent on the carry PR.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The tree is the one already resolved on top of main; this merge only keeps the
author's four commits as ancestors, as CONTRIBUTING.md asks for a carry.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The first window test showed the bar line at the very bottom, easy to
miss, and its text pointed at a button "above" that was beside it. An
update now shows as a framed "Update available: N new commits" with its
Update button next to PLAY. The bar keeps the other notes (zip copy, no
git, a failed check).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At start the launcher runs git fetch in its folder. When the clone is
behind its upstream, the Play page says how many new commits there are
and shows an Update button. Update runs this file's own --update mode:
git pull --ff-only, then a rebuild of the runtime when d3d12/ changed,
with the output streamed like the other tools.
A copy downloaded as a zip has no .git; the launcher says that updating
needs a git clone. A Settings box turns the check off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
switch_args passes -PrecompileAll only with the shader preparation on, so the
new box did nothing when Prepare shaders before starting was off. A player hit
this right after #2986. Ticking the first box now ticks the second, and turning
the preparation off clears the first. A note line under the options says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge queue's tests found the page out of date once this branch met main.
Regenerated with tools/d3d12_switches.py after merging main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
drop_bytecode skips a folder it may not list (Python cannot import from it either). A __pycache__ it cannot remove is now a usage error naming it (exit 2), and any such error during a run puts the tree back on the base, where before the undone hunk stayed. --mutate-timeout must also be finite. In a mutated run, a Python test stopped while running outweighs a cargo build that was stopped. job_of says once on stderr when it has no job object. docs/testing.md: one line rewrapped.
With the output in a file the run no longer waits for such a process, so only a mark it would write later shows that the job (the process group elsewhere) stopped it. drop_bytecode reads a folder's attributes only for folders.
A mutated cargo run that times out before its first Running line was still a build: it says nothing about the tests, so it is no longer counted as caught by timeout. A stub cargo that hangs in its build or in a test binary now covers the cargo timeout path, which no test reached before.