File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,23 @@ BASELINES=$ROOT/test/image/baselines
7
7
TEST_IMAGES=$ROOT /build/test_images
8
8
DIFF_IMAGES=$ROOT /build/test_images_diff
9
9
10
+ # Deterministic shuffling (https://www.gnu.org/software/coreutils/manual/html_node/Random-sources.html)
11
+ get_seeded_random ()
12
+ {
13
+ seed=" $1 "
14
+ openssl enc -aes-256-ctr -pass pass:" $seed " -nosalt \
15
+ < /dev/zero 2> /dev/null
16
+ }
17
+
18
+ deterministic_shuffle ()
19
+ {
20
+ shuf --random-source=<( get_seeded_random " 0" )
21
+ }
22
+
10
23
echo " Generating test images"
11
24
ls $MOCKS /* .json | awk ' !/mapbox/' | \
12
25
# Shuffle to distribute randomly slow and fast mocks
13
- shuf | \
26
+ deterministic_shuffle | \
14
27
# head -n 10 | \
15
28
# Split in chunks of 20
16
29
xargs -P1 -n20 xvfb-run -a orca graph --verbose --output-dir $TEST_IMAGES
You can’t perform that action at this time.
0 commit comments