| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 def Ls(self, path): | 100 def Ls(self, path): |
| 101 if isdir(path): | 101 if isdir(path): |
| 102 return [f[:-3] for f in os.listdir(path) if f.endswith('.js')] | 102 return [f[:-3] for f in os.listdir(path) if f.endswith('.js')] |
| 103 else: | 103 else: |
| 104 return [] | 104 return [] |
| 105 | 105 |
| 106 def ListTests(self, current_path, path, mode): | 106 def ListTests(self, current_path, path, mode): |
| 107 mjsunit = [current_path + [t] for t in self.Ls(self.root)] | 107 mjsunit = [current_path + [t] for t in self.Ls(self.root)] |
| 108 regress = [current_path + ['regress', t] for t in self.Ls(join(self.root, 'r
egress'))] | 108 regress = [current_path + ['regress', t] for t in self.Ls(join(self.root, 'r
egress'))] |
| 109 bugs = [current_path + ['bugs', t] for t in self.Ls(join(self.root, 'bugs'))
] | 109 bugs = [current_path + ['bugs', t] for t in self.Ls(join(self.root, 'bugs'))
] |
| 110 mjsunit.sort() |
| 111 regress.sort() |
| 112 bugs.sort() |
| 110 all_tests = mjsunit + regress + bugs | 113 all_tests = mjsunit + regress + bugs |
| 111 result = [] | 114 result = [] |
| 112 for test in all_tests: | 115 for test in all_tests: |
| 113 if self.Contains(path, test): | 116 if self.Contains(path, test): |
| 114 file_prefix = join(self.root, reduce(join, test[1:], "")) | 117 file_prefix = join(self.root, reduce(join, test[1:], "")) |
| 115 file_path = file_prefix + ".js" | 118 file_path = file_prefix + ".js" |
| 116 output_path = file_prefix + ".out" | 119 output_path = file_prefix + ".out" |
| 117 if not exists(output_path): | 120 if not exists(output_path): |
| 118 print "Could not find %s" % output_path | 121 print "Could not find %s" % output_path |
| 119 continue | 122 continue |
| 120 result.append(MessageTestCase(test, file_path, output_path, mode, | 123 result.append(MessageTestCase(test, file_path, output_path, mode, |
| 121 self.context, self)) | 124 self.context, self)) |
| 122 return result | 125 return result |
| 123 | 126 |
| 124 def GetBuildRequirements(self): | 127 def GetBuildRequirements(self): |
| 125 return ['sample', 'sample=shell'] | 128 return ['sample', 'sample=shell'] |
| 126 | 129 |
| 127 def GetTestStatus(self, sections, defs): | 130 def GetTestStatus(self, sections, defs): |
| 128 status_file = join(self.root, 'message.status') | 131 status_file = join(self.root, 'message.status') |
| 129 if exists(status_file): | 132 if exists(status_file): |
| 130 test.ReadConfigurationInto(status_file, sections, defs) | 133 test.ReadConfigurationInto(status_file, sections, defs) |
| 131 | 134 |
| 132 | 135 |
| 133 def GetConfiguration(context, root): | 136 def GetConfiguration(context, root): |
| 134 return MessageTestConfiguration(context, root) | 137 return MessageTestConfiguration(context, root) |
| OLD | NEW |