tests: pin the hardware threads where --jobs is asserted #83
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/83"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-24T02:14:33Z.
Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository's issue index (#18) has no entry for it.
Depends on: none (the
--jobs 10assets case, the same clamp in a sibling test, is already onmain).What and why
main()clamps--jobswithleonida_tui.clamp_jobs, whose ceiling isos.cpu_count(). The GitHub Windows runner has four hardware threads, so two cases that ask for more see the clamp:Both now pin
cpu_countat 16 for that call, as the--jobs 10assets case already does onmain(it was the third failure in this file). The default-jobs case is left alone, so it still checks the real count's halving.Tested
main@e09a55529, macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files:os.cpu_countpatched, the Windows runner)main@e09a55529OK (skipped=1)FAILED (failures=2)— the two aboveOK (skipped=1)OK (skipped=1)Both files run together in the 4-thread check.
compileallclean,check_no_game_data.pyclean. Not run: Windows, any GPU test.Note: old PR 10056 (
old-pr/10056, BlackNife) reworks the same two files for the same reason; I said so in a comment here, and whichever lands first the other can be dropped.AI-assisted: yes.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: test-only.)Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-24T02:27:08Z.
Heads-up for whoever merges the re-landed old pull requests: old PR 10056 (
old-pr/10056, BlackNife, "tests: the make_game --jobs tests no longer depend on the host's core count") covers the same two files,tests/test_make_game_argparse.py(bothtest_custom_jobs_forwarded_to_*cases, which #1 fixes only for assets) and this one. Whichever lands first, the other can be dropped - mine pinscpu_countfor the one call, 10056 reworks the cases; the outcome for the Windows runner is the same (--jobsno longer clamped to 4 in the expectation).