build: warn when fixture Python is missing #147

Merged
Neygen8 merged 2 commits from upstream-pr/148 into main 2026-11-21 17:24:55 +00:00
Neygen8 commented 2026-11-21 17:16:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Neygen8 on 2026-11-21T17:16:51Z.


Change

CMake now warns at configure time when the path in INTAKE_PYTHON is missing. The warning names the disabled Python-driven tests, shows the configured path and points to the setup instructions. The first-build guide explains the warning.

Refs #132 (configure check).

Verification

Tested commit 4607f00 on macOS with CMake 4.4.2. Using cmake -DINTAKE_PYTHON:FILEPATH="<path>" -P out/configure-warning-check/check.cmake on the extracted fixture guard, the base commit printed no warning for a missing path. The patch printed the warning and exited with code 0 for the missing path. With an existing interpreter, it exited with code 0 without the warning. The script returned before the Windows-only build commands.

The six platform-independent checks passed with Python 3.11. The import-path check used pefile==2024.8.26.

for check in script_state_check bcpack_check resource_ranges_check dxcontainer_part_offsets_check layout_chunks_check intake/paths_check; do
  out/pe-env/bin/python -B "tests/$check.py" || exit $?
done
git diff --check

Evidence and follow-up

To check the warning in a Windows developer shell, run the first command with a path that does not exist. It should configure successfully and print the warning. The second command should list no CPU tests. Run the Python setup and configure with the valid interpreter to register those tests.

cmake --preset dev -B out/build/no-fixture-python "-DINTAKE_PYTHON:FILEPATH=$PWD/out/missing-fixture-python.exe"
ctest --test-dir out/build/no-fixture-python -N -R '^cpu_'

The full build ran in GitHub Actions. The Windows build and tests, standalone GPU check smoke test, Linux Python checks, and gfx1013 fixture checks passed. Workflow run

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated the first-build documentation.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6531978060 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/148). Originally posted by [Neygen8](https://github.com/Neygen8) on 2026-11-21T17:16:51Z. --- ## Change CMake now warns at configure time when the path in `INTAKE_PYTHON` is missing. The warning names the disabled Python-driven tests, shows the configured path and points to the setup instructions. The first-build guide explains the warning. Refs #132 (configure check). ## Verification Tested commit `4607f00` on macOS with CMake 4.4.2. Using `cmake -DINTAKE_PYTHON:FILEPATH="<path>" -P out/configure-warning-check/check.cmake` on the extracted fixture guard, the base commit printed no warning for a missing path. The patch printed the warning and exited with code 0 for the missing path. With an existing interpreter, it exited with code 0 without the warning. The script returned before the Windows-only build commands. The six platform-independent checks passed with Python 3.11. The import-path check used `pefile==2024.8.26`. ```bash for check in script_state_check bcpack_check resource_ranges_check dxcontainer_part_offsets_check layout_chunks_check intake/paths_check; do out/pe-env/bin/python -B "tests/$check.py" || exit $? done git diff --check ``` ## Evidence and follow-up To check the warning in a Windows developer shell, run the first command with a path that does not exist. It should configure successfully and print the warning. The second command should list no CPU tests. Run the [Python setup](https://github.com/R0Y00/Xbox2Windows/blob/main/README.md#first-build) and configure with the valid interpreter to register those tests. ```powershell cmake --preset dev -B out/build/no-fixture-python "-DINTAKE_PYTHON:FILEPATH=$PWD/out/missing-fixture-python.exe" ctest --test-dir out/build/no-fixture-python -N -R '^cpu_' ``` The full build ran in GitHub Actions. The Windows build and tests, standalone GPU check smoke test, Linux Python checks, and gfx1013 fixture checks passed. [Workflow run](https://github.com/R0Y00/Xbox2Windows/actions/runs/44929171906) ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated the first-build documentation. - [x] I did not include game files, dumps, distribution links or secrets. AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:41:33 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!147
No description provided.