Repository navigation
fix(gcu-c): host_test target + regression for #72 - #75
Conversation
CMake reserves the name test when CTest is enabled. Plate already uses host_test; add regression tests so reserved-name configure failures cannot return unnoticed.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4db331e205
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if shutil.which("cmake") is None: | ||
| import pytest | ||
|
|
||
| pytest.skip("cmake not on PATH") |
There was a problem hiding this comment.
Skip the configure test when a C compiler is unavailable
The gcu-c host CMakeLists.txt calls project(gcu_c_host C), so cmake -S/-B requires a usable C compiler in addition to the cmake executable. On developer or CI environments that have CMake installed but no compiler/toolchain configured (for example, CMake on PATH without Visual Studio Build Tools), this test fails the package's otherwise Python-only test suite rather than taking the documented skip path. Detect a usable compiler (or treat CMake's compiler-not-found outcome as a skip) before asserting configure success.
Useful? React with 👍 / 👎.
Summary
testis reserved when CTest is enabled.host_test(landed earlier on main).host_test(notadd_custom_target(test)), and optionalcmake -S/-Bconfigure whencmakeis on PATH.Test plan
gcu-cplateCMakeLists.txt+silico.tomlpytest tests/test_scaffold_and_cli.py -qon a host with Pythontesttarget--target test, setgate = \"cmake --build build/host --target host_test\"or re-scaffold host plate filesRelated