Skip to content

test: eight checks say which compiler or module they need - #2103

Merged
hckrman101 merged 1 commit into
NotRexed:mainfrom
jarynclouatre:test/run-all-tool-declarations
Nov 11, 2026
Merged

hckrman101 merged 1 commit into
NotRexed:mainfrom
jarynclouatre:test/run-all-tool-declarations

Conversation

@jarynclouatre

@jarynclouatre jarynclouatre commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Eight checks fail on any PC without clang or the zstandard module, instead of using the compiler run_all.py found or being skipped. Five C++ tests default to clang++ and two C tests to clang without a RUN_ALL_ARGS line (for example tests/test_3d_view_create_flags.py and tests/test_nvn_null_pool.py), and nx2/test_nup_read_name.py imports zstandard without RUN_ALL_MODULES. run_all.py only checks the tools a test names, so it can neither hand these its compiler nor skip them, and on a g++-only box they show as failures.

Each now declares what it needs: RUN_ALL_ARGS = ["--cxx", "{cxx}"] on the five (the runner's compiler, which is still clang++ where it is installed), ["--cc", "clang"] on the two C ones, and RUN_ALL_MODULES = ["zstandard"] on the last. Nothing changes where clang and zstandard are installed, as on CI.

tests/test_prepare_cache_save.py was a sixth C++ one; main gave it the same line in #1980, so it is no longer part of this.

Testing (Linux, g++ 15, no clang, no zstandard): after the rebase, the eight through run_all.py: the five C++ tests pass with g++, and the other three are skipped with their reason. Before the rebase, tests/test_run_all_declarations.py passed, and the full run_all.py gave 298 passed, 61 skipped, with the only failures the two that #2109 has since fixed on main.

@hckrman101

Copy link
Copy Markdown
Collaborator

Heads-up: this conflicts with main now. Could you rebase onto main and resolve the conflicts? Thanks!

On a PC with g++ and no clang, or without the zstandard module, tests/run_all.py reported eight failures that are not
failures of the source: five C++ checks and two C checks start their own default compiler (clang++, clang) without
saying so, and nx2/test_nup_read_name.py imports zstandard without saying so, so the runner could neither give them
the compiler it found nor skip them.

The five C++ checks take the runner's compiler ({cxx}: clang++ where there is one, as before, else g++; all five pass
with g++ 15 here). The two C checks name clang and the module check names zstandard, so each is skipped with its
reason where that is missing, and fails with --strict as CI runs it. Nothing changes where clang and zstandard are
installed.
@jarynclouatre
jarynclouatre force-pushed the test/run-all-tool-declarations branch from eb26cb7 to ce7fa41 Compare November 11, 2026 16:40
@jarynclouatre jarynclouatre changed the title test: nine checks say which compiler or module they need test: eight checks say which compiler or module they need Nov 11, 2026
@jarynclouatre

Copy link
Copy Markdown
Contributor Author

Rebased onto main. Main had already given tests/test_prepare_cache_save.py its line in #1980, so this now covers eight checks; title and text updated.

@Joey-Magnus Joey-Magnus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Each of the eight files now declares what it needs, in the form run_all.py reads (a top-level literal after the imports). Each test's argparse already accepts the flag it's handed: --cxx on the five C++ ones, --cc on the two C ones. With clang and zstandard installed, the runner passes the same compiler the tests defaulted to, so CI behaviour doesn't change. None of these files has a declaration on main yet, so nothing here is superseded. I ran the eight plus test_run_all_declarations on this head on Linux, and all nine pass.

About the red CI on this head (not caused by the PR): the run started at 16:40 UTC. The Windows failures are tests/test_vcore_fs_open.py and tests/test_vcore_video_acquire.py, which this PR doesn't touch. Main broke both of them at 11:35 (#2301 and #2322) and fixed them at 12:05 (#2380), and this run landed inside that window. The Ubuntu, SPIR-V and AppImage jobs failed in the apt step (exit 100, a DNS outage), before any test ran. A rerun, or a no-op rebase, should come back green.

minor (optional follow-up): tests/test_nvn_null_pool.py:21 and tests/test_nvn_tex_builder_guard.py:20 declare ["--cc", "clang"]. On a gcc-only machine both are now skipped, even though their help text says they work with gcc too. That's still a clear improvement over failing. run_all.py has no {cc} placeholder yet, so the gcc case would need a C compiler added to find_tools(). That belongs in its own PR, not this one.

@hckrman101
hckrman101 merged commit c6bbdf2 into NotRexed:main Nov 11, 2026
8 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants