From 1b4c25e0b7bc7e91985aba086252b81db75dac7a Mon Sep 17 00:00:00 2001 From: "machenbach@chromium.org" Date: Wed, 5 Nov 2014 13:05:28 +0000 Subject: [PATCH] Fix fast-variants feature in test driver. BUG= R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/701933003 Cr-Commit-Position: refs/heads/master@{#25150} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- tools/run-tests.py | 8 +------- tools/testrunner/local/testsuite.py | 13 ++++++++++++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/run-tests.py b/tools/run-tests.py index dc73a40..20f3679 100755 --- a/tools/run-tests.py +++ b/tools/run-tests.py @@ -44,6 +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 import utils from testrunner.local import verbose from testrunner.network import network_execution @@ -83,13 +84,6 @@ TIMEOUT_DEFAULT = 60 TIMEOUT_SCALEFACTOR = {"debug" : 4, "release" : 1 } -# Use this to run several variants of the tests. -VARIANT_FLAGS = { - "default": [], - "stress": ["--stress-opt", "--always-opt"], - "turbofan": ["--turbo-asm", "--turbo-filter=*", "--always-opt"], - "nocrankshaft": ["--nocrankshaft"]} - VARIANTS = ["default", "stress", "turbofan", "nocrankshaft"] MODE_FLAGS = { diff --git a/tools/testrunner/local/testsuite.py b/tools/testrunner/local/testsuite.py index 24161f3..6ff97b3 100644 --- a/tools/testrunner/local/testsuite.py +++ b/tools/testrunner/local/testsuite.py @@ -34,6 +34,17 @@ from . import statusfile from . import utils from ..objects import testcase +# Use this to run several variants of the tests. +VARIANT_FLAGS = { + "default": [], + "stress": ["--stress-opt", "--always-opt"], + "turbofan": ["--turbo-asm", "--turbo-filter=*", "--always-opt"], + "nocrankshaft": ["--nocrankshaft"]} + +FAST_VARIANT_FLAGS = [ + f for v, f in VARIANT_FLAGS.iteritems() if v in ["default", "turbofan"] +] + class TestSuite(object): @staticmethod @@ -82,7 +93,7 @@ class TestSuite(object): if testcase.outcomes and statusfile.OnlyStandardVariant(testcase.outcomes): return [[]] if testcase.outcomes and statusfile.OnlyFastVariants(testcase.outcomes): - return filter(lambda v: v in ["default", "turbofan"], default_flags) + return filter(lambda flags: flags in FAST_VARIANT_FLAGS, default_flags) return default_flags def DownloadData(self): -- 2.7.4