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

Unified Diff: tools/run-tests.py

Issue 1245623005: [test] Key variant flags by variant name everywhere. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test262-es6 Created 5 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 | « test/test262-es6/testcfg.py ('k') | tools/testrunner/local/testsuite.py » ('j') | 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 669a156975993c90924ded4be4916a37c03911b8..2b985fccb3b154b61654a5443a2fee3f64a7035f 100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -44,7 +44,7 @@ import time
from testrunner.local import execution
from testrunner.local import progress
from testrunner.local import testsuite
-from testrunner.local.testsuite import VARIANT_FLAGS
+from testrunner.local.testsuite import ALL_VARIANTS
from testrunner.local import utils
from testrunner.local import verbose
from testrunner.network import network_execution
@@ -332,7 +332,7 @@ def BuildbotToV8Mode(config):
return mode.lower()
def ProcessOptions(options):
- global VARIANT_FLAGS
+ global ALL_VARIANTS
global VARIANTS
# Architecture and mode related stuff.
@@ -423,8 +423,8 @@ def ProcessOptions(options):
VARIANTS = ["stress"]
if options.variants:
VARIANTS = options.variants.split(",")
- if not set(VARIANTS).issubset(VARIANT_FLAGS.keys()):
- print "All variants must be in %s" % str(VARIANT_FLAGS.keys())
+ if not set(VARIANTS).issubset(ALL_VARIANTS.keys()):
+ print "All variants must be in %s" % str(ALL_VARIANTS.keys())
return False
if options.predictable:
VARIANTS = ["default"]
@@ -621,10 +621,11 @@ def Execute(arch, mode, args, options, suites, workspace):
if options.cat:
verbose.PrintTestSource(s.tests)
continue
- variant_flags = [VARIANT_FLAGS[var] for var in VARIANTS]
- variant_tests = [ t.CopyAddingFlags(v)
+ variant_gen = s.CreateVariantGenerator(VARIANTS)
+ variant_tests = [ t.CopyAddingFlags(flags)
for t in s.tests
- for v in s.VariantFlags(t, variant_flags) ]
+ for v in variant_gen.FilterVariantsByTest(t)
+ for flags in variant_gen.GetFlagSets(t, v) ]
if options.random_seed_stress_count > 1:
# Duplicate test for random seed stress mode.
@@ -637,9 +638,9 @@ def Execute(arch, mode, args, options, suites, workspace):
else:
yield ["--random-seed=%d" % RandomSeed()]
s.tests = [
- t.CopyAddingFlags(v)
+ t.CopyAddingFlags(flags)
for t in variant_tests
- for v in iter_seed_flags()
+ for flags in iter_seed_flags()
]
else:
s.tests = variant_tests
« no previous file with comments | « test/test262-es6/testcfg.py ('k') | tools/testrunner/local/testsuite.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698