Commit 05047108 authored by machenbach's avatar machenbach Committed by Commit bot

[test] Rework how default timeout is handled.

The slow_archs list had only an effect when no timeout was
passed. Now it will also increase the timeout on the bots.

Also simplified the code a bit.

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

Cr-Commit-Position: refs/heads/master@{#35355}
parent 77f3c5ef
......@@ -337,7 +337,7 @@ def BuildOptions():
result.add_option("--time", help="Print timing information after running",
default=False, action="store_true")
result.add_option("-t", "--timeout", help="Timeout in seconds",
default= -1, type="int")
default=TIMEOUT_DEFAULT, type="int")
result.add_option("--tsan",
help="Regard test expectations for TSAN",
default=False, action="store_true")
......@@ -665,19 +665,16 @@ def Execute(arch, mode, args, options, suites):
# Populate context object.
mode_flags = MODES[mode]["flags"]
timeout = options.timeout
if timeout == -1:
# Simulators are slow, therefore allow a longer default timeout.
if arch in SLOW_ARCHS:
timeout = 2 * TIMEOUT_DEFAULT;
else:
timeout = TIMEOUT_DEFAULT;
timeout *= MODES[mode]["timeout_scalefactor"]
# Simulators are slow, therefore allow a longer timeout.
if arch in SLOW_ARCHS:
options.timeout *= 2
options.timeout *= MODES[mode]["timeout_scalefactor"]
if options.predictable:
# Predictable mode is slower.
timeout *= 2
options.timeout *= 2
# TODO(machenbach): Remove temporary verbose output on windows after
# debugging driver-hung-up on XP.
......@@ -687,7 +684,8 @@ def Execute(arch, mode, args, options, suites):
)
ctx = context.Context(arch, MODES[mode]["execution_mode"], shell_dir,
mode_flags, verbose_output,
timeout, options.isolates,
options.timeout,
options.isolates,
options.command_prefix,
options.extra_flags,
options.no_i18n,
......
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