mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #614] [MERGED] run_gpu_tests: report a missing spirv-as instead of a traceback (RUN-GPU-SPIRVAS-MISSING) #655
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#655
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/614
Author: @TuroYT
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:fix/run-gpu-spirvas-missing📝 Commits (1)
078d014run_gpu_tests: report a missing spirv-as instead of a traceback (RUN-GPU-SPIRVAS-MISSING)📊 Changes
2 files changed (+46 additions, -2 deletions)
View changed files
📝
scripts/run_gpu_tests.py(+7 -2)📝
tests/test_run_gpu_tests_python_assembler.py(+39 -0)📄 Description
Claimed in the coordination issue as: RUN-GPU-SPIRVAS-MISSING (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7128005394)
What was wrong.
spirv_asinscripts/run_gpu_tests.py(line ~152) ranspirv-aswithout anOSErrorhandler. With nospirv-ason PATH, the three calls inrun_suite(around line 942) ended the run with a rawFileNotFoundErrortraceback, after the assemble and translate steps.What changed.
spirv_asnow turns theOSErrorinto aRuntimeError, the type a failed assembly already raises:FileNotFoundError:spirv-as not found on PATH (use --assembler python to assemble with tools/spirv_asm.py)OSError:spirv-as could not be started: <strerror>Nothing else changed. The callers do not catch
RuntimeErroreither (see the gap below).Tests. Two new tests in
tests/test_run_gpu_tests_python_assembler.pyfor the two messages, plus two guards for the existing behaviour (stubbed successful run, nonzero exit with stderr).Tested:
python3 -I tests/test_run_gpu_tests_python_assembler.py: 10 tests OK. On unfixedmain: the two new OSError tests ERROR, the other 8 pass.python3 -I tests/test_run_gpu_tests.py: 64 OK. The othertests/test_run_gpu_*.pyfiles: OK.PATH=/nonexistent: before,FileNotFoundError: [Errno 2] ... 'spirv-as'; after,RuntimeError: spirv-as not found on PATH (use --assembler python to assemble with tools/spirv_asm.py).spirv-asexiting 3:RuntimeErrorcarrying its stderr, as before.spirv-asexiting 0 with empty input: no exception.spirv-aswith empty input:RuntimeErrorwith spirv-as's own message, as before.spirv-ason PATH:spirv-as could not be started: Permission denied.python3 -I scripts/check_no_game_data.pyon the two changed files: clean.python3 -m compileall -q scripts tests: clean.Not tested: a real GPU run; a full
run_suitewith a built runtime and game work folder; Windows, wherespirv-as.exelookup goes through the same code path but was not run.Known gap, left for a decision.
run_suitedoes not catchRuntimeError, so a missingspirv-asstill ends in a traceback. Its last line is now the readable message, the same as a failed assembly today. Catching it inrun_suitewould change the exit path for every assembly failure, so it is not in this PR.AI-assisted (Claude Code).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.