Commit Graph

1 Commits

Author SHA1 Message Date
272678ef5a spirv_metal_set0: a missing or failing spirv-dis/spirv-as is one ERROR line, not a traceback
`spirv_metal_set0.py in.spv out.spv` ended in a traceback when spirv-dis
or spirv-as was not on PATH (FileNotFoundError) or rejected its input, such
as a missing or non-SPIR-V in.spv (CalledProcessError).

The command line now goes through cli(), which reports either as one line
and exit 1: the program, its exit status and the first line it wrote, or
the program that could not be started with a hint about PATH and
SPIRV_DIS / SPIRV_AS (Windows does not name the program in that error, so
_run() adds it). main() still raises as before; the existing tests that
call it are unchanged and pass.

tests/test_spirv_metal_set0_cli_errors.py needs no SPIRV-Tools: SPIRV_DIS
and SPIRV_AS point at the Python interpreter or at a missing path. All 7
tests fail on the tool as it was.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:08:41 -05:00