mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #676] [MERGED] tests/semantic: skip spirv-as/spirv-val checks when SPIRV-Tools absent (TEST-SOPC-UNARY-SPIRV-TOOLS) #716
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#716
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/676
Author: @kirigayakazima
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142
Base:
main← Head:fix/semantic-optional-spirv-tools📝 Commits (1)
efeb1dbtests/semantic: skip spirv-as/spirv-val checks when SPIRV-Tools absent (TEST-SOPC-UNARY-SPIRV-TOOLS)📊 Changes
2 files changed (+204 additions, -140 deletions)
View changed files
📝
tests/semantic/test_sopc_validation.py(+87 -64)📝
tests/semantic/test_unary_f16_validation.py(+117 -76)📄 Description
Claimed in the coordination issue as: TEST-SOPC-UNARY-SPIRV-TOOLS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7130256213)
What and why
Replaces the SPIRV-Tools half of conflicting draft #136, following @ItsMrDubey's design suggestion in #136 (comment 7121549964) so translation and
spirv_mini_interpcoverage always run everywhere instead of silently returning early or failing on tool-less hosts (e.g., Windowssemantic-testsleg or local dev PCs):tests/semantic/test_sopc_validation.py:_translate_and_validate_csinto_translate_csand_validate_spirvand extract_positive_control_program().test_all_18_ops_and_valid_scalar_operands_interpruns translation +spirv_mini_interpacross all 18 SOPC instructions unconditionally.test_all_18_ops_and_valid_scalar_operands_spirv_valchecksspirv-as/spirv-valonPATH: skips cleanly when absent andLEONIDA_REQUIRE_SPIRV_TOOLS != "1", and fails loudly viaself.fail(...)whenLEONIDA_REQUIRE_SPIRV_TOOLS == "1".tests/semantic/test_unary_f16_validation.py:run_pstranslation/interpreter execution fromvalidate_spirvand factor out shared shader builders (_combo_opsel_shaders,_nontrivial_opsel_shader,_inplace_sdwa_shader,_positive_control_lines).test_sin_cos_opsel_spirv_valandtest_positive_controls_all_12_ops_spirv_valmethods using_require_or_skip_spirv_tools(skip when missing andLEONIDA_REQUIRE_SPIRV_TOOLS != "1", fail loudly whenLEONIDA_REQUIRE_SPIRV_TOOLS == "1").spirv_mini_interpchecks running unconditionally on every host.Note: on unmodified
main(21625bca) without SPIRV-Tools, both files still failed (1/11 intest_sopc_validation.py; 15 subtests intest_unary_f16_validation.py— also hit in #652's Windows run).Tested
On Windows 11 x64 (
Python 3.14.7,spirv-as/spirv-valnot onPATH) atefeb1db11bcd632c01246d783f2987114e6e4811, synthetic fixtures only (no game data):LEONIDA_REQUIRE_SPIRV_TOOLS=0:python -I tests/semantic/test_sopc_validation.py -v— 12 ran, OK (skipped=1) (test_all_18_ops_and_valid_scalar_operands_interppassed)python -I tests/semantic/test_unary_f16_validation.py -v— 7 ran, OK (skipped=2) (all interpreter/negative/positive-translation checks passed)python -I -m unittest discover -s tests/semantic -p ...— both OKLEONIDA_REQUIRE_SPIRV_TOOLS=1(verifies strict CI failure):test_sopc_validation.py— FAILED (1/12,AssertionError: spirv-as and spirv-val must be on PATH)test_unary_f16_validation.py— FAILED (2/7,AssertionError: spirv-as / spirv-val not found on PATH)python -I tests/test_ci_registration.py— 15 ran, OKpython -I tests/test_text_write_line_endings.py— 3 ran, OKpython -I scripts/check_no_game_data.py ...&python -m compileall -q ...— exit 0GPUs tested: n/a
AI-assisted: yes
Checklist
main(21625bca) and merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a — semantic tests only)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.