Brian Silverman | 33d0d6e | 2016-05-15 23:33:39 -0700 | [diff] [blame] | 1 | #include "aos/testing/random_seed.h" |
2 | |||||
3 | #include <stdlib.h> | ||||
4 | |||||
5 | namespace aos { | ||||
6 | namespace testing { | ||||
7 | |||||
8 | int RandomSeed() { | ||||
9 | const char *from_environment = getenv("TEST_RANDOM_SEED"); | ||||
10 | if (from_environment != nullptr) { | ||||
11 | return atoi(from_environment); | ||||
12 | } | ||||
13 | return 1; | ||||
14 | } | ||||
15 | |||||
16 | } // namespace testing | ||||
17 | } // namespace aos |