Repository navigation
tests: ignore commented CMake registrations when checking CTest coverage - #2199
Open
EdenBendheim wants to merge 1 commit into
Open
EdenBendheim wants to merge 1 commit into
EdenBendheim wants to merge 1 commit into
Conversation
…-REGISTRATION-COMMENTS)
|
Verified on main a73a57e (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. python -I tests/test_ctest_registration.py: 10 tests OK against the real runtime/CMakeLists.txt. Compared with main's helpers on a small CMake text (one live test, plus a commented-out add_executable and add_test): main's built_test_executables() and registered_commands() count disabled_test and orphan_test from the comments; this PR's count only live_test. compileall clean. AI-assisted: yes (Claude Code) |
|
Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.
(AI-assisted test run; output checked by hand.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: TEST-CTEST-REGISTRATION-COMMENTS (claim)
Commenting out
add_test(...)left the registration checker green for a built executable. In a throwaway CMake project,ctest -Nlisted zero tests while the checker reported zero missing registrations. The checker now strips CMake line and bracket comments before scanning declarations and skip properties. It preserves literal#characters in quoted, escaped and bracket arguments.Three regression cases failed on main
a73a57e13. With this change, all 10 registration tests pass on Python 3.12.14 and 3.14.3 on macOS, and the checker flags the omitted executable from the CMake fixture. Compile, diff and changed-file game-data checks passed. Simulated merge with #1418 was clean.GPUs tested: n/a. All tests used synthetic inputs.
AI-assisted: yes. Created with gpt-6.2-astra in Codex.