Add try release mode to test runner.
Also refactor the configuration of modes to have the level of abstraction in one json dict. In a follow up CL, the new mode could be added to quickcheck and release trybots. Review URL: https://codereview.chromium.org/882983002 Cr-Commit-Position: refs/heads/master@{#26322}
This commit is contained in:
parent
df5b2ee334
commit
7a8d0c02a5
@ -81,17 +81,46 @@ TEST_MAP = {
|
||||
}
|
||||
|
||||
TIMEOUT_DEFAULT = 60
|
||||
TIMEOUT_SCALEFACTOR = {"debug" : 4,
|
||||
"release" : 1 }
|
||||
|
||||
VARIANTS = ["default", "stress", "turbofan", "nocrankshaft"]
|
||||
|
||||
MODE_FLAGS = {
|
||||
"debug" : ["--nohard-abort", "--nodead-code-elimination",
|
||||
DEBUG_FLAGS = ["--nohard-abort", "--nodead-code-elimination",
|
||||
"--nofold-constants", "--enable-slow-asserts",
|
||||
"--debug-code", "--verify-heap"],
|
||||
"release" : ["--nohard-abort", "--nodead-code-elimination",
|
||||
"--nofold-constants"]}
|
||||
"--debug-code", "--verify-heap"]
|
||||
RELEASE_FLAGS = ["--nohard-abort", "--nodead-code-elimination",
|
||||
"--nofold-constants"]
|
||||
|
||||
MODES = {
|
||||
"debug": {
|
||||
"flags": DEBUG_FLAGS,
|
||||
"timeout_scalefactor": 4,
|
||||
"status_mode": "debug",
|
||||
"execution_mode": "debug",
|
||||
"output_folder": "debug",
|
||||
},
|
||||
"optdebug": {
|
||||
"flags": DEBUG_FLAGS,
|
||||
"timeout_scalefactor": 4,
|
||||
"status_mode": "debug",
|
||||
"execution_mode": "debug",
|
||||
"output_folder": "optdebug",
|
||||
},
|
||||
"release": {
|
||||
"flags": RELEASE_FLAGS,
|
||||
"timeout_scalefactor": 1,
|
||||
"status_mode": "release",
|
||||
"execution_mode": "release",
|
||||
"output_folder": "release",
|
||||
},
|
||||
# This mode requires v8 to be compiled with dchecks and slow dchecks.
|
||||
"tryrelease": {
|
||||
"flags": RELEASE_FLAGS + ["--enable-slow-asserts"],
|
||||
"timeout_scalefactor": 2,
|
||||
"status_mode": "debug",
|
||||
"execution_mode": "release",
|
||||
"output_folder": "release",
|
||||
},
|
||||
}
|
||||
|
||||
GC_STRESS_FLAGS = ["--gc-interval=500", "--stress-compaction",
|
||||
"--concurrent-recompilation-queue-length=64",
|
||||
@ -277,7 +306,7 @@ def ProcessOptions(options):
|
||||
options.mode = ",".join([tokens[1] for tokens in options.arch_and_mode])
|
||||
options.mode = options.mode.split(",")
|
||||
for mode in options.mode:
|
||||
if not mode.lower() in ["debug", "release", "optdebug"]:
|
||||
if not mode.lower() in MODES:
|
||||
print "Unknown mode %s" % mode
|
||||
return False
|
||||
if options.arch in ["auto", "native"]:
|
||||
@ -459,18 +488,20 @@ def Execute(arch, mode, args, options, suites, workspace):
|
||||
shell_dir = options.shell_dir
|
||||
if not shell_dir:
|
||||
if options.buildbot:
|
||||
# TODO(machenbach): Get rid of different output folder location on
|
||||
# buildbot. Currently this is capitalized Release and Debug.
|
||||
shell_dir = os.path.join(workspace, options.outdir, mode)
|
||||
mode = mode.lower()
|
||||
else:
|
||||
shell_dir = os.path.join(workspace, options.outdir,
|
||||
"%s.%s" % (arch, mode))
|
||||
shell_dir = os.path.join(
|
||||
workspace,
|
||||
options.outdir,
|
||||
"%s.%s" % (arch, MODES[mode]["output_folder"]),
|
||||
)
|
||||
shell_dir = os.path.relpath(shell_dir)
|
||||
|
||||
if mode == "optdebug":
|
||||
mode = "debug" # "optdebug" is just an alias.
|
||||
|
||||
# Populate context object.
|
||||
mode_flags = MODE_FLAGS[mode]
|
||||
mode_flags = MODES[mode]["flags"]
|
||||
timeout = options.timeout
|
||||
if timeout == -1:
|
||||
# Simulators are slow, therefore allow a longer default timeout.
|
||||
@ -479,13 +510,13 @@ def Execute(arch, mode, args, options, suites, workspace):
|
||||
else:
|
||||
timeout = TIMEOUT_DEFAULT;
|
||||
|
||||
timeout *= TIMEOUT_SCALEFACTOR[mode]
|
||||
timeout *= MODES[mode]["timeout_scalefactor"]
|
||||
|
||||
if options.predictable:
|
||||
# Predictable mode is slower.
|
||||
timeout *= 2
|
||||
|
||||
ctx = context.Context(arch, mode, shell_dir,
|
||||
ctx = context.Context(arch, MODES[mode]["execution_mode"], shell_dir,
|
||||
mode_flags, options.verbose,
|
||||
timeout, options.isolates,
|
||||
options.command_prefix,
|
||||
@ -509,7 +540,7 @@ def Execute(arch, mode, args, options, suites, workspace):
|
||||
"deopt_fuzzer": False,
|
||||
"gc_stress": options.gc_stress,
|
||||
"isolates": options.isolates,
|
||||
"mode": mode,
|
||||
"mode": MODES[mode]["status_mode"],
|
||||
"no_i18n": options.no_i18n,
|
||||
"no_snap": options.no_snap,
|
||||
"simulator_run": simulator_run,
|
||||
@ -561,7 +592,8 @@ def Execute(arch, mode, args, options, suites, workspace):
|
||||
progress_indicator, options.junitout, options.junittestsuite)
|
||||
if options.json_test_results:
|
||||
progress_indicator = progress.JsonTestProgressIndicator(
|
||||
progress_indicator, options.json_test_results, arch, mode)
|
||||
progress_indicator, options.json_test_results, arch,
|
||||
MODES[mode]["execution_mode"])
|
||||
|
||||
run_networked = not options.no_network
|
||||
if not run_networked:
|
||||
|
Loading…
Reference in New Issue
Block a user