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