Commit 436fe567 authored by Michal Majewski's avatar Michal Majewski Committed by Commit Bot

[test] Search for use-strict in variant flags only.

Making test262's GetExpectedOutcomes independent from a command.
It will enable us to move this function to precompute phase.

Bug: v8:6917
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: Ibb59da29bd30f32427ba6230a22d7d0801954bf0
Reviewed-on: https://chromium-review.googlesource.com/828933Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michał Majewski <majeski@google.com>
Cr-Commit-Position: refs/heads/master@{#50127}
parent f542ba57
...@@ -214,8 +214,7 @@ class TestSuite(testsuite.TestSuite): ...@@ -214,8 +214,7 @@ class TestSuite(testsuite.TestSuite):
def GetExpectedOutcomes(self, test): def GetExpectedOutcomes(self, test):
outcomes = self.GetStatusFileOutcomes(test.name, test.variant) outcomes = self.GetStatusFileOutcomes(test.name, test.variant)
if (statusfile.FAIL_SLOPPY in outcomes and if (statusfile.FAIL_SLOPPY in outcomes and not test.uses_strict()):
'--use-strict' not in test.cmd.args):
return [statusfile.FAIL] return [statusfile.FAIL]
return super(TestSuite, self).GetExpectedOutcomes(test) return super(TestSuite, self).GetExpectedOutcomes(test)
...@@ -276,6 +275,9 @@ class TestCase(testcase.TestCase): ...@@ -276,6 +275,9 @@ class TestCase(testcase.TestCase):
return path return path
return os.path.join(self.suite.testroot, filename) return os.path.join(self.suite.testroot, filename)
def uses_strict(self):
return '--use-strict' in self.variant_flags
def GetSuite(name, root): def GetSuite(name, root):
return TestSuite(name, root) return TestSuite(name, root)
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