build: define INTAKE_PYTHON before its first use #1364

Manually merged
github merged 1 commit from gh-pr/1364/head into gh-pr/1364/base 2026-11-26 23:01:22 +00:00
Owner

@⁠RenzoWit35 on GitHub · 2026-11-24 09:22 UTC · original
RenzoWit35:build/intake-python-before-use → main · +4 −2 · 1 files · 1 commits · merged 2026-11-24 09:38 UTC

Change

CMakeLists.txt checks if(EXISTS "${INTAKE_PYTHON}") at line 153 to register xmem_page_stats and startup_heartbeat_commit (#1199). The INTAKE_PYTHON cache variable was only set at line 1155. On a fresh configure the variable is still empty at line 153, so both tests are left out without a message. They appear only after a second configure, once the cache holds the value.

CI configures once in a clean checkout (only out/tools/spirv/bin is cached), so the Debug and Release full-suite jobs on main do not register these two tests.

This change moves the set(INTAKE_PYTHON ... CACHE FILEPATH ...) line directly after enable_testing(). The default value and docstring are unchanged. No test is added, removed or changed. A value passed with -DINTAKE_PYTHON=... behaves as before.

Open PR #1251 also registers Python tests above the old definition (around its line 287), so on a fresh configure they would be skipped in the same way. With this change they are registered on the first configure. No open PR edits the definition line or the lines around enable_testing().

Refs #1199

Verification

Windows 11, Build Tools 2026 (MSVC 14.51.36231), Windows SDK 10.0.26100, Python 3.14.5 venv at out/pe-env with requirements-dev.txt. Base: 623e2112.

Full test list, each in a new empty build directory:

cmake --preset dev -B out/build/pre-fix      # main
ctest --test-dir out/build/pre-fix -N        # Total Tests: 841
cmake --preset dev -B out/build/post-fix     # this branch
ctest --test-dir out/build/post-fix -N       # Total Tests: 843

Comparing the two sorted lists: the only difference is xmem_page_stats and startup_heartbeat_commit added. A fresh cmake --preset release on this branch also registers 843.

The two tests:

cmake --build out/build/post-fix --target xmem_shim startup_stub_xcrdapi
ctest --test-dir out/build/post-fix --no-tests=error -R '^(xmem_page_stats|startup_heartbeat_commit)$'
# 2/2 passed (xmem_page_stats 0.12 s, startup_heartbeat_commit 30.24 s)

PR subset:

cmake --build --preset pr
ctest --preset pr --no-tests=error
# 24 tests, 0 failed: 11 passed, 13 skipped (all spirv_*_warp;
# the pinned SPIR-V tools are not installed on this host)

Not run: the full ctest --preset dev suite, and these two tests on the hosted windows-2025 image. The pr preset does not select them, so the PR check does not exercise them. They first run in CI on the next full Debug/Release run on main, or in a manual Windows checks run on this branch.

AI-assisted.

**@⁠RenzoWit35** on GitHub · 2026-11-24 09:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1364) `RenzoWit35:build/intake-python-before-use` → `main` · +4 −2 · 1 files · 1 commits · merged 2026-11-24 09:38 UTC ## Change `CMakeLists.txt` checks `if(EXISTS "${INTAKE_PYTHON}")` at line 153 to register `xmem_page_stats` and `startup_heartbeat_commit` (#1199). The `INTAKE_PYTHON` cache variable was only set at line 1155. On a fresh configure the variable is still empty at line 153, so both tests are left out without a message. They appear only after a second configure, once the cache holds the value. CI configures once in a clean checkout (only `out/tools/spirv/bin` is cached), so the Debug and Release full-suite jobs on `main` do not register these two tests. This change moves the `set(INTAKE_PYTHON ... CACHE FILEPATH ...)` line directly after `enable_testing()`. The default value and docstring are unchanged. No test is added, removed or changed. A value passed with `-DINTAKE_PYTHON=...` behaves as before. Open PR #1251 also registers Python tests above the old definition (around its line 287), so on a fresh configure they would be skipped in the same way. With this change they are registered on the first configure. No open PR edits the definition line or the lines around `enable_testing()`. Refs #1199 ## Verification Windows 11, Build Tools 2026 (MSVC 14.51.36231), Windows SDK 10.0.26100, Python 3.14.5 venv at `out/pe-env` with `requirements-dev.txt`. Base: `623e2112`. Full test list, each in a new empty build directory: ``` cmake --preset dev -B out/build/pre-fix # main ctest --test-dir out/build/pre-fix -N # Total Tests: 841 cmake --preset dev -B out/build/post-fix # this branch ctest --test-dir out/build/post-fix -N # Total Tests: 843 ``` Comparing the two sorted lists: the only difference is `xmem_page_stats` and `startup_heartbeat_commit` added. A fresh `cmake --preset release` on this branch also registers 843. The two tests: ``` cmake --build out/build/post-fix --target xmem_shim startup_stub_xcrdapi ctest --test-dir out/build/post-fix --no-tests=error -R '^(xmem_page_stats|startup_heartbeat_commit)$' # 2/2 passed (xmem_page_stats 0.12 s, startup_heartbeat_commit 30.24 s) ``` PR subset: ``` cmake --build --preset pr ctest --preset pr --no-tests=error # 24 tests, 0 failed: 11 passed, 13 skipped (all spirv_*_warp; # the pinned SPIR-V tools are not installed on this host) ``` Not run: the full `ctest --preset dev` suite, and these two tests on the hosted `windows-2025` image. The `pr` preset does not select them, so the PR check does not exercise them. They first run in CI on the next full Debug/Release run on `main`, or in a manual **Windows checks** run on this branch. AI-assisted.
The xmem_page_stats and startup_heartbeat_commit tests are registered
under if(EXISTS "${INTAKE_PYTHON}") at line 138, but the cache variable
was only set at line 1061. A fresh configure therefore left both tests
out; they appeared only after a second configure. Set the variable
right after enable_testing() so the first configure registers them.

Refs #1199
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:01:21 +00:00
github manually merged commit 253ce62ed2 into gh-pr/1364/base 2026-11-26 23:01:22 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.