Skip to content

Conversation

@kcieplak
Copy link
Contributor

Cherry pick of b16bb8f

Add an operation queue around execution of swiftPM process execution.

**swift-testing** based test will run all tests in parallel at the same
time, causing each invocation to spawn a process which will then spawn
many other subprocesses. This is compounded by tests that use arguments,
as each combination will create another test that will run in parallel.

These leads to a process bomb consuming all CPU and causes massive I/O
blocking.

Add a limit to how many swiftPM top level processes can run at the same
time during testing. This is similar behaviour to XCtest based testing
with the **--num-workers** option limiting the number of occurrent
tests.

…iftlang#9243)

Add an operation queue around execution of swiftPM process execution.

**swift-testing** based test will run all tests in parallel at the same
time, causing each invocation to spawn a process which will then spawn
many other subprocesses. This is compounded by tests that use arguments,
as each combination will create another test that will run in parallel.

These leads to a process bomb consuming all CPU and causes massive I/O
blocking.

Add a limit to how many swiftPM top level processes can run at the same
time during testing. This is similar behaviour to XCtest based testing
with the **--num-workers** option limiting the number of occurrent
tests.
@kcieplak kcieplak requested a review from a team as a code owner October 21, 2025 13:28
@kcieplak
Copy link
Contributor Author

@swift-ci test

@kcieplak
Copy link
Contributor Author

@swift-ci test windows

@kcieplak
Copy link
Contributor Author

@swift-ci test windows

@plemarquand plemarquand changed the title Testing: Run all test SPM executable actions in a operation queue (#9243) [6.2] Testing: Run all test SPM executable actions in a operation queue (#9243) Oct 21, 2025
@kcieplak
Copy link
Contributor Author

@swift-ci test windows platform

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants