Find the translator and spirv-val by OS in xlate_smoke.py, so the smoke test runs on Linux.

This commit is contained in:
Wellington Dias committed 2026-10-31 02:05:35 -03:00
1 parent e45eb07c6f
commit c626cda8ea
1 file changed
+6 -3
+6 -3
View File
@@ -1,4 +1,4 @@
"""Smoke test for build/xlate/totk_xlate.exe: no game files needed.
"""Smoke test for build/xlate/totk_xlate(.exe): no game files needed.
Sends one hand-assembled Maxwell fragment shader (writes the constant colour 1.0, 0.5, 0.25, 1.0 to render target 0)
through --serve, checks the reply, validates the SPIR-V with spirv-val, then sends a malformed line and checks the
@@ -8,6 +8,8 @@ service survives and still answers.
"""
import json
import os
import shutil
import struct
import subprocess
import sys
@@ -15,8 +17,9 @@ import tempfile
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
EXE = ROOT / "build" / "xlate" / "totk_xlate.exe"
SPIRV_VAL = Path(r"C:\msys64\ucrt64\bin\spirv-val.exe")
EXE = ROOT / "build" / "xlate" / ("totk_xlate.exe" if os.name == "nt" else "totk_xlate")
SPIRV_VAL = (Path(r"C:\msys64\ucrt64\bin\spirv-val.exe") if os.name == "nt"
else Path(shutil.which("spirv-val") or "/usr/bin/spirv-val"))
PT = 7 << 16 # predicate "always"