Commit Graph

4 Commits

Author SHA1 Message Date
dfce074a05 ci: exclude deprecated legacy C++ runtime/ from automatic CI runs 2026-12-01 12:43:58 -05:00
53604abbfc tests: the five tests that parse the translator source do it in pieces, 60 s -> 17 s (TEST-TRANSLATOR-PIECEWISE-PARSE)
A .pyc does not help ast.parse. test_runtime_paths.py, test_isa_coverage.py,
test_shader_stage_resume.py, test_cmake_translator_deps.py and
test_resource_hygiene.py read the syntax tree of tools/rdna2spirv.py, seven
whole-file parses of 7 s each on CPython 3.12, 3.13.0 to 3.13.15 and 3.14.0
to 3.14.7. They now call tests/semantic/piecewise_parse.parse, which gives
the same tree (tests/test_piecewise_parse.py) in about 1 s.

tools/isa_coverage.py parses inside scan_translator and accepted_names;
its test patches ast.parse around those two calls on the real translator
instead of changing the tool.

Python 3.14.7, valid .pyc of the translator, two runs each:
test_runtime_paths 16.0 -> 3.7 s, test_isa_coverage 15.0 -> 2.5 s,
test_shader_stage_resume 14.2 -> 8.2 s, test_cmake_translator_deps
7.6 -> 1.4 s, test_resource_hygiene 7.6 -> 1.3 s.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-26 12:27:30 +01:00
eb2d564bf4 test_runtime_paths: count what the jobs run, not every tools/ mention under runtime/
Merged with current main, the test failed on nine entries: main has gained two comments that name a tool
(runtime/src/gfx10_tiling.h and runtime/test/shaders/cs_resinfo.asm), and the scan took every
"tools/<name>" in any file under runtime/ as read by the build, then followed that tool's imports.
Reported by kotorvr on #2972.

The seeds are now the code that runs during the jobs: the CMake files and the workflow's steps without
their # comments, and the Python under runtime/ and the scripts the workflow runs, read through the AST
(imports, importlib, string constants other than docstrings). C++, shader and header sources are not
read as dependencies. Four synthetic notes (a C header, an .asm comment, a docstring and a CMake
comment) check that a mention alone no longer makes an entry required.

The computed set is now 17 files; the workflow keeps its 27 plus hw_oracle, a superset. Dropping
lane_masks.py and gfx10_formats.json from the list still fails the test, on main merged in too.
2026-11-22 21:40:07 +01:00
811a7831ad runtime.yml: a test keeps the path list in step with what the jobs read
tests/test_runtime_paths.py recomputes the tools/ files the Runtime jobs read (named by runtime/, the
workflow's steps and the scripts it runs, then sibling imports, modules and files named in strings, and
tools/ subdirectories, to a fixed point) and fails when one is not listed, when the push and pull_request
lists differ, or when a listed tool no longer exists. Without it, a new import in the translator would
leave the new module outside the list, and a later change to that module alone would skip the GPU tests.

.gitattributes joins the list: it decides the line endings of every file the build checks out.

docs/testing.md no longer says the llvmpipe suite runs on every pull request, and says that a commit on
main has a runtime-windows artifact only if it touched what the workflow builds or reads.
2026-11-22 20:23:43 +01:00