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

Unified Diff: tools/run-tests.py

Issue 2196223002: [test] Add testing variant aliases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review Created 4 years, 5 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 b9f40be0d89c1d5bbd60cb3fc1ab20b0c7d3e7af..8d0de2b53a13c63b5343d975eed1945b9b392dfe 100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -114,12 +114,23 @@ TIMEOUT_DEFAULT = 60
VARIANTS = ["default", "stress", "turbofan"]
-EXHAUSTIVE_VARIANTS = VARIANTS + [
+MORE_VARIANTS = [
"ignition",
"nocrankshaft",
"turbofan_opt",
]
+EXHAUSTIVE_VARIANTS = VARIANTS + MORE_VARIANTS
+
+VARIANT_ALIASES = {
+ # The default for developer workstations.
+ "dev": VARIANTS,
+ # Additional variants, run on all bots.
+ "more": MORE_VARIANTS,
+ # Additional variants, run on a subset of bots.
+ "extra": [],
+}
+
DEBUG_FLAGS = ["--nohard-abort", "--nodead-code-elimination",
"--nofold-constants", "--enable-slow-asserts",
"--debug-code", "--verify-heap"]
@@ -438,8 +449,6 @@ def SetupEnvironment(options):
])
def ProcessOptions(options):
- global ALL_VARIANTS
- global EXHAUSTIVE_VARIANTS
global VARIANTS
# First try to auto-detect configurations based on the build if GN was
@@ -520,6 +529,8 @@ def ProcessOptions(options):
# Other options for manipulating variants still apply afterwards.
VARIANTS = EXHAUSTIVE_VARIANTS
+ # TODO(machenbach): Figure out how to test a bigger subset of variants on
+ # msan and tsan.
if options.msan:
VARIANTS = ["default"]
@@ -546,6 +557,8 @@ def ProcessOptions(options):
options.slow_tests = "skip"
options.pass_fail_tests = "skip"
if options.no_stress:
+ # FIXME(machenbach): This is not very intuitive anymore. Maybe remove a
+ # bunch of these shortcuts and require stating the variants explicitly.
VARIANTS = ["default", "nocrankshaft"]
if options.no_variants:
VARIANTS = ["default"]
@@ -553,6 +566,14 @@ def ProcessOptions(options):
VARIANTS = ["stress"]
if options.variants:
VARIANTS = options.variants.split(",")
+
+ # Resolve variant aliases.
+ VARIANTS = reduce(
+ list.__add__,
+ (VARIANT_ALIASES.get(v, [v]) for v in VARIANTS),
+ [],
+ )
+
if not set(VARIANTS).issubset(ALL_VARIANTS):
print "All variants must be in %s" % str(ALL_VARIANTS)
return False
@@ -562,6 +583,9 @@ def ProcessOptions(options):
options.extra_flags.append("--verify_predictable")
options.extra_flags.append("--no-inline-new")
+ # Dedupe.
+ VARIANTS = list(set(VARIANTS))
+
if not options.shell_dir:
if options.shell:
print "Warning: --shell is deprecated, use --shell-dir instead."
« 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