[PR #1439] tests: a locked recorder.exe no longer hides the cmake batch case's result (TEST-CMAKE-BATCH-CLEANUP) #1469

Open
opened 2026-11-26 20:21:21 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1439
Author: @Anonymous78e
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: test/cmake-batch-cleanup


📝 Commits (1)

  • 751de4d tests: a locked recorder.exe no longer hides the cmake batch case's result (TEST-CMAKE-BATCH-CLEANUP)

📊 Changes

1 file changed (+4 additions, -2 deletions)

View changed files

📝 tests/test_build_runtime_cmake.py (+4 -2)

📄 Description

Claimed in the coordination issue as: TEST-CMAKE-BATCH-CLEANUP (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148310075)

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.py builds each case in tempfile.TemporaryDirectory(dir=self.base) and copies a recorder.exe into it, which a child process runs. When Windows still holds that image at cleanup (antivirus, a late handle close), shutil.rmtree raises PermissionError: [WinError 5] and that error replaces the case's own result, as reported:

PermissionError: [WinError 5] Access is denied: ...\caret^dir\tools ^ & 東京\recorder.exe

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 main 1154976d4:

  • The mechanism, deterministically: a file held open inside a TemporaryDirectory whose body fails an assertion.

    exception that surfaces
    no flag (as on main) PermissionError: [WinError 32] ...
    ignore_cleanup_errors=True AssertionError: the case's own assertion
  • python -I tests/test_build_runtime_cmake.py: 1 test (27 subtests) OK in 11 s with this change.

  • scripts/check_no_game_data.py on the file: clean.

GPUs tested: n/a

AI-assisted: yes (Claude Code, Claude Opus 5.5)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

https://claude.ai/code/session_014sDZDAAcsauTL6d8ie67Qo


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1439 **Author:** [@Anonymous78e](https://github.com/Anonymous78e) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test/cmake-batch-cleanup` --- ### 📝 Commits (1) - [`751de4d`](https://github.com/ubiquitarianism/leonida/commit/751de4d16c774016997db420e6ae0128cc9a1aff) tests: a locked recorder.exe no longer hides the cmake batch case's result (TEST-CMAKE-BATCH-CLEANUP) ### 📊 Changes **1 file changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_build_runtime_cmake.py` (+4 -2) </details> ### 📄 Description Claimed in the coordination issue as: TEST-CMAKE-BATCH-CLEANUP (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7148310075) ### What and why Part (3) of @GTAVIB4GTAVI's parallel-load finding ([#14](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147794650)). Parts (1) and (2) are #1410 and #1002. `tests/test_build_runtime_cmake.py` builds each case in `tempfile.TemporaryDirectory(dir=self.base)` and copies a `recorder.exe` into it, which a child process runs. When Windows still holds that image at cleanup (antivirus, a late handle close), `shutil.rmtree` raises `PermissionError: [WinError 5]` and that error replaces the case's own result, as reported: ``` PermissionError: [WinError 5] Access is denied: ...\caret^dir\tools ^ & 東京\recorder.exe ``` 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 `main` 1154976d4: - The mechanism, deterministically: a file held open inside a `TemporaryDirectory` whose body fails an assertion. | | exception that surfaces | |---|---| | no flag (as on `main`) | `PermissionError: [WinError 32] ...` | | `ignore_cleanup_errors=True` | `AssertionError: the case's own assertion` | - `python -I tests/test_build_runtime_cmake.py`: 1 test (27 subtests) OK in 11 s with this change. - `scripts/check_no_game_data.py` on the file: clean. GPUs tested: n/a AI-assisted: yes (Claude Code, Claude Opus 5.5) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014sDZDAAcsauTL6d8ie67Qo --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1469
No description provided.