| OLD | NEW |
| 1 # Copyright 2008 the V8 project authors. All rights reserved. | 1 # Copyright 2008 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 return name.endswith('.js') and name != 'mjsunit.js' | 120 return name.endswith('.js') and name != 'mjsunit.js' |
| 121 return [f[:-3] for f in os.listdir(path) if SelectTest(f)] | 121 return [f[:-3] for f in os.listdir(path) if SelectTest(f)] |
| 122 | 122 |
| 123 def ListTests(self, current_path, path, mode, variant_flags): | 123 def ListTests(self, current_path, path, mode, variant_flags): |
| 124 mjsunit = [current_path + [t] for t in self.Ls(self.root)] | 124 mjsunit = [current_path + [t] for t in self.Ls(self.root)] |
| 125 regress = [current_path + ['regress', t] for t in self.Ls(join(self.root, 'r
egress'))] | 125 regress = [current_path + ['regress', t] for t in self.Ls(join(self.root, 'r
egress'))] |
| 126 bugs = [current_path + ['bugs', t] for t in self.Ls(join(self.root, 'bugs'))
] | 126 bugs = [current_path + ['bugs', t] for t in self.Ls(join(self.root, 'bugs'))
] |
| 127 third_party = [current_path + ['third_party', t] for t in self.Ls(join(self.
root, 'third_party'))] | 127 third_party = [current_path + ['third_party', t] for t in self.Ls(join(self.
root, 'third_party'))] |
| 128 tools = [current_path + ['tools', t] for t in self.Ls(join(self.root, 'tools
'))] | 128 tools = [current_path + ['tools', t] for t in self.Ls(join(self.root, 'tools
'))] |
| 129 compiler = [current_path + ['compiler', t] for t in self.Ls(join(self.root,
'compiler'))] | 129 compiler = [current_path + ['compiler', t] for t in self.Ls(join(self.root,
'compiler'))] |
| 130 harmony = [current_path + ['harmony', t] for t in self.Ls(join(self.root, 'h
armony'))] |
| 130 mjsunit.sort() | 131 mjsunit.sort() |
| 131 regress.sort() | 132 regress.sort() |
| 132 bugs.sort() | 133 bugs.sort() |
| 133 third_party.sort() | 134 third_party.sort() |
| 134 tools.sort() | 135 tools.sort() |
| 135 compiler.sort() | 136 compiler.sort() |
| 136 all_tests = mjsunit + regress + bugs + third_party + tools + compiler | 137 harmony.sort() |
| 138 all_tests = mjsunit + regress + bugs + third_party + tools + compiler + harm
ony |
| 137 result = [] | 139 result = [] |
| 138 for test in all_tests: | 140 for test in all_tests: |
| 139 if self.Contains(path, test): | 141 if self.Contains(path, test): |
| 140 file_path = join(self.root, reduce(join, test[1:], "") + ".js") | 142 file_path = join(self.root, reduce(join, test[1:], "") + ".js") |
| 141 result.append(MjsunitTestCase(test, file_path, mode, self.context, self,
False)) | 143 result.append(MjsunitTestCase(test, file_path, mode, self.context, self,
False)) |
| 142 result.append(MjsunitTestCase(test, file_path, mode, self.context, self,
True)) | 144 result.append(MjsunitTestCase(test, file_path, mode, self.context, self,
True)) |
| 143 return result | 145 return result |
| 144 | 146 |
| 145 def GetBuildRequirements(self): | 147 def GetBuildRequirements(self): |
| 146 return ['sample', 'sample=shell'] | 148 return ['sample', 'sample=shell'] |
| 147 | 149 |
| 148 def GetTestStatus(self, sections, defs): | 150 def GetTestStatus(self, sections, defs): |
| 149 status_file = join(self.root, 'mjsunit.status') | 151 status_file = join(self.root, 'mjsunit.status') |
| 150 if exists(status_file): | 152 if exists(status_file): |
| 151 test.ReadConfigurationInto(status_file, sections, defs) | 153 test.ReadConfigurationInto(status_file, sections, defs) |
| 152 | 154 |
| 153 | 155 |
| 154 | 156 |
| 155 def GetConfiguration(context, root): | 157 def GetConfiguration(context, root): |
| 156 return MjsunitTestConfiguration(context, root) | 158 return MjsunitTestConfiguration(context, root) |
| OLD | NEW |