+ if (cli_option_is_set('shuffle-tests')) {
+
+ # Shuffle both the test sections and
+ # the tests they contain.
+ #
+ # XXX: With the current data layout, shuffling tests
+ # from different sections isn't possible.
+ # Is this worth changing the layout?
+ fisher_yates_shuffle(\@regression_tests);
+ for (my $s = 0; $s < @regression_tests; $s++) {
+ fisher_yates_shuffle($regression_tests[$s]);
+ }
+ }
+