Skip to content

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

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
RenzoWit35:ci/spirv-warp-required-list
Nov 24, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
RenzoWit35:ci/spirv-warp-required-list

Conversation

@RenzoWit35

Copy link
Copy Markdown
Contributor

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 (423c2e0, 4daa4a8, b27f4ee, 7ea035c) without joining the list; the qword bridge added the same day (3f8a40b) 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 ef39d41. 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, e319360, 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, d20fef6, run failed on cpu_aot_jump_tables debug and /O2 13 registered (vec4 merged later), 13 Passed in each job
45403678459 pull_request, d21e3d6 merged into 7b0d795, run succeeded debug (pr preset) 14 Passed, 100% tests passed out of 25
45404115751 push, 90fbe41, 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 d20fef6 onwards. spirv_address_window_vec4_warp Passed in the three job logs from 7b0d795 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

AI-assisted.

tests/spirv_window/require_warp_results.py fails a Windows CI job unless
each listed SPIR-V bridge WARP test is in the CTest JUnit report and
passed. Its list named 10 tests, while the bridge loop in CMakeLists.txt
registers 14: the atomic, signed, float and vec4 address-window tests
were added to the loop without joining the list. If one of those four
dropped out of the report, the step still printed "all 10 ... ran and
passed".

Add the four names, and add require_warp_results_check.py, which reads
the bridge names from the CMake loop and fails when the list differs in
either direction. It also runs the result check on synthetic JUnit
reports: all passed, and each required test absent, skipped or failed.
The new check runs as its own step in the Ubuntu fixture job, next to
the other standalone Python checks.
@R0Y00
R0Y00 merged commit 6c0e538 into R0Y00:main Nov 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants