Skip to content

Test launchers build again from the test suite's stand-in payload - #249

Merged
phantoslayer21 merged 2 commits into
mainfrom
fix/mock-payload-testing-build
Nov 15, 2026
Merged

phantoslayer21 merged 2 commits into
mainfrom
fix/mock-payload-testing-build

Conversation

@phantoslayer21

@phantoslayer21 phantoslayer21 commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

What this changes and why

Since the payload gate in #225, a WRONGGPU_TESTING launcher built from the test suite's mock payload stops at "Embedding the payload". The stand-in runtime in that payload has no wg-build dev-diagnostics=0 marker and no .build.json manifest, so the gate refuses it, correctly. The local launcher test runs and anyone building a test launcher from --prepare-only hit this.

  • The stand-in passes the same checks, and says what it is. The suite's prepare step (tests/run_installer_tests.py --prepare-only, stand_in_runtime) writes the stand-in runtime with the release marker, plus a build manifest for its exact bytes (format 1, its SHA-256, dev_diagnostics: false) that says stand_in: true.
  • Only a testing build embeds it. tools/make_payload.py accepts a runtime whose manifest says stand_in only with --testing, which CMake passes in WRONGGPU_TESTING builds. Any other build stops at the payload step with "the test suite's stand-in runtime ... only a WRONGGPU_TESTING build embeds it".
  • The gate is otherwise unchanged. A real payload goes through exactly the checks of R1: no in-game route to HIP; GPU identity from the driver; other cards use the front end's upscaler #225: a runtime without a manifest, with another library's manifest, a developer build or a forged marker is refused in every build, with or without --testing. Release packaging (tools/release) is unchanged.
  • The release path never passes the testing switches. Checked by searching the release build path for --testing and WRONGGPU_TESTING:
    • BUILDING.md's release and developer-package commands configure with -DWRONGGPU_TESTING=OFF, so CMake passes no --testing.
    • tools/release/check_package_diagnostics.py (the final package check) has neither.
    • tools/ci/check_release_runtime.py, which runs the real packager on a real runtime in CI, calls make_payload.py without --testing.
    • The only places that pass --testing or WRONGGPU_TESTING=ON are CMakeLists.txt for WRONGGPU_TESTING builds, the test runners (run_installer_tests.py, build-mingw.sh's default, clean/linux/run_wine_tests.py) and this CI step.
  • CI step (in "CPU: launcher", CPU only): it prepares the stand-in payload and builds the testing launcher from it. As the negative control, it configures a release build (WRONGGPU_TESTING=OFF) with the same payload and checks that its payload step refuses the stand-in for that reason.
  • Packager tests (clean/tests/test_dev_diagnostics_off.py):
    • the stand-in is refused without --testing and embedded with it;
    • with --testing, a stand-in without the marker, one whose bytes changed after its manifest, and a runtime without a manifest are still refused.
  • The installer's own make_payload check (--hosted-only) uses the same stand-in. The installer README says how to build a test launcher from the mock payload.
  • The Wine test runner's build, broken since R1: no in-game route to HIP; GPU identity from the driver; other cards use the front end's upscaler #225, works again. build-mingw.sh (the MinGW build that tests/run_installer_tests.py makes under Wine, also used by outside contributors) is now a WRONGGPU_TESTING build and passes --testing to make_payload.py, so it embeds the stand-in.
    • RELEASE=1 ./build-mingw.sh ... makes a release-type MinGW build (no WRONGGPU_TESTING, no --testing). It still refuses the stand-in at the payload step: the negative control. CMake with a MinGW toolchain file follows the same WRONGGPU_TESTING rule as MSVC.
    • When the runner builds with build-mingw.sh itself, it sets WRONGGPU_TESTING=1, so its Apps & features root and its testing-only cases match the build.
    • Under Wine it no longer sets the store-library test variables, which a testing build now honours. The prefix is the program's own world, and the Steam and GOG cases read the prefix's registry and folders, as before. Native runs keep them, along with the access-log guard.

What each new or substantially changed file is based on

Own design.

How it was tested

Tested on this head (Windows, MSVC; APPDATA, LOCALAPPDATA, ProgramData and TMP redirected to scratch folders):

  • clean/tests/test_dev_diagnostics_off.py: 12/12 pass, including the new stand-in cases.
  • The stand-in payload from --prepare-only:
    • A WRONGGPU_TESTING launcher built from it with CMake builds (it stopped at "Embedding the payload" before this change). Its launcher-core-tests: 480 checks pass.
    • The negative control: a release build (WRONGGPU_TESTING=OFF) with the same payload stops at the payload step with the stand-in refusal.
  • build-mingw.sh's payload step, run here up to the compiler: it embeds the stand-in by default (testing) and refuses it with RELEASE=1 (the stand-in refusal, no payload table written).
  • run_launcher_tests.py, full suite, with the launcher built from the stand-in payload. The RR test game's rr-prepare was answered without the GPU.
    • Result: 455 pass, 9 fail. Six are the known checks that fail on main and that the fresh-clone suite PR handles.
    • Three are UI checks of the window built hidden, in test_ui_dump: "Discard from the keyboard ... focus goes back", "Space acts as it comes up ...", and "Advanced settings open by themselves ...". They fail the same way when that test is run again alone. This PR changes no UI code; main's UI changed in R1: no in-game route to HIP; GPU identity from the driver; other cards use the front end's upscaler #225 (ui_game.cpp, ui_checks.cpp, ui_activate.cpp). They are reported separately.
    • No store library path in either log.

Not tested:

  • The Wine runner itself (no Wine here, and no Wine job in CI); its build's payload step was run as above.
  • The new CI step runs in this PR's CI.

Checklist

  • I make the clean-room statement of CONTRIBUTING.md for this and all my contributions (required once, in my first pull request).
  • Every commit has a Signed-off-by: line (git commit -s; Developer Certificate of Origin 1.1).
  • New source files carry the SPDX licence line for MIT, or are covered in REUSE.toml. (No new files.)
  • No files of the original upscaler (see CONTRIBUTING.md), no model data, game files, captures, screenshots or binaries; no paths, user or machine names of my PC.
  • Any new third-party component is under a permitted licence and listed in THIRD-PARTY-NOTICES and REUSE.toml. (None.)
  • Numbers in documents come with their measurement record. (None added.)
  • Kernel or runtime changes: none.

Since the payload gate (#225), a WRONGGPU_TESTING launcher built from the mock payload stopped at
"Embedding the payload": the stand-in runtime had no "wg-build dev-diagnostics=0" marker and no
build manifest.

- The suite's prepare step (run_installer_tests.py --prepare-only) writes the stand-in runtime
  with the marker and a build manifest for its exact bytes that says stand_in.
- make_payload.py embeds a stand-in runtime only with --testing, which CMake passes in
  WRONGGPU_TESTING builds; any other build refuses it at the payload step. A real payload is
  checked exactly as before.
- CI builds the testing launcher from the stand-in payload and checks that a release build with
  the same payload refuses it (the negative control). The packager tests cover the stand-in with
  and without --testing.

Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
@phantoslayer21 phantoslayer21 added this to the 0.6.5 milestone Nov 15, 2026
@phantoslayer21 phantoslayer21 added area: launcher Launcher and installer area: build-ci Build scripts, CI and repository tooling labels Nov 15, 2026
…step with its exit code

Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
@phantoslayer21
phantoslayer21 marked this pull request as ready for review November 15, 2026 23:37
@phantoslayer21
phantoslayer21 merged commit b1011ea into main Nov 15, 2026
10 checks passed
@phantoslayer21
phantoslayer21 deleted the fix/mock-payload-testing-build branch November 15, 2026 23:37
phantoslayer21 added a commit that referenced this pull request Nov 15, 2026
Signed-off-by: phantoslayer21 <156617979+phantoslayer21@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-ci Build scripts, CI and repository tooling area: launcher Launcher and installer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant