Repository navigation
xdxr_bvh: a check-build folder that does not exist is one ERROR line and exit 2, not the 77 skip (EGEN-XDXR-CHECKBUILD-DIR) - #8333
Conversation
…ne ERROR line) A mistyped or removed folder was read exactly like a build that wrote no cases: 'no cases in <dir>: skipped (the build step skipped or did not run)' with exit 77, the ctest skip code, so a wrong path passed as a clean skip. An existing folder with no cases keeps the 77 skip.
…empty one still skips The missing-folder test fails on the old main with '77 != 2' (AssertionError in Cli.check_build_stderr) and passes with the guard; the empty-folder test keeps the 77 ctest skip for a build that ran and wrote nothing.
|
Verified commit AI-assisted verification. |
|
Tested
Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting; claimed in #8047. |
|
Tested 2330b2a on Windows 11 (CPU only, no GPU needed): pass Windows 11 Pro, Python 3.14.7, no GPU or game files involved; pytest/numpy/Pillow pinned from
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Tested
|
|
Tested Security pass first: clean. The diff is
AI-assisted. |
What and why
tools/xdxr_bvh.py check-builddistinguishes a build folder from a path that does not exist by how many.bincases it holds. A folder that is not there holds no cases, so it took the same branch as a build step that ran and wrote nothing:Exit 77 is the ctest
SKIP_RETURN_CODE, so a mistyped path (or a folder that was moved) passed as a deliberate skip, and the message blamed the build step. Every other input error in this tool is exit 2 with oneERROR:line (check-build's own case errors attools/xdxr_bvh.py:1051,validate's unreadable file), and BUILD-1046 asks for exactly that.The guard tests
os.path.isdir(a.dir)before the case scan. An existing folder with no cases keeps the 77 skip.Test
tests/test_xdxr_bvh.pygains two cases in the existingCliclass: the missing folder is exit 2 with exactly oneERROR:line that names the path and no traceback, and an existing empty folder still returns 77 with the skip line.47428cc22with only the test added:FAILED (failures=1),AssertionError: 77 != 2,Ran 49 tests.Ran 49 tests in 1.746s,OK.python -m compileall -q tools/xdxr_bvh.py tests/test_xdxr_bvh.pyexits 0.python -I scripts/check_no_game_data.py tools/xdxr_bvh.py tests/test_xdxr_bvh.pyexits 0.No GPU needed, no game files: the tests use
tempfile.TemporaryDirectory()only.Notes
main()'scheck-buildbranch rather than incheck_build(), so the library function keeps its current contract (an empty case list is["no cases in <dir>"]) and the two existing library-level tests are unchanged.ERROR: <what>form used two lines below; it does not repeat the full OS error because there is no OS call involved.validate's unreadable-file message (error: ..., lowercase) is left alone: it is a separate path and not part of this item.Item: EGEN-XDXR-CHECKBUILD-DIR (finding and claim posted in #8186).
AI-assisted.