Commit 546d0a0b authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

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
parent 453d6fc2
......@@ -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 = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment