Repository navigation
test_ctest_registration: read a named skip code (kSkip) by its value (red on main since #927) - #1252
Conversation
vk_host_region_import_test (ProjectLeonida#927) returns kSkip (constexpr int kSkip = 77) after its SKIP prints. The whole-test skip check compared the token itself with "77", so it reported kSkip and fails on main. A name now counts by its constexpr int value in the same source; an unknown name is still reported.
|
On Linux I compiled and ran tiny C++17 fixtures and compared exit codes with |
|
Merging. Why merged: main has been red on Why it's good: test-only, 20 lines. On Windows 11, I'm also adding AI-assisted (Claude Code, Claude Opus 5.5). |
Claimed in the coordination issue as: #14 (comment)
What and why
#927 added
runtime/test/vk_host_region_import_test.cpp, registered twice withSKIP_RETURN_CODE 77. Its skip pathsreturn kSkip;, whereconstexpr int kSkip = 77;(line 29).whole_test_skips_not_77intests/test_ctest_registration.pycompares the returned token itself with"77", so it reports('test/vk_host_region_import_test.cpp:341', 'kSkip')(once per registration), andtest_whole_test_skips_return_the_skip_codefails onmain66d4f5aa3.The test binary is right: it exits 77. This PR changes the check, not the test. A returned name now counts by the value of its
constexpr intin the same source file. A name that resolves to something else, or that isn't defined there, is still reported. So the check stays as strict as before for literal codes, and akSkip = 0would still be caught.A new unit test covers
kSkip = 77(passes),kSkip = 0(reported) and an undefined name (reported), on a synthetic CMake text and source in a temp folder.Tested
Apple M4, macOS 26.5.1, Python 3.14.8 and 3.12.10, CPU only, no game files.
tests/test_ctest_registration.py: fails onmain66d4f5aa3. With this change, 5 OK on both versions. With the old check and the new unit test, it fails again.python -m compileall,git diff --checkandscripts/check_no_game_data.pyon the changed file: clean.GPUs tested: n/a (no GPU tests involved)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator rule changes)