OLD | NEW |
---|---|
1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 relpath = fullpath[len(self.testroot) + 1 : -3] | 124 relpath = fullpath[len(self.testroot) + 1 : -3] |
125 testname = relpath.replace(os.path.sep, "/") | 125 testname = relpath.replace(os.path.sep, "/") |
126 case = testcase.TestCase(self, testname) | 126 case = testcase.TestCase(self, testname) |
127 tests.append(case) | 127 tests.append(case) |
128 return tests | 128 return tests |
129 | 129 |
130 def GetFlagsForTestCase(self, testcase, context): | 130 def GetFlagsForTestCase(self, testcase, context): |
131 return (testcase.flags + context.mode_flags + self.harness + | 131 return (testcase.flags + context.mode_flags + self.harness + |
132 self.GetIncludesForTest(testcase) + ["--harmony"] + | 132 self.GetIncludesForTest(testcase) + ["--harmony"] + |
133 (["--module"] if "module" in self.GetTestRecord(testcase) else []) + | 133 (["--module"] if "module" in self.GetTestRecord(testcase) else []) + |
134 ["--icu_case_mapping"] + | |
Dan Ehrenberg
2016/04/25 21:10:11
We usually don't add flags this way. Instead, we w
| |
134 [os.path.join(self.testroot, testcase.path + ".js")] + | 135 [os.path.join(self.testroot, testcase.path + ".js")] + |
135 (["--throws"] if "negative" in self.GetTestRecord(testcase) | 136 (["--throws"] if "negative" in self.GetTestRecord(testcase) |
136 else []) + | 137 else []) + |
137 (["--allow-natives-syntax"] | 138 (["--allow-natives-syntax"] |
138 if "detachArrayBuffer.js" in | 139 if "detachArrayBuffer.js" in |
139 self.GetTestRecord(testcase).get("includes", []) | 140 self.GetTestRecord(testcase).get("includes", []) |
140 else [])) | 141 else [])) |
141 | 142 |
142 def _VariantGeneratorFactory(self): | 143 def _VariantGeneratorFactory(self): |
143 return Test262VariantGenerator | 144 return Test262VariantGenerator |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
224 # data folder. | 225 # data folder. |
225 if os.path.exists(ARCHIVE) and not os.path.exists(DATA): | 226 if os.path.exists(ARCHIVE) and not os.path.exists(DATA): |
226 print "Extracting archive..." | 227 print "Extracting archive..." |
227 tar = tarfile.open(ARCHIVE) | 228 tar = tarfile.open(ARCHIVE) |
228 tar.extractall(path=os.path.dirname(ARCHIVE)) | 229 tar.extractall(path=os.path.dirname(ARCHIVE)) |
229 tar.close() | 230 tar.close() |
230 | 231 |
231 | 232 |
232 def GetSuite(name, root): | 233 def GetSuite(name, root): |
233 return Test262TestSuite(name, root) | 234 return Test262TestSuite(name, root) |
OLD | NEW |