Index: tools/run-deopt-fuzzer.py |
diff --git a/tools/run-deopt-fuzzer.py b/tools/run-deopt-fuzzer.py |
index a6cb1f06ecff3bdc4d6f2797e064ed9370207bda..21894ff520997389a3d3ff4f7740136f091d2329 100755 |
--- a/tools/run-deopt-fuzzer.py |
+++ b/tools/run-deopt-fuzzer.py |
@@ -213,6 +213,8 @@ def BuildOptions(): |
default= -1, type="int") |
result.add_option("-v", "--verbose", help="Verbose output", |
default=False, action="store_true") |
+ result.add_option("--random-seed", default=0, dest="random_seed", |
+ help="Default seed for initializing random generator") |
return result |
@@ -242,6 +244,8 @@ def ProcessOptions(options): |
options.extra_flags = shlex.split(options.extra_flags) |
if options.j == 0: |
options.j = multiprocessing.cpu_count() |
+ while options.random_seed == 0: |
+ options.random_seed = random.SystemRandom().randint(-2147483648, 2147483647) |
if not options.distribution_mode in DISTRIBUTION_MODES: |
print "Unknown distribution mode %s" % options.distribution_mode |
return False |
@@ -362,7 +366,8 @@ def Execute(arch, mode, args, options, suites, workspace): |
timeout, options.isolates, |
options.command_prefix, |
options.extra_flags, |
- False) |
+ False, |
+ options.random_seed) |
# Find available test suites and read test cases from them. |
variables = { |