| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 tests = [] | 112 tests = [] |
| 113 for dirname, dirs, files in os.walk(self.testroot): | 113 for dirname, dirs, files in os.walk(self.testroot): |
| 114 for dotted in [x for x in dirs if x.startswith(".")]: | 114 for dotted in [x for x in dirs if x.startswith(".")]: |
| 115 dirs.remove(dotted) | 115 dirs.remove(dotted) |
| 116 if context.noi18n and "intl402" in dirs: | 116 if context.noi18n and "intl402" in dirs: |
| 117 dirs.remove("intl402") | 117 dirs.remove("intl402") |
| 118 dirs.sort() | 118 dirs.sort() |
| 119 files.sort() | 119 files.sort() |
| 120 for filename in files: | 120 for filename in files: |
| 121 if filename.endswith(".js"): | 121 if filename.endswith(".js"): |
| 122 testname = os.path.join(dirname[len(self.testroot) + 1:], | 122 fullpath = os.path.join(dirname, filename) |
| 123 filename[:-3]) | 123 relpath = fullpath[len(self.testroot) + 1 : -3] |
| 124 testname = relpath.replace(os.path.sep, "/") |
| 124 case = testcase.TestCase(self, testname) | 125 case = testcase.TestCase(self, testname) |
| 125 tests.append(case) | 126 tests.append(case) |
| 126 return tests | 127 return tests |
| 127 | 128 |
| 128 def GetFlagsForTestCase(self, testcase, context): | 129 def GetFlagsForTestCase(self, testcase, context): |
| 129 return (testcase.flags + context.mode_flags + self.harness + | 130 return (testcase.flags + context.mode_flags + self.harness + |
| 130 self.GetIncludesForTest(testcase) + ["--harmony"] + | 131 self.GetIncludesForTest(testcase) + ["--harmony"] + |
| 131 [os.path.join(self.testroot, testcase.path + ".js")]) | 132 [os.path.join(self.testroot, testcase.path + ".js")]) |
| 132 | 133 |
| 133 def _VariantGeneratorFactory(self): | 134 def _VariantGeneratorFactory(self): |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 # Magic incantation to allow longer path names on Windows. | 227 # Magic incantation to allow longer path names on Windows. |
| 227 archive.extractall(u"\\\\?\\%s" % self.root) | 228 archive.extractall(u"\\\\?\\%s" % self.root) |
| 228 else: | 229 else: |
| 229 archive.extractall(self.root) | 230 archive.extractall(self.root) |
| 230 os.rename(os.path.join(self.root, "tc39-test262-%s" % revision), | 231 os.rename(os.path.join(self.root, "tc39-test262-%s" % revision), |
| 231 directory_name) | 232 directory_name) |
| 232 | 233 |
| 233 | 234 |
| 234 def GetSuite(name, root): | 235 def GetSuite(name, root): |
| 235 return Test262TestSuite(name, root) | 236 return Test262TestSuite(name, root) |
| OLD | NEW |