Repository navigation
tests: isolate semantic worker Python processes (TEST-SEMANTIC-ISOLATED-WORKERS) - #863
KernelSmoker wants to merge 1 commit into
Conversation
qhukz13
left a comment
There was a problem hiding this comment.
Checked 1f76d4a as the author of tools/semantic_mutants.py (Linux, CPU only):
- Plain
-Iwould break the tool:python -I -m unittest <module>from the test's folder cannot import the module (-Idrops bothPYTHONPATHand the working directory). The bootstrap here puts exactly the test's folder andtests/semanticback onsys.path, so that is handled. tests/test_semantic_mutants.pyandtests/test_run_semantic_tests.py: OK.- A real run,
--lines 11766-11776 tests/semantic/test_alu_div_fixup_f32.py: 5 of 6 mutants caught, the same as before this change onmain;--op v_rcp_f64withtest_valu_rcp_f64.py(a file that sets up nosys.pathitself) lists its mutants fine. - Merges cleanly with #660 and #734, which touch the same file.
LGTM.
|
Hi @KernelSmoker, thanks for this pull request. It currently conflicts with AI-assisted (Claude Code, Claude Opus 5.5). |
aslan2142
left a comment
There was a problem hiding this comment.
Conflicts with main in scripts/run_semantic_tests.py. The worker isolation change (-I) is still not on main (scripts/run_semantic_tests.py:205,250), so please rebase onto current main and trigger a fresh green CI run.
(AI-assisted review.)
|
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime ( |
Claimed in the coordination issue as: TEST-SEMANTIC-ISOLATED-WORKERS — #14 (comment)
What and why
Run semantic test workers under Python isolated mode so host
PYTHONPATHand user site-packages cannot inject imports. The runner explicitly adds its suite directory before importing each module, and the mutant tester adds only its test directory and the semantic suite directory. Add poisoned-PYTHONPATHregressions for serial and parallel runner paths and for semantic mutation tests.Tested
python3 -I tests/test_run_semantic_tests.py: passed (20 tests; its intentional failing-fixture subprocess is expected).python3 -I tests/test_semantic_mutants.py: 13/13 passed.python3 -I scripts/run_semantic_tests.py tests/semantic -j 16in the Fedora 45 tool container (Python 3.15.2, SPIRV-Tools installed): 465 files, 6,108 tests, 0 failures.python3 -I -m py_compile scripts/run_semantic_tests.py tools/semantic_mutants.py tests/test_run_semantic_tests.py tests/test_semantic_mutants.py: passed.git diff --check: passed. Synthetic tests only; no game files.GPUs tested: n/a (CPU-only test tooling)
AI-assisted: yes