Reviewers: Jakob, jochen (slow),
Message:
PTAL
https://codereview.chromium.org/882983002/diff/1/tools/run-tests.py
File tools/run-tests.py (right):
https://codereview.chromium.org/882983002/diff/1/tools/run-tests.py#newcode119
tools/run-tests.py:119: "status_mode": "debug",
Use debug as status mode as release with slow asserts requires most of
the skip/slow configurations like tests in debug where slow asserts are
enabled by default.
Description:
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.
Please review this at https://codereview.chromium.org/882983002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+51, -19 lines):
M tools/run-tests.py
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index
21a2c3b4ffe5ffa96bb11711275ce39e43ddbaee..afc9d83fa3c769cef91ad1c1575ec4199bb54d4c
100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -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",
- "--nofold-constants", "--enable-slow-asserts",
- "--debug-code", "--verify-heap"],
- "release" : ["--nohard-abort", "--nodead-code-elimination",
- "--nofold-constants"]}
+DEBUG_FLAGS = ["--nohard-abort", "--nodead-code-elimination",
+ "--nofold-constants", "--enable-slow-asserts",
+ "--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:
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.