| 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):
|
|
|