Chromium Code Reviews| 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", |
|
Michael Achenbach
2015/01/28 14:10:05
Use debug as status mode as release with slow asse
|
| + "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: |