Allow test runner thread overrides #2676
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2676
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2676"
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?
@luckyteagirl on GitHub · 2026-11-26 05:49 UTC · original
luckyteagirl:codex/test-respect-thread-option→main· +59 −5 · 2 files · 1 commits · openscripts/test.ps1always added--test-threads=4. On Rust 1.99.0, libtest rejected a caller's second option before running tests; on Rust 1.100.0, duplicate options are accepted with the last value winning. The runner now gives callers a consistent override without passing duplicates.What is in it
RUST_TEST_THREADSforcargo testand restore the caller's environment afterward.--.Tested
--test-threads=Nand--test-threads Narguments with exit 101. Both explicit forms took precedence over the environment default.scripts/test-test-threads.tests.ps1andscripts/test-native-stderr.tests.ps1passed on PowerShell 5.1 and 7.6.9. The mock Cargo fixture checks argument forwarding, the four-thread default, and restoration for both an unset and a previously set environment variable.29e66d46passed with the patched runner on both shells for success, build failure, test failure, and missing Cargo.git diff --checkpassed.Regression run
Not tested
AI use
@fromthemoonx on GitHub · 2026-11-26 06:07 UTC · original
The real runner works on Windows PowerShell 5.1, and the bug it fixes depends on the Rust version: Rust 1.98.1's libtest rejects a second
--test-threads, Rust 1.100.0's accepts it (the last one wins). So on 1.100.0main's runner already works with an explicit--test-threads; on 1.98.1 and older, this change is what makes it work.Windows 11 Pro 26300, Windows PowerShell 5.1.26100, RTX 3060,
mainb49be18:cargo +1.98.1 test -- --test-threads=4 --test-threads=2error: Option 'test-threads' given more than once+stable(1.100.0), and XCL's lib test binary with=and space forms in any ordertest result: ok.\scripts\test.ps1 vfs::tests --test-threads=2under PS 5.1 (real Cargo, Rust 1.100.0):main/ this PR merged ontomainscripts\test-test-threads.tests.ps1andscripts\test-native-stderr.tests.ps1under PS 5.1 on23c12a4test-threads: ok)Not tested: the whole workspace suite through the runner (only the
vfs::testsfilter), PowerShell 7.AI use: Claude Code (Claude Opus 5.5) ran the checks and wrote this comment.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.