Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: tools/sharding_supervisor/sharding_supervisor.py

Issue 7461103: Random seed generator for sharding_supervisor (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed a debugging line Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/sharding_supervisor/sharding_supervisor.py
diff --git a/tools/sharding_supervisor/sharding_supervisor.py b/tools/sharding_supervisor/sharding_supervisor.py
index 5ad9f71381f2191fe04f52fdad3e81f04fc7f8db..f25026fd15e60554ec49dac007467f5535ae3039 100755
--- a/tools/sharding_supervisor/sharding_supervisor.py
+++ b/tools/sharding_supervisor/sharding_supervisor.py
@@ -19,6 +19,7 @@ import optparse
import os
import pty
import Queue
+import random
import re
import subprocess
import sys
@@ -292,6 +293,8 @@ def main():
"--reorder", action="store_true",
help="ensure that all output from an earlier shard is printed before"
" output from a later shard")
+ parser.add_option("--random-seed", action="store_true",
+ help="shuffle the tests with a random seed value")
parser.disable_interspersed_args()
(options, args) = parser.parse_args()
@@ -313,6 +316,10 @@ def main():
gtest_args = ["--gtest_color=%s" % {
True: "yes", False: "no"}[options.color]] + args[1:]
+ if options.random_seed:
+ seed = random.randint(1, 99999)
+ gtest_args.extend(["--gtest_shuffle", "--gtest_random_seed=%i" % seed])
+
if options.runshard != None:
# run a single shard and exit
if (options.runshard < 0 or options.runshard >= num_shards):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698