Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Unified Diff: test/test262/testcfg.py

Issue 1897203003: Detach ArrayBuffer in test262 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Refactoring Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/test262/detachArrayBuffer.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « test/test262/detachArrayBuffer.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698