Add random_seed parameter to run-deopt-fuzzer.

R=machenbach@chromium.org

Review URL: https://codereview.chromium.org/226843003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
bmeurer@chromium.org 2014-04-10 10:43:13 +00:00
parent 453d6fc285
commit 546d0a0b70

View File

@ -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 = {