[PR #940] [CLOSED] tests/semantic: sopc and unary f16 validation skip spirv-val without SPIRV-Tools (TEST-SPIRV-TOOLS-OPTIONAL) #977

Closed
opened 2026-11-26 20:19:41 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/940
Author: @Luna-OS
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: fix/semantic-spirv-tools-optional


📝 Commits (1)

  • 773ce69 tests/semantic: sopc and unary f16 validation skip spirv-val without SPIRV-Tools (TEST-SPIRV-TOOLS-OPTIONAL)

📊 Changes

2 files changed (+9 additions, -2 deletions)

View changed files

📝 tests/semantic/test_sopc_validation.py (+5 -1)
📝 tests/semantic/test_unary_f16_validation.py (+4 -1)

📄 Description

Claimed in the coordination issue as: TEST-SPIRV-TOOLS-OPTIONAL (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135902691)

What and why

AGENTS.md says python -I scripts/run_semantic_tests.py tests/semantic needs no LLVM, SPIR-V tools or GPU. On a machine without SPIRV-Tools it ends red anyway:

465 files, 6108 tests, 2 files failed in 1124 s with 12 jobs: test_sopc_validation, test_unary_f16_validation

Both files assert that spirv-as/spirv-val are on PATH (1 + 15 failures), while the other 60-odd files that use those tools skip the step. These two now use the same pattern as tests/semantic/test_reg_ptr_hoist.py:

  • without the tools only the spirv-as/spirv-val step is skipped; the translation and the interpreter checks in the same tests still run (a skipTest would have dropped those too);
  • with LEONIDA_REQUIRE_SPIRV_TOOLS=1 (the CI Linux leg, tests/semantic/test_spirv_tools_required.py) a missing tool is still a failure.

Tested

Windows 11, Python 3.13.7, no SPIRV-Tools, no game files:

  • test_sopc_validation.py: OK (was 1 failure); with LEONIDA_REQUIRE_SPIRV_TOOLS=1: still fails, as intended
  • test_unary_f16_validation.py: OK (was 15 failures); with LEONIDA_REQUIRE_SPIRV_TOOLS=1: still fails, as intended
  • tests/test_ci_registration.py: OK
  • Full suite before the change: 463/465 files green; the two failures were these files.

Not run with SPIRV-Tools installed here; the validation code path itself is unchanged.

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • No translator rule changed.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/940 **Author:** [@Luna-OS](https://github.com/Luna-OS) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/semantic-spirv-tools-optional` --- ### 📝 Commits (1) - [`773ce69`](https://github.com/ubiquitarianism/leonida/commit/773ce695c71b0f5f44c36ad2e2ce2a88eb5826f6) tests/semantic: sopc and unary f16 validation skip spirv-val without SPIRV-Tools (TEST-SPIRV-TOOLS-OPTIONAL) ### 📊 Changes **2 files changed** (+9 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/semantic/test_sopc_validation.py` (+5 -1) 📝 `tests/semantic/test_unary_f16_validation.py` (+4 -1) </details> ### 📄 Description Claimed in the coordination issue as: TEST-SPIRV-TOOLS-OPTIONAL (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135902691) ### What and why AGENTS.md says `python -I scripts/run_semantic_tests.py tests/semantic` needs no LLVM, SPIR-V tools or GPU. On a machine without SPIRV-Tools it ends red anyway: ``` 465 files, 6108 tests, 2 files failed in 1124 s with 12 jobs: test_sopc_validation, test_unary_f16_validation ``` Both files assert that `spirv-as`/`spirv-val` are on PATH (1 + 15 failures), while the other 60-odd files that use those tools skip the step. These two now use the same pattern as `tests/semantic/test_reg_ptr_hoist.py`: - without the tools only the `spirv-as`/`spirv-val` step is skipped; the translation and the interpreter checks in the same tests still run (a `skipTest` would have dropped those too); - with `LEONIDA_REQUIRE_SPIRV_TOOLS=1` (the CI Linux leg, `tests/semantic/test_spirv_tools_required.py`) a missing tool is still a failure. ### Tested Windows 11, Python 3.13.7, no SPIRV-Tools, no game files: - `test_sopc_validation.py`: OK (was 1 failure); with `LEONIDA_REQUIRE_SPIRV_TOOLS=1`: still fails, as intended - `test_unary_f16_validation.py`: OK (was 15 failures); with `LEONIDA_REQUIRE_SPIRV_TOOLS=1`: still fails, as intended - `tests/test_ci_registration.py`: OK - Full suite before the change: 463/465 files green; the two failures were these files. Not run with SPIRV-Tools installed here; the validation code path itself is unchanged. GPUs tested: n/a AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - [x] No translator rule changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:41 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#977
No description provided.