[PR #1722] tests/run_wine_tests: one timing log per child, so --jobs tests pass on Windows (TEST-WINE-JOBS-TIMING-WINDOWS) #1737

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

📋 Pull Request Information

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

Base: main ← Head: test/wine-jobs-timing-windows


📝 Commits (1)

  • 67b81fe tests/run_wine_tests: one timing log per child, so --jobs tests pass on Windows (TEST-WINE-JOBS-TIMING-WINDOWS)

📊 Changes

1 file changed (+10 additions, -5 deletions)

View changed files

📝 tests/test_run_wine_tests.py (+10 -5)

📄 Description

Claimed in the coordination issue as: TEST-WINE-JOBS-TIMING-WINDOWS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7158675336)

What and why

On native Windows, test_jobs_runs_that_many_tests_at_a_time and test_jobs_keeps_locks_serial_tests_and_dependencies
in tests/test_run_wine_tests.py fail on every run, with IndexError (a span with no end) or ValueError (two lines
merged into one) in intervals().

The timed() child processes all append to one shared timing.log at the same time. Appends from several processes
to one file are not atomic on Windows, so lines are lost or merged. Reproduced outside the test: six processes doing
the same two appends to one file left 11 lines instead of 12.

The fix is in the test only: each child writes its own timing/<name>.log, and intervals() reads them all.
scripts/run_wine_tests.py is unchanged.

Tested

Windows 11, Python 3.14, on main 3de22a1:

  • python -I tests/test_run_wine_tests.py: before, FAILED (errors=2, skipped=12) on every run; after, OK (skipped=12) on 4 of 4 runs.
  • python -I tests/test_text_write_line_endings.py: OK.

Not run on Linux; the change does not depend on the platform.

GPUs tested: n/a

AI-assisted: yes

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)

🤖 Generated with Claude Code


🔄 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/1722 **Author:** [@kurrutako](https://github.com/kurrutako) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test/wine-jobs-timing-windows` --- ### 📝 Commits (1) - [`67b81fe`](https://github.com/ubiquitarianism/leonida/commit/67b81fe837b0b4ef9045d3d9e8205666aaf65268) tests/run_wine_tests: one timing log per child, so --jobs tests pass on Windows (TEST-WINE-JOBS-TIMING-WINDOWS) ### 📊 Changes **1 file changed** (+10 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_run_wine_tests.py` (+10 -5) </details> ### 📄 Description Claimed in the coordination issue as: TEST-WINE-JOBS-TIMING-WINDOWS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7158675336) ### What and why On native Windows, `test_jobs_runs_that_many_tests_at_a_time` and `test_jobs_keeps_locks_serial_tests_and_dependencies` in `tests/test_run_wine_tests.py` fail on every run, with `IndexError` (a span with no end) or `ValueError` (two lines merged into one) in `intervals()`. The `timed()` child processes all append to one shared `timing.log` at the same time. Appends from several processes to one file are not atomic on Windows, so lines are lost or merged. Reproduced outside the test: six processes doing the same two appends to one file left 11 lines instead of 12. The fix is in the test only: each child writes its own `timing/<name>.log`, and `intervals()` reads them all. `scripts/run_wine_tests.py` is unchanged. ### Tested Windows 11, Python 3.14, on `main` `3de22a1`: - `python -I tests/test_run_wine_tests.py`: before, `FAILED (errors=2, skipped=12)` on every run; after, `OK (skipped=12)` on 4 of 4 runs. - `python -I tests/test_text_write_line_endings.py`: OK. Not run on Linux; the change does not depend on the platform. GPUs tested: n/a AI-assisted: yes ### 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. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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#1737
No description provided.