Index: test/test262/testcfg.py |
diff --git a/test/test262/testcfg.py b/test/test262/testcfg.py |
index c324e281b54764d92e3305aa59af8c3c53b5c11e..b62e9b0d6b4ffbe99ccb95de871713db440c3e30 100644 |
--- a/test/test262/testcfg.py |
+++ b/test/test262/testcfg.py |
@@ -43,6 +43,7 @@ DATA = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data") |
ARCHIVE = DATA + ".tar" |
TEST_262_HARNESS_FILES = ["sta.js", "assert.js"] |
+TEST_262_NATIVE_FILES = ["detachArrayBuffer.js"] |
TEST_262_SUITE_PATH = ["data", "test"] |
TEST_262_HARNESS_PATH = ["data", "harness"] |
@@ -131,7 +132,12 @@ class Test262TestSuite(testsuite.TestSuite): |
self.GetIncludesForTest(testcase) + ["--harmony"] + |
(["--module"] if "module" in self.GetTestRecord(testcase) else []) + |
[os.path.join(self.testroot, testcase.path + ".js")] + |
- (["--throws"] if "negative" in self.GetTestRecord(testcase) else [])) |
+ (["--throws"] if "negative" in self.GetTestRecord(testcase) |
+ else []) + |
+ (["--allow-natives-syntax"] |
+ if "detachArrayBuffer.js" in |
+ self.GetTestRecord(testcase).get("includes", []) |
+ else [])) |
def _VariantGeneratorFactory(self): |
return Test262VariantGenerator |
@@ -159,11 +165,14 @@ class Test262TestSuite(testsuite.TestSuite): |
testcase.path) |
return testcase.test_record |
+ def BasePath(self, filename): |
+ return self.root if filename in TEST_262_NATIVE_FILES else self.harnesspath |
+ |
def GetIncludesForTest(self, testcase): |
test_record = self.GetTestRecord(testcase) |
if "includes" in test_record: |
- includes = [os.path.join(self.harnesspath, f) |
- for f in test_record["includes"]] |
+ return [os.path.join(self.BasePath(filename), filename) |
+ for filename in test_record.get("includes", [])] |
Michael Achenbach
2016/04/21 07:23:49
But you didn't fully add the other simplification
Dan Ehrenberg
2016/04/21 07:29:36
Oh, I misunderstood somehow. I'll do this in a fol
|
else: |
includes = [] |
return includes |