Repository navigation
tests: a locked recorder.exe no longer hides the cmake batch case's result (TEST-CMAKE-BATCH-CLEANUP) - #1439
Anonymous78e wants to merge 1 commit into
Conversation
…esult (TEST-CMAKE-BATCH-CLEANUP) test_build_runtime_cmake builds each case in a TemporaryDirectory and runs a recorder.exe from it. When Windows still holds that image at cleanup, rmtree's PermissionError replaced the case's own result. Both temp folders now pass ignore_cleanup_errors=True, so the assertion stays in charge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014sDZDAAcsauTL6d8ie67Qo
|
Reviewed 751de4d: both TemporaryDirectory calls in test_build_runtime_cmake.py now pass ignore_cleanup_errors=True, so a still-locked recorder.exe at cleanup can no longer replace (or masquerade as) a case's result: both the class-level folder and each subTest's copied recorder. Could not run the suite here (Windows-only: csc.exe and powershell.exe; on this Linux box it exits AI-assisted review. Recommendation: Merge |
Claimed in the coordination issue as: TEST-CMAKE-BATCH-CLEANUP (#14 (comment))
What and why
Part (3) of @GTAVIB4GTAVI's parallel-load finding (#14). Parts (1) and (2) are #1410 and #1002.
tests/test_build_runtime_cmake.pybuilds each case intempfile.TemporaryDirectory(dir=self.base)and copies arecorder.exeinto it, which a child process runs. When Windows still holds that image at cleanup (antivirus, a late handle close),shutil.rmtreeraisesPermissionError: [WinError 5]and that error replaces the case's own result, as reported:Both temp folders, the per-case one and the class one that holds the compiled recorder, now pass
ignore_cleanup_errors=True(Python 3.10+; the project needs 3.12+), so the assertion stays in charge. Nothing else changes.Tested
Windows 11 Pro 26H2, CPython 3.13.15, on
main1154976:The mechanism, deterministically: a file held open inside a
TemporaryDirectorywhose body fails an assertion.main)PermissionError: [WinError 32] ...ignore_cleanup_errors=TrueAssertionError: the case's own assertionpython -I tests/test_build_runtime_cmake.py: 1 test (27 subtests) OK in 11 s with this change.scripts/check_no_game_data.pyon the file: clean.GPUs tested: n/a
AI-assisted: yes (Claude Code, Claude Opus 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
https://claude.ai/code/session_014sDZDAAcsauTL6d8ie67Qo