John Bytheway
f696ab836b
Change random test shuffling technique
...
Previously a random test ordering was obtained by applying std::shuffle
to the tests in declaration order. This has two problems:
- It depends on the declaration order, so the order in which the tests
will be run will be platform-specific.
- When trying to debug accidental inter-test dependencies, it is helpful
to be able to find a minimal subset of tests which exhibits the issue.
However, any change to the set of tests being run will completely
change the test ordering, making it difficult or impossible to reduce
the set of tests being run in any reasonably efficient manner.
Therefore, change the randomization approach to resolve both these
issues.
Generate a random value based on the user-provided RNG seed. Convert
every test case to an integer by hashing a combination of that value
with the test name. Sort the test cases by this integer.
The test names and RNG are platform-independent, so this should be
consistent across platforms. Also, removing one test does not change
the integer value associated with the remaining tests, so they remain in
the same order.
To hash, use the FNV-1a hash, except with the basis being our randomly
selected value rather than the fixed basis set in the algorithm. Cannot
use std::hash, because it is important that the result be
platform-independent.
2020-04-14 12:47:36 +02:00
..
2020-02-24 19:36:34 +01:00
2019-10-04 13:28:43 +02:00
2018-09-03 10:20:58 +02:00
2018-09-03 21:08:27 +02:00
2018-07-23 14:04:43 +02:00
2017-08-09 10:29:05 +01:00
2019-09-08 21:01:33 +02:00
2017-11-13 12:49:13 +01:00
2018-07-23 14:04:43 +02:00
2019-10-13 20:37:07 +02:00
2020-03-19 13:32:45 +01:00
2017-09-07 17:25:15 +02:00
2020-02-15 20:42:57 +01:00
2017-09-07 11:24:33 +01:00
2019-09-08 18:20:49 +02:00
2019-09-08 18:20:49 +02:00
2020-04-10 20:55:23 +02:00
2020-02-01 17:01:50 +01:00
2020-02-01 17:01:50 +01:00
2020-01-25 09:01:04 +01:00
2018-02-01 14:58:33 +00:00
2019-10-07 19:56:23 +02:00
2019-10-20 17:27:09 +02:00
2019-09-06 12:44:06 +02:00
2017-08-29 13:51:55 +02:00
2020-03-28 18:00:42 +01:00
2020-02-15 21:45:09 +01:00
2017-09-07 17:25:15 +02:00
2019-01-13 19:01:12 +01:00
2020-02-03 09:33:42 +01:00
2019-06-14 19:13:50 +02:00
2019-08-09 10:50:53 +02:00
2020-01-25 09:01:04 +01:00
2019-09-08 14:14:46 +02:00
2017-07-06 22:28:42 +02:00
2017-07-06 22:28:42 +02:00
2018-12-18 20:19:39 +01:00
2018-07-12 14:27:06 +02:00
2017-11-14 20:42:58 +01:00
2019-08-06 19:17:16 -05:00
2018-02-23 14:56:07 +01:00
2019-10-28 15:15:13 +01:00
2019-10-26 20:52:09 +02:00
2019-01-31 10:43:15 +01:00
2019-12-15 20:50:43 +01:00
2017-09-07 17:25:15 +02:00
2017-09-07 17:25:15 +02:00
2019-06-06 21:28:56 +02:00
2019-09-08 14:25:23 +02:00
2020-02-01 17:01:50 +01:00
2019-09-08 14:14:46 +02:00
2019-09-08 14:25:23 +02:00
2019-10-27 21:07:21 +01:00
2019-01-31 10:43:06 +01:00
2019-09-08 14:25:23 +02:00
2019-04-04 15:55:46 +01:00
2018-04-07 12:25:03 +02:00
2019-10-19 21:14:06 +02:00
2019-09-08 14:25:23 +02:00
2017-08-30 15:53:39 +02:00
2017-07-27 11:55:30 +02:00
2019-09-08 14:25:23 +02:00
2019-08-06 20:51:19 +02:00
2018-10-18 11:47:21 +02:00
2018-10-18 11:47:21 +02:00
2020-02-08 14:27:40 +01:00
2019-02-08 10:41:23 +01:00
2019-10-13 20:37:07 +02:00
2019-10-13 20:49:36 +02:00
2020-02-03 10:05:23 +01:00
2019-10-13 11:56:50 +02:00
2018-04-04 11:14:19 +02:00
2019-04-10 09:42:11 +02:00
2017-11-13 15:35:31 +01:00
2017-11-13 15:35:31 +01:00
2019-04-20 10:02:17 +02:00
2017-09-07 17:25:15 +02:00
2020-02-01 21:06:07 +01:00
2020-01-25 09:01:04 +01:00
2019-03-06 22:04:35 +01:00
2019-10-28 15:15:13 +01:00
2012-08-16 18:47:41 +01:00
2019-08-07 20:35:27 +02:00
2017-07-27 11:32:01 +02:00
2019-04-10 09:42:11 +02:00
2019-03-02 21:18:48 +01:00
2018-04-22 18:46:54 +02:00
2018-11-17 20:52:18 +01:00
2018-11-17 20:52:18 +01:00
2019-10-18 12:35:09 +02:00
2019-10-07 19:56:23 +02:00
2019-10-17 16:40:37 +02:00
2015-03-04 07:54:35 +00:00
2019-04-04 15:55:46 +01:00
2019-10-27 21:07:21 +01:00
2017-09-07 17:25:15 +02:00
2017-09-07 17:25:15 +02:00
2017-12-09 20:17:47 +01:00
2017-12-09 20:17:47 +01:00
2019-10-07 19:56:23 +02:00
2019-10-07 19:56:23 +02:00
2018-06-25 19:04:29 +01:00
2018-06-25 20:18:41 +01:00
2018-06-25 19:04:29 +01:00
2019-10-27 21:07:21 +01:00
2020-01-25 09:01:04 +01:00
2019-07-06 16:55:10 +02:00
2018-08-19 10:34:44 +02:00
2018-08-19 10:34:44 +02:00
2018-09-03 21:08:27 +02:00
2017-07-13 08:25:47 +01:00
2019-06-06 19:33:37 +02:00
2019-11-04 00:05:35 +01:00
2019-09-07 11:31:00 +02:00
2019-09-07 11:31:00 +02:00
2019-10-25 13:57:52 +02:00
2019-10-25 13:57:52 +02:00
2019-01-25 21:29:12 +01:00
2018-09-03 21:08:27 +02:00
2019-10-27 21:07:21 +01:00
2017-11-07 18:01:10 +00:00
2017-07-27 11:55:30 +02:00
2017-07-27 11:55:30 +02:00
2017-07-27 11:55:30 +02:00
2020-01-31 21:44:06 +01:00
2018-03-02 16:24:35 +01:00
2020-04-14 12:47:36 +02:00
2019-08-06 20:51:19 +02:00
2020-01-25 09:01:04 +01:00
2019-09-09 14:28:11 +02:00
2018-09-03 21:08:27 +02:00
2019-10-27 21:07:21 +01:00
2020-04-12 18:48:52 +02:00
2019-11-05 23:28:47 +01:00
2019-10-19 21:14:06 +02:00
2019-10-19 21:14:06 +02:00
2017-07-20 23:20:42 +01:00
2019-01-11 11:55:51 +01:00
2017-12-08 15:59:00 +00:00
2018-05-09 21:47:42 +02:00
2019-10-27 22:07:10 +01:00
2019-09-08 15:58:10 +02:00
2017-09-07 11:24:33 +01:00
2018-02-09 18:49:36 +01:00
2018-02-08 13:09:02 +01:00
2018-02-02 15:36:15 +01:00
2017-11-21 11:10:07 +01:00
2020-03-19 13:50:19 +01:00
2017-07-20 00:27:28 +02:00
2019-09-09 14:28:11 +02:00
2019-09-09 14:28:11 +02:00
2017-10-11 14:58:20 +01:00
2020-01-24 14:26:22 +01:00
2019-10-29 13:59:18 +01:00