Change package manager tests to default run in parallel

I just discovered "swift test --parallel" after a few weeks... It cut down my test time a lot (> 20x faster).

I would propose to change the default to be "parallel" and instead have a flag "serial" for those who want/need to run tests in serial order instead - it seems it gives a better out of the box experience?

Thoughts?

It’s useful for new test suites but existing suites may not always be compatible due to dependencies between tests. So it may not be a good default.

1 Like

Maybe do it at next breaking change? Then old test suites can use —serial if needed. It just seems like a good thing to use our nice multi ore boxes by default going forward?

All test suites can be run serially. Only some test suites can be run in parallel. Parallelism can be a useful tool, but I think the default is best left the way it is.

2 Likes

Maybe a markup of the actual test would be better, then no flags are needed. No need for a dependency graph, but simply run all tests marked as ‘serial’ in one task after each other and parallel run everything else as separate tasks. Then older projects can also benefit by at least breaking out a partial set (and new) tests to run in parallel.

Terms of Service

Privacy Policy

Cookie Policy