ci: require every SPIR-V bridge WARP test in the result check #1553

Merged
RenzoWit35 merged 1 commit from upstream-pr/1560 into main 2026-11-24 14:13:01 +00:00
RenzoWit35 commented 2026-11-24 14:00:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-24T14:00:11Z.


Change

tests/spirv_window/require_warp_results.py runs after CTest in both Windows jobs. Its docstring says it fails "unless every SPIR-V bridge WARP test ran and passed" and that a test missing from the report fails the check. Its REQUIRED list named 10 tests, while the foreach(bridge IN ITEMS ...) loop in CMakeLists.txt registers 14. Not required were spirv_address_window_atomic_warp, spirv_address_window_signed_warp, spirv_address_window_float_warp and spirv_address_window_vec4_warp. Those bridges joined the loop on 2026-11-24 (423c2e0a, 4daa4a81, b27f4eed, 7ea035ce) without joining the list; the qword bridge added the same day (3f8a40bb) did join it.

CTest already fails on a failed test, and X2W_REQUIRE_SPIRV_TOOLS=1 already turns a skip into a failure. The gap is a test that is absent from the report (dropped from the loop, renamed, or no longer matched by the pr preset filter): for those four, the step still printed all 10 SPIR-V bridge WARP tests ran and passed.

  • REQUIRED now names all 14 tests. Nothing else in the script changes; the printed count follows the list.
  • New tests/spirv_window/require_warp_results_check.py (standard library only). It reads the name:driver items of the bridge loop in CMakeLists.txt and fails, naming the missing and the unregistered tests, unless REQUIRED is exactly spirv_<name>_warp for every bridge. It exits with an error if the loop is not found exactly once, is empty or holds an item that is not name:driver, so it cannot pass on nothing. It then runs the result check on synthetic CTest JUnit reports: every required test passed (exit 0), and each required test in turn absent, skipped or failed (exit 1 with that test named).
  • .github/workflows/windows.yml: the new check is its own step in the Ubuntu fixture job (pixel-binary), directly after the dev.ps1 compiler-cache check and in the same form. That job runs on pull requests.

A later change that adds a bridge to the CMake loop now has to add its name to REQUIRED, or the new step fails.

Verification

Environment: Windows 11, Python 3.14.5 (out/pe-env), CMake and CTest 4.3.1, commit f5004a76 on origin/main ef39d41e. The SPIR-V tools are not installed on this machine.

New check, negative control (script as on origin/main, only the new check file added):

> out/pe-env/Scripts/python.exe -B tests/spirv_window/require_warp_results_check.py
require_warp_results.py: REQUIRED does not match the bridge loop in CMakeLists.txt: missing ['spirv_address_window_atomic_warp', 'spirv_address_window_float_warp', 'spirv_address_window_signed_warp', 'spirv_address_window_vec4_warp'], not registered [], 10 entries for 14 tests
exit code 1

New check, with the fix:

> out/pe-env/Scripts/python.exe -B tests/spirv_window/require_warp_results_check.py
require_warp_results: 14 required tests match CMakeLists.txt; absent, skipped and failed reports are rejected
exit code 0

The script itself, before and after. out/ten-passed.xml is a synthetic JUnit report holding the ten originally required tests as status="run" and none of the four others.

> out/pe-env/Scripts/python.exe -B tests/spirv_window/require_warp_results.py out/ten-passed.xml

Before (origin/main), exit code 0, last line:
all 10 SPIR-V bridge WARP tests ran and passed

After, exit code 1:
error: SPIR-V bridge WARP tests did not all run and pass
spirv_address_window_warp: passed
spirv_address_window_atomic_warp: not in the report
spirv_address_window_signed_warp: not in the report
spirv_address_window_float_warp: not in the report
spirv_address_window_vec4_warp: not in the report
spirv_address_window_qword_warp: passed
(the other eight lines read "passed")

Registered names, from a fresh configure without a build:

  • cmake --preset dev -B out/build/dev -DINTAKE_PYTHON=<venv python> then ctest --test-dir out/build/dev -N -R "spirv_.*_warp": Total Tests: 14. The names are spirv_address_window_warp, spirv_address_window_atomic_warp, spirv_address_window_signed_warp, spirv_address_window_float_warp, spirv_address_window_vec4_warp, spirv_address_window_qword_warp, spirv_sampler_views_warp, spirv_ballot_extract_warp, spirv_compaction_warp, spirv_compare_sampler_warp, spirv_minlod_warp, spirv_minlod_exact_warp, spirv_minlod_levels_warp, spirv_minlod_fractional_warp: the same set as the new REQUIRED.
  • ctest --test-dir out/build/dev -R "^(spirv_address_window_warp|docs_links)$" --output-junit <file> gave a real report with one pass (status="run") and one skip (status="notrun" with <skipped message="SKIP_RETURN_CODE=77"/>). The synthetic reports in the new check use the same shape. The fixed script exits 1 on that report (spirv_address_window_warp: skipped, the other 13 not in the report).

