[webkit-reviews] review granted: [Bug 16869] run-webkit-tests should have a --random switch to run tests in random order : [Attachment 18439] Use a perl 5.8.0 function to shuffle the tests array

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 14 10:00:04 PST 2008


Darin Adler <darin at apple.com> has granted Holger Freyther
<freyther at handhelds.org>'s request for review:
Bug 16869: run-webkit-tests should have a --random switch to run tests in
random order
http://bugs.webkit.org/show_bug.cgi?id=16869

Attachment 18439: Use a perl 5.8.0  function to shuffle the tests array
http://bugs.webkit.org/attachment.cgi?id=18439&action=edit

------- Additional Comments from Darin Adler <darin at apple.com>
r=me

+    'random' => sub { $randomizeTests = 1; },

Why not just => \$randomizeTests? Is there a reason for this one option to be
different than the others? Also, could you preserve the alphabetical order by
putting this before "root"?

+if ($randomizeTests == 1) {
+    @tests = shuffle(@tests);
+}

I'd write in more-idiomatic perl as:

    @tests = shuffle(@tests) if $randomizeTests;


More information about the webkit-reviews mailing list