Make it possible to run a test only in the standard variant.

Use this for mjsunit/unicode-case-overoptimization, which is not
related to Crankshaft at all and takes ages.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/27704002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0a2b4ecd
...@@ -172,7 +172,7 @@ class BenchmarksTestSuite(testsuite.TestSuite): ...@@ -172,7 +172,7 @@ class BenchmarksTestSuite(testsuite.TestSuite):
os.chdir(old_cwd) os.chdir(old_cwd)
def VariantFlags(self): def VariantFlags(self, testcase, default_flags):
# Both --nocrankshaft and --stressopt are very slow. # Both --nocrankshaft and --stressopt are very slow.
return [[]] return [[]]
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
'array-constructor': [PASS, TIMEOUT], 'array-constructor': [PASS, TIMEOUT],
# Very slow on ARM and MIPS, contains no architecture dependent code. # Very slow on ARM and MIPS, contains no architecture dependent code.
'unicode-case-overoptimization': [PASS, ['arch == arm or arch == android_arm or arch == mipsel', TIMEOUT]], 'unicode-case-overoptimization': [PASS, NO_VARIANTS, ['arch == arm or arch == android_arm or arch == mipsel', TIMEOUT]],
############################################################################## ##############################################################################
# This test expects to reach a certain recursion depth, which may not work # This test expects to reach a certain recursion depth, which may not work
......
...@@ -112,7 +112,7 @@ class PreparserTestSuite(testsuite.TestSuite): ...@@ -112,7 +112,7 @@ class PreparserTestSuite(testsuite.TestSuite):
with open(testcase.flags[0]) as f: with open(testcase.flags[0]) as f:
return f.read() return f.read()
def VariantFlags(self): def VariantFlags(self, testcase, default_flags):
return [[]]; return [[]];
......
...@@ -332,8 +332,9 @@ def Execute(arch, mode, args, options, suites, workspace): ...@@ -332,8 +332,9 @@ def Execute(arch, mode, args, options, suites, workspace):
if options.cat: if options.cat:
verbose.PrintTestSource(s.tests) verbose.PrintTestSource(s.tests)
continue continue
variant_flags = s.VariantFlags() or VARIANT_FLAGS s.tests = [ t.CopyAddingFlags(v)
s.tests = [ t.CopyAddingFlags(v) for t in s.tests for v in variant_flags ] for t in s.tests
for v in s.VariantFlags(t, VARIANT_FLAGS) ]
s.tests = ShardTests(s.tests, options.shard_count, options.shard_run) s.tests = ShardTests(s.tests, options.shard_count, options.shard_run)
num_tests += len(s.tests) num_tests += len(s.tests)
for t in s.tests: for t in s.tests:
......
...@@ -35,6 +35,7 @@ TIMEOUT = "TIMEOUT" ...@@ -35,6 +35,7 @@ TIMEOUT = "TIMEOUT"
CRASH = "CRASH" CRASH = "CRASH"
SLOW = "SLOW" SLOW = "SLOW"
FLAKY = "FLAKY" FLAKY = "FLAKY"
NO_VARIANTS = "NO_VARIANTS"
# These are just for the status files and are mapped below in DEFS: # These are just for the status files and are mapped below in DEFS:
FAIL_OK = "FAIL_OK" FAIL_OK = "FAIL_OK"
PASS_OR_FAIL = "PASS_OR_FAIL" PASS_OR_FAIL = "PASS_OR_FAIL"
...@@ -43,7 +44,7 @@ ALWAYS = "ALWAYS" ...@@ -43,7 +44,7 @@ ALWAYS = "ALWAYS"
KEYWORDS = {} KEYWORDS = {}
for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FLAKY, FAIL_OK, for key in [SKIP, FAIL, PASS, OKAY, TIMEOUT, CRASH, SLOW, FLAKY, FAIL_OK,
PASS_OR_FAIL, ALWAYS]: NO_VARIANTS, PASS_OR_FAIL, ALWAYS]:
KEYWORDS[key] = key KEYWORDS[key] = key
DEFS = {FAIL_OK: [FAIL, OKAY], DEFS = {FAIL_OK: [FAIL, OKAY],
...@@ -60,6 +61,10 @@ def DoSkip(outcomes): ...@@ -60,6 +61,10 @@ def DoSkip(outcomes):
return SKIP in outcomes or SLOW in outcomes return SKIP in outcomes or SLOW in outcomes
def OnlyStandardVariant(outcomes):
return NO_VARIANTS in outcomes
def IsFlaky(outcomes): def IsFlaky(outcomes):
return FLAKY in outcomes return FLAKY in outcomes
......
...@@ -74,8 +74,10 @@ class TestSuite(object): ...@@ -74,8 +74,10 @@ class TestSuite(object):
def ListTests(self, context): def ListTests(self, context):
raise NotImplementedError raise NotImplementedError
def VariantFlags(self): def VariantFlags(self, testcase, default_flags):
return None if testcase.outcomes and statusfile.OnlyStandardVariant(testcase.outcomes):
return [[]]
return default_flags
def DownloadData(self): def DownloadData(self):
pass pass
......
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