Hosted CI, read from the run logs. A push run uses ctest --preset dev -E '_hardware$' and a pull request run uses ctest --preset pr, whose filter in CMakePresets.json contains spirv_.*_warp; both select all 14. The /O2 job does not run on pull requests.

Run Event and commit Job WARP bridge tests in the log
45353584098 push, e3193607, run succeeded (latest successful run on main) debug and /O2 12 registered at that commit (float and vec4 were merged later), 12 Passed in each job
45371967079 push, d20fef65, run failed on cpu_aot_jump_tables debug and /O2 13 registered (vec4 merged later), 13 Passed in each job
45403678459 pull_request, d21e3d6e merged into 7b0d7954, run succeeded debug (pr preset) 14 Passed, 100% tests passed out of 25
45404115751 push, 90fbe417, both Windows jobs stopped by the 20-minute job limit debug and /O2 14 Passed in each job before the stop (tests 256-269 of 694)

Per test: spirv_address_window_atomic_warp and spirv_address_window_signed_warp Passed in all seven job logs above. spirv_address_window_float_warp Passed in the five job logs from d20fef65 onwards. spirv_address_window_vec4_warp Passed in the three job logs from 7b0d7954 onwards (debug on a pull request, debug and /O2 on main). The ten tests that were already required Passed in all seven. None of the 14 was skipped or failed in any of these logs.

Further checks:

  • Mutations of the inputs, run from a scratch script that is not part of the change, each made the new check fail: a bridge removed from the CMake loop (not registered ['spirv_address_window_vec4_warp']), a bridge added to it (missing ['spirv_new_one_warp']), the loop renamed (found 0), the loop emptied, an item without a driver, a duplicate entry in REQUIRED, and a statuses() that counts skips, failures or absent tests as passes or rejects everything.
  • out/pe-env/Scripts/python.exe -B tests/docs_links_check.py: Checked 16 Markdown files and 339 links., exit 0.
  • out/pe-env/Scripts/python.exe -B tests/bidi_controls_check.py: Checked 1235 tracked source, script and build/CI files: no bidirectional controls., exit 0.
  • The edited workflow parses as YAML (Bun.YAML.parse, Bun 1.3.14; PyYAML is not installed here). The pixel-binary job lists the new step between the dev.ps1 check and Check machine-code inputs with LLVM 15.
  • ast.parse(source, feature_version=(3, 10)) accepts the new check; the Ubuntu 22.04 job runs it with the system python3.

Rebased onto origin/main at a3633d4d before opening this pull request and re-run there: the bridge loop still registers the same 14 tests and the new check exits 0.

Not run: the new workflow step and the stricter require step were not executed on the hosted CI image. The new check was run with Python 3.14.5 only, not with Python 3.10 (grammar check only). The SPIR-V bridge tests were not run locally because the SPIR-V tools are not installed (they report skip 77 here). Nothing was built, and no other tests were run.

