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

Seed mapgen in tests for reproducibility #27416

Merged
merged 1 commit into from
Jan 5, 2019

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: Infrastructure "Better test reproducibility (yet again)"

Purpose of change

We are seeding the RNG before each test, but not before mapgen, so some failures were not reproducible.

Describe the solution

Seed at the start also.

Additional context

If and when #27062 is merged the srand call here should become redundant, and the whole thing can be simplified to just
rng_set_engine_seed( session.config().rngSeed() );

@ZhilkinSerg ZhilkinSerg added Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` labels Jan 4, 2019
Previously we were seeding the RNG before each test, but not before
mapgen, so some failures were not reproducible.
@kevingranade kevingranade merged commit 8788057 into CleverRaven:master Jan 5, 2019
@jbytheway jbytheway deleted the seed_mapgen branch January 5, 2019 10:40
peperov pushed a commit to peperov/Cataclysm-DDA that referenced this pull request Jan 12, 2019
Previously we were seeding the RNG before each test, but not before
mapgen, so some failures were not reproducible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants