[PR #692] [MERGED] tests: the supplied-runtime build keeps its --jobs 3 on a 2-vCPU machine (OLD-10056) #731

Closed
opened 2026-11-26 20:18:51 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/692
Author: @Poussistar
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: tests/make_game-pipelines-host-jobs


📝 Commits (1)

  • ce5d643 tests: the supplied-runtime build keeps its --jobs 3 on a 2-vCPU machine

📊 Changes

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

View changed files

📝 tests/test_make_game_pipelines.py (+4 -1)

📄 Description

Claimed in the coordination issue as: OLD-10056

What

tests/test_make_game_pipelines.py::test_windows_reuses_the_checker_from_the_supplied_runtime_build asks for --jobs 3 and then compares the value that reached the checker. make_game.main() clamps --jobs to the host CPU count first (leonida_tui.clamp_jobs, make_game.py:2989), so on a machine with fewer than three logical CPUs the assertion compares the clamped value and fails with 2 != 3.

#83 pinned the two other assertions of this class and missed this one.

Change

Pin make_game.leonida_tui.os.cpu_count to 16 around that main() call, with the same wording as the two pins #83 added in this file. Test-only: clamp_jobs and make_game.py are untouched, and test_jobs_default_calculation_scenarios keeps the clamp covered.

This carries the tests/test_make_game_pipelines.py part of my old pull request 10056, which draft #322 reopened verbatim from old-pr/10056 and which conflicts with main since #83 merged.

Tested

Base 21625bca8 (current main), Linux x86-64, Python 3.14.7, no game files, no GPU. python -I implies -E, so PYTHON_CPU_COUNT never reaches the test: the core count is patched in-process instead.

cores tests/test_make_game_pipelines.py before after
2 1 failure: AssertionError: 2 != 3 Ran 18 tests ... OK
4 (this machine) OK OK
256 OK OK

tests/test_make_game_argparse.py also passes at 2, 4 and 256 cores before and after (untouched).

Negative control: with the pin removed, the 2-core run is red again (FAILED (failures=1)), so the pin is what makes it host-independent.

AI-assisted. No game files.


🔄 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/692 **Author:** [@Poussistar](https://github.com/Poussistar) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `tests/make_game-pipelines-host-jobs` --- ### 📝 Commits (1) - [`ce5d643`](https://github.com/ubiquitarianism/leonida/commit/ce5d643b243793b6f0ace900764aa7ae88f5884a) tests: the supplied-runtime build keeps its --jobs 3 on a 2-vCPU machine ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_make_game_pipelines.py` (+4 -1) </details> ### 📄 Description Claimed in the coordination issue as: `OLD-10056` ## What `tests/test_make_game_pipelines.py::test_windows_reuses_the_checker_from_the_supplied_runtime_build` asks for `--jobs 3` and then compares the value that reached the checker. `make_game.main()` clamps `--jobs` to the host CPU count first (`leonida_tui.clamp_jobs`, `make_game.py:2989`), so on a machine with fewer than three logical CPUs the assertion compares the clamped value and fails with `2 != 3`. #83 pinned the two other assertions of this class and missed this one. ## Change Pin `make_game.leonida_tui.os.cpu_count` to 16 around that `main()` call, with the same wording as the two pins #83 added in this file. Test-only: `clamp_jobs` and `make_game.py` are untouched, and `test_jobs_default_calculation_scenarios` keeps the clamp covered. This carries the `tests/test_make_game_pipelines.py` part of my old pull request 10056, which draft #322 reopened verbatim from `old-pr/10056` and which conflicts with `main` since #83 merged. ## Tested Base `21625bca8` (current `main`), Linux x86-64, Python 3.14.7, no game files, no GPU. `python -I` implies `-E`, so `PYTHON_CPU_COUNT` never reaches the test: the core count is patched in-process instead. | cores | `tests/test_make_game_pipelines.py` before | after | |---|---|---| | 2 | 1 failure: `AssertionError: 2 != 3` | `Ran 18 tests ... OK` | | 4 (this machine) | `OK` | `OK` | | 256 | `OK` | `OK` | `tests/test_make_game_argparse.py` also passes at 2, 4 and 256 cores before and after (untouched). Negative control: with the pin removed, the 2-core run is red again (`FAILED (failures=1)`), so the pin is what makes it host-independent. AI-assisted. No game files. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:51 +01:00
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#731
No description provided.