| Index: test/test262-es6/testcfg.py
|
| diff --git a/test/test262-es6/testcfg.py b/test/test262-es6/testcfg.py
|
| index 91491b3907f1c04c5e9d68ff388c8f2fae1f1362..5b257244cd0926579b1e08b84a99f73266ac7b59 100644
|
| --- a/test/test262-es6/testcfg.py
|
| +++ b/test/test262-es6/testcfg.py
|
| @@ -48,6 +48,55 @@ TEST_262_SUITE_PATH = ["data", "test"]
|
| TEST_262_HARNESS_PATH = ["data", "harness"]
|
| TEST_262_TOOLS_PATH = ["data", "tools", "packaging"]
|
|
|
| +ALL_VARIANT_FLAGS_STRICT = dict(
|
| + (v, [flags + ["--use-strict"] for flags in flag_sets])
|
| + for v, flag_sets in testsuite.ALL_VARIANT_FLAGS.iteritems()
|
| +)
|
| +
|
| +FAST_VARIANT_FLAGS_STRICT = dict(
|
| + (v, [flags + ["--use-strict"] for flags in flag_sets])
|
| + for v, flag_sets in testsuite.FAST_VARIANT_FLAGS.iteritems()
|
| +)
|
| +
|
| +ALL_VARIANT_FLAGS_BOTH = dict(
|
| + (v, [flags for flags in testsuite.ALL_VARIANT_FLAGS[v] +
|
| + ALL_VARIANT_FLAGS_STRICT[v]])
|
| + for v in testsuite.ALL_VARIANT_FLAGS
|
| +)
|
| +
|
| +FAST_VARIANT_FLAGS_BOTH = dict(
|
| + (v, [flags for flags in testsuite.FAST_VARIANT_FLAGS[v] +
|
| + FAST_VARIANT_FLAGS_STRICT[v]])
|
| + for v in testsuite.FAST_VARIANT_FLAGS
|
| +)
|
| +
|
| +ALL_VARIANTS = {
|
| + 'nostrict': testsuite.ALL_VARIANT_FLAGS,
|
| + 'strict': ALL_VARIANT_FLAGS_STRICT,
|
| + 'both': ALL_VARIANT_FLAGS_BOTH,
|
| +}
|
| +
|
| +FAST_VARIANTS = {
|
| + 'nostrict': testsuite.FAST_VARIANT_FLAGS,
|
| + 'strict': FAST_VARIANT_FLAGS_STRICT,
|
| + 'both': FAST_VARIANT_FLAGS_BOTH,
|
| +}
|
| +
|
| +class Test262VariantGenerator(testsuite.VariantGenerator):
|
| + def GetFlagSets(self, testcase, variant):
|
| + if testcase.outcomes and statusfile.OnlyFastVariants(testcase.outcomes):
|
| + variant_flags = FAST_VARIANTS
|
| + else:
|
| + variant_flags = ALL_VARIANTS
|
| +
|
| + test_record = self.suite.GetTestRecord(testcase)
|
| + if "noStrict" in test_record:
|
| + return variant_flags["nostrict"][variant]
|
| + if "onlyStrict" in test_record:
|
| + return variant_flags["strict"][variant]
|
| + return variant_flags["both"][variant]
|
| +
|
| +
|
| class Test262TestSuite(testsuite.TestSuite):
|
|
|
| def __init__(self, name, root):
|
| @@ -81,15 +130,8 @@ class Test262TestSuite(testsuite.TestSuite):
|
| self.GetIncludesForTest(testcase) + ["--harmony"] +
|
| [os.path.join(self.testroot, testcase.path + ".js")])
|
|
|
| - def VariantFlags(self, testcase, default_flags):
|
| - flags = super(Test262TestSuite, self).VariantFlags(testcase, default_flags)
|
| - test_record = self.GetTestRecord(testcase)
|
| - if "noStrict" in test_record:
|
| - return flags
|
| - strict_flags = [f + ["--use-strict"] for f in flags]
|
| - if "onlyStrict" in test_record:
|
| - return strict_flags
|
| - return flags + strict_flags
|
| + def _VariantGeneratorFactory(self):
|
| + return Test262VariantGenerator
|
|
|
| def LoadParseTestRecord(self):
|
| if not self.ParseTestRecord:
|
|
|