Evidence and follow-up

  • No open PR touches tests/spirv_window/, so none adds a bridge to the CMake loop or edits the result check.
  • Open PRs #1528, #1526, #1520, #1502, #1173 and #836 also edit .github/workflows/windows.yml, in other places. A trial merge of this commit with each PR head (git merge-tree --write-tree) was clean, and so was one with origin/main 8f438025, which already contains #1513, #1507 and #1471. #1520 rewrites the long run: | block of the same job; the new step sits above that block as a separate step.
  • The check is not added to the python-linux list or to the list in AGENTS.md. #1502 rewrites that workflow list, so adding a line there would only create a conflict. The neighbouring tests/dev_ps1_sccache_check.py is registered the same way: one step in this job, no CMake test, not in those lists. It can join the lists once they settle.
  • Observed, not changed here: in run 45404115751 both Windows jobs on main hit the 20-minute job limit before CTest finished. A cancelled job does not run the require step (if: ${{ !cancelled() }}). #1173 proposes running CTest in parallel.
  • No issue is linked.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6583483150 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1560). Originally posted by [RenzoWit35](https://github.com/RenzoWit35) on 2026-11-24T14:00:11Z. --- ## Change `tests/spirv_window/require_warp_results.py` runs after CTest in both Windows jobs. Its docstring says it fails "unless every SPIR-V bridge WARP test ran and passed" and that a test missing from the report fails the check. Its `REQUIRED` list named 10 tests, while the `foreach(bridge IN ITEMS ...)` loop in `CMakeLists.txt` registers 14. Not required were `spirv_address_window_atomic_warp`, `spirv_address_window_signed_warp`, `spirv_address_window_float_warp` and `spirv_address_window_vec4_warp`. Those bridges joined the loop on 2026-11-24 (423c2e0a, 4daa4a81, b27f4eed, 7ea035ce) without joining the list; the qword bridge added the same day (3f8a40bb) did join it. CTest already fails on a failed test, and `X2W_REQUIRE_SPIRV_TOOLS=1` already turns a skip into a failure. The gap is a test that is absent from the report (dropped from the loop, renamed, or no longer matched by the `pr` preset filter): for those four, the step still printed `all 10 SPIR-V bridge WARP tests ran and passed`. - `REQUIRED` now names all 14 tests. Nothing else in the script changes; the printed count follows the list. - New `tests/spirv_window/require_warp_results_check.py` (standard library only). It reads the `name:driver` items of the bridge loop in `CMakeLists.txt` and fails, naming the missing and the unregistered tests, unless `REQUIRED` is exactly `spirv_<name>_warp` for every bridge. It exits with an error if the loop is not found exactly once, is empty or holds an item that is not `name:driver`, so it cannot pass on nothing. It then runs the result check on synthetic CTest JUnit reports: every required test passed (exit 0), and each required test in turn absent, skipped or failed (exit 1 with that test named). - `.github/workflows/windows.yml`: the new check is its own step in the Ubuntu fixture job (`pixel-binary`), directly after the `dev.ps1` compiler-cache check and in the same form. That job runs on pull requests. A later change that adds a bridge to the CMake loop now has to add its name to `REQUIRED`, or the new step fails. ## Verification Environment: Windows 11, Python 3.14.5 (`out/pe-env`), CMake and CTest 4.3.1, commit f5004a76 on `origin/main` ef39d41e. The SPIR-V tools are not installed on this machine. New check, negative control (script as on `origin/main`, only the new check file added): ``` > out/pe-env/Scripts/python.exe -B tests/spirv_window/require_warp_results_check.py require_warp_results.py: REQUIRED does not match the bridge loop in CMakeLists.txt: missing ['spirv_address_window_atomic_warp', 'spirv_address_window_float_warp', 'spirv_address_window_signed_warp', 'spirv_address_window_vec4_warp'], not registered [], 10 entries for 14 tests exit code 1 ``` New check, with the fix: ``` > out/pe-env/Scripts/python.exe -B tests/spirv_window/require_warp_results_check.py require_warp_results: 14 required tests match CMakeLists.txt; absent, skipped and failed reports are rejected exit code 0 ``` The script itself, before and after. `out/ten-passed.xml` is a synthetic JUnit report holding the ten originally required tests as `status="run"` and none of the four others. ``` > out/pe-env/Scripts/python.exe -B tests/spirv_window/require_warp_results.py out/ten-passed.xml Before (origin/main), exit code 0, last line: all 10 SPIR-V bridge WARP tests ran and passed After, exit code 1: error: SPIR-V bridge WARP tests did not all run and pass spirv_address_window_warp: passed spirv_address_window_atomic_warp: not in the report spirv_address_window_signed_warp: not in the report spirv_address_window_float_warp: not in the report spirv_address_window_vec4_warp: not in the report spirv_address_window_qword_warp: passed (the other eight lines read "passed") ``` Registered names, from a fresh configure without a build: - `cmake --preset dev -B out/build/dev -DINTAKE_PYTHON=<venv python>` then `ctest --test-dir out/build/dev -N -R "spirv_.*_warp"`: `Total Tests: 14`. The names are `spirv_address_window_warp`, `spirv_address_window_atomic_warp`, `spirv_address_window_signed_warp`, `spirv_address_window_float_warp`, `spirv_address_window_vec4_warp`, `spirv_address_window_qword_warp`, `spirv_sampler_views_warp`, `spirv_ballot_extract_warp`, `spirv_compaction_warp`, `spirv_compare_sampler_warp`, `spirv_minlod_warp`, `spirv_minlod_exact_warp`, `spirv_minlod_levels_warp`, `spirv_minlod_fractional_warp`: the same set as the new `REQUIRED`. - `ctest --test-dir out/build/dev -R "^(spirv_address_window_warp|docs_links)$" --output-junit <file>` gave a real report with one pass (`status="run"`) and one skip (`status="notrun"` with `<skipped message="SKIP_RETURN_CODE=77"/>`). The synthetic reports in the new check use the same shape. The fixed script exits 1 on that report (`spirv_address_window_warp: skipped`, the other 13 `not in the report`). Hosted CI, read from the run logs. A push run uses `ctest --preset dev -E '_hardware$'` and a pull request run uses `ctest --preset pr`, whose filter in `CMakePresets.json` contains `spirv_.*_warp`; both select all 14. The /O2 job does not run on pull requests. | Run | Event and commit | Job | WARP bridge tests in the log | |---|---|---|---| | 45353584098 | push, e3193607, run succeeded (latest successful run on `main`) | debug and /O2 | 12 registered at that commit (float and vec4 were merged later), 12 Passed in each job | | 45371967079 | push, d20fef65, run failed on `cpu_aot_jump_tables` | debug and /O2 | 13 registered (vec4 merged later), 13 Passed in each job | | 45403678459 | pull_request, d21e3d6e merged into 7b0d7954, run succeeded | debug (`pr` preset) | 14 Passed, `100% tests passed out of 25` | | 45404115751 | push, 90fbe417, both Windows jobs stopped by the 20-minute job limit | debug and /O2 | 14 Passed in each job before the stop (tests 256-269 of 694) | Per test: `spirv_address_window_atomic_warp` and `spirv_address_window_signed_warp` Passed in all seven job logs above. `spirv_address_window_float_warp` Passed in the five job logs from d20fef65 onwards. `spirv_address_window_vec4_warp` Passed in the three job logs from 7b0d7954 onwards (debug on a pull request, debug and /O2 on `main`). The ten tests that were already required Passed in all seven. None of the 14 was skipped or failed in any of these logs. Further checks: - Mutations of the inputs, run from a scratch script that is not part of the change, each made the new check fail: a bridge removed from the CMake loop (`not registered ['spirv_address_window_vec4_warp']`), a bridge added to it (`missing ['spirv_new_one_warp']`), the loop renamed (`found 0`), the loop emptied, an item without a driver, a duplicate entry in `REQUIRED`, and a `statuses()` that counts skips, failures or absent tests as passes or rejects everything. - `out/pe-env/Scripts/python.exe -B tests/docs_links_check.py`: `Checked 16 Markdown files and 339 links.`, exit 0. - `out/pe-env/Scripts/python.exe -B tests/bidi_controls_check.py`: `Checked 1235 tracked source, script and build/CI files: no bidirectional controls.`, exit 0. - The edited workflow parses as YAML (`Bun.YAML.parse`, Bun 1.3.14; PyYAML is not installed here). The `pixel-binary` job lists the new step between the `dev.ps1` check and `Check machine-code inputs with LLVM 15`. - `ast.parse(source, feature_version=(3, 10))` accepts the new check; the Ubuntu 22.04 job runs it with the system `python3`. Rebased onto `origin/main` at `a3633d4d` before opening this pull request and re-run there: the bridge loop still registers the same 14 tests and the new check exits 0. Not run: the new workflow step and the stricter require step were not executed on the hosted CI image. The new check was run with Python 3.14.5 only, not with Python 3.10 (grammar check only). The SPIR-V bridge tests were not run locally because the SPIR-V tools are not installed (they report skip 77 here). Nothing was built, and no other tests were run. ## Evidence and follow-up - No open PR touches `tests/spirv_window/`, so none adds a bridge to the CMake loop or edits the result check. - Open PRs #1528, #1526, #1520, #1502, #1173 and #836 also edit `.github/workflows/windows.yml`, in other places. A trial merge of this commit with each PR head (`git merge-tree --write-tree`) was clean, and so was one with `origin/main` 8f438025, which already contains #1513, #1507 and #1471. #1520 rewrites the long `run: |` block of the same job; the new step sits above that block as a separate step. - The check is not added to the `python-linux` list or to the list in `AGENTS.md`. #1502 rewrites that workflow list, so adding a line there would only create a conflict. The neighbouring `tests/dev_ps1_sccache_check.py` is registered the same way: one step in this job, no CMake test, not in those lists. It can join the lists once they settle. - Observed, not changed here: in run 45404115751 both Windows jobs on `main` hit the 20-minute job limit before CTest finished. A cancelled job does not run the require step (`if: ${{ !cancelled() }}`). #1173 proposes running CTest in parallel. - No issue is linked. AI-assisted.
upstream-sync closed this pull request 2026-11-24 15:02:00 +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!1553
No description provided.