Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Unified Diff: tools/run-tests.py

Issue 1866953002: [test] Rework how default timeout is handled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index 96dd199ab15e846968b7674a33733852f6e27216..3336c64b6e124310ad9d3e6b8f3823d488e46c3f 100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698