Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch test executions by default #46934

Merged
merged 2 commits into from
Jan 25, 2021

Conversation

kevingranade
Copy link
Member

@kevingranade kevingranade commented Jan 22, 2021

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

Improves build speed when invoked with parallellism.
@actual-nh
Copy link
Contributor

actual-nh commented Jan 22, 2021

Try putting dummy.set_stored_kcal( dummy.get_healthy_kcal() ); in clear_character() (player_helpers.cpp). Also see #46473 regarding different test orders.

@kevingranade kevingranade changed the title Batch test executons by default Batch test executions by default Jan 22, 2021
@BrettDong BrettDong added the Code: Tests Measurement, self-control, statistics, balancing. label Jan 22, 2021
@ZhilkinSerg ZhilkinSerg merged commit 0b1c97a into CleverRaven:master Jan 25, 2021
$WINE "$@" --min-duration 0.2 --use-colour yes --rng-seed time $EXTRA_TEST_OPTS "crafting_skill_gain"&
$WINE "$@" --min-duration 0.2 --use-colour yes --rng-seed time $EXTRA_TEST_OPTS "[slow] !crafting_skill_gain"&
$WINE "$@" --min-duration 0.2 --use-colour yes --rng-seed time $EXTRA_TEST_OPTS "~[slow] ~[.]"&
wait -n
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait on Mac doesn't recognise -n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Tests Measurement, self-control, statistics, balancing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants