| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 def ListTests(self, context): | 46 def ListTests(self, context): |
| 47 tests = [] | 47 tests = [] |
| 48 for dirname, dirs, files in os.walk(self.root): | 48 for dirname, dirs, files in os.walk(self.root): |
| 49 for dotted in [x for x in dirs if x.startswith('.')]: | 49 for dotted in [x for x in dirs if x.startswith('.')]: |
| 50 dirs.remove(dotted) | 50 dirs.remove(dotted) |
| 51 dirs.sort() | 51 dirs.sort() |
| 52 files.sort() | 52 files.sort() |
| 53 for filename in files: | 53 for filename in files: |
| 54 if filename.endswith(".js"): | 54 if filename.endswith(".js"): |
| 55 testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3]) | 55 fullpath = os.path.join(dirname, filename) |
| 56 relpath = fullpath[len(self.root) + 1 : -3] |
| 57 testname = relpath.replace(os.path.sep, "/") |
| 56 test = testcase.TestCase(self, testname) | 58 test = testcase.TestCase(self, testname) |
| 57 tests.append(test) | 59 tests.append(test) |
| 58 return tests | 60 return tests |
| 59 | 61 |
| 60 def GetFlagsForTestCase(self, testcase, context): | 62 def GetFlagsForTestCase(self, testcase, context): |
| 61 source = self.GetSourceForTest(testcase) | 63 source = self.GetSourceForTest(testcase) |
| 62 result = [] | 64 result = [] |
| 63 flags_match = re.findall(FLAGS_PATTERN, source) | 65 flags_match = re.findall(FLAGS_PATTERN, source) |
| 64 for match in flags_match: | 66 for match in flags_match: |
| 65 result += match.strip().split() | 67 result += match.strip().split() |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 if not re.match(pattern, actual): | 111 if not re.match(pattern, actual): |
| 110 return True | 112 return True |
| 111 return False | 113 return False |
| 112 | 114 |
| 113 def StripOutputForTransmit(self, testcase): | 115 def StripOutputForTransmit(self, testcase): |
| 114 pass | 116 pass |
| 115 | 117 |
| 116 | 118 |
| 117 def GetSuite(name, root): | 119 def GetSuite(name, root): |
| 118 return MessageTestSuite(name, root) | 120 return MessageTestSuite(name, root) |
| OLD | NEW |