Batch test executions by default #46934
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: None
Purpose of change
Our build process is problematically slow, and a minor contributor is the time to run tests, also running the full test suite locally takes longer than it should.
Describe the solution
Parallelism!
By default make check now invokes the test executable three times, each time executing a different subset of the test suite.
The partitioning of tests is roughly equal with respect to execution time.
Describe alternatives you've considered
I've gone back and forth on enabling the batching by default, if invoked without -j this increases total execution time of the test suite by about 15 seconds. I was hoping to detect whether parallell building was enabled at all to enable batching, but make hides this information.
More or less parallelism might be an improvement, each invocation eats about 8 seconds during setup, so it's a balancing act between setup time and degree of paralellism.
Testing
Run tests, duh.
I'm seeing what I assume is an ordering artifact with one of the stomach tests where the BMR of the test subject is 10x higher than expected.This turned out to be ephemeral, just a coincidence that I hit it when running the split tests.I also need to see if this makes any of the instrumented build targets unhappy.
Nothing is complaining