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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 tests = [] | 59 tests = [] |
60 for dirname, dirs, files in os.walk(self.testroot): | 60 for dirname, dirs, files in os.walk(self.testroot): |
61 for dotted in [x for x in dirs if x.startswith(".")]: | 61 for dotted in [x for x in dirs if x.startswith(".")]: |
62 dirs.remove(dotted) | 62 dirs.remove(dotted) |
63 if context.noi18n and "intl402" in dirs: | 63 if context.noi18n and "intl402" in dirs: |
64 dirs.remove("intl402") | 64 dirs.remove("intl402") |
65 dirs.sort() | 65 dirs.sort() |
66 files.sort() | 66 files.sort() |
67 for filename in files: | 67 for filename in files: |
68 if filename.endswith(".js"): | 68 if filename.endswith(".js"): |
69 testname = os.path.join(dirname[len(self.testroot) + 1:], | 69 fullpath = os.path.join(dirname, filename) |
70 filename[:-3]) | 70 relpath = fullpath[len(self.testroot) + 1 : -3] |
| 71 testname = relpath.replace(os.path.sep, "/") |
71 case = testcase.TestCase(self, testname) | 72 case = testcase.TestCase(self, testname) |
72 tests.append(case) | 73 tests.append(case) |
73 return tests | 74 return tests |
74 | 75 |
75 def GetFlagsForTestCase(self, testcase, context): | 76 def GetFlagsForTestCase(self, testcase, context): |
76 return (testcase.flags + context.mode_flags + self.harness + | 77 return (testcase.flags + context.mode_flags + self.harness + |
77 [os.path.join(self.testroot, testcase.path + ".js")]) | 78 [os.path.join(self.testroot, testcase.path + ".js")]) |
78 | 79 |
79 def GetSourceForTest(self, testcase): | 80 def GetSourceForTest(self, testcase): |
80 filename = os.path.join(self.testroot, testcase.path + ".js") | 81 filename = os.path.join(self.testroot, testcase.path + ".js") |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 # Magic incantation to allow longer path names on Windows. | 130 # Magic incantation to allow longer path names on Windows. |
130 archive.extractall(u"\\\\?\\%s" % self.root) | 131 archive.extractall(u"\\\\?\\%s" % self.root) |
131 else: | 132 else: |
132 archive.extractall(self.root) | 133 archive.extractall(self.root) |
133 os.rename(os.path.join(self.root, "tc39-test262-%s" % revision), | 134 os.rename(os.path.join(self.root, "tc39-test262-%s" % revision), |
134 directory_name) | 135 directory_name) |
135 | 136 |
136 | 137 |
137 def GetSuite(name, root): | 138 def GetSuite(name, root): |
138 return Test262TestSuite(name, root) | 139 return Test262TestSuite(name, root) |
OLD | NEW |