| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 files.sort() | 50 files.sort() |
| 51 for filename in files: | 51 for filename in files: |
| 52 if filename.endswith(".js") and filename != "mjsunit.js": | 52 if filename.endswith(".js") and filename != "mjsunit.js": |
| 53 testname = join(dirname[len(self.root) + 1:], filename[:-3]) | 53 testname = join(dirname[len(self.root) + 1:], filename[:-3]) |
| 54 test = testcase.TestCase(self, testname) | 54 test = testcase.TestCase(self, testname) |
| 55 tests.append(test) | 55 tests.append(test) |
| 56 return tests | 56 return tests |
| 57 | 57 |
| 58 def GetFlagsForTestCase(self, testcase, context): | 58 def GetFlagsForTestCase(self, testcase, context): |
| 59 source = self.GetSourceForTest(testcase) | 59 source = self.GetSourceForTest(testcase) |
| 60 flags = [] | 60 flags = [] + context.mode_flags |
| 61 flags_match = re.findall(FLAGS_PATTERN, source) | 61 flags_match = re.findall(FLAGS_PATTERN, source) |
| 62 for match in flags_match: | 62 for match in flags_match: |
| 63 flags += match.strip().split() | 63 flags += match.strip().split() |
| 64 flags += context.mode_flags | |
| 65 | 64 |
| 66 files_list = [] # List of file names to append to command arguments. | 65 files_list = [] # List of file names to append to command arguments. |
| 67 files_match = FILES_PATTERN.search(source); | 66 files_match = FILES_PATTERN.search(source); |
| 68 # Accept several lines of 'Files:'. | 67 # Accept several lines of 'Files:'. |
| 69 while True: | 68 while True: |
| 70 if files_match: | 69 if files_match: |
| 71 files_list += files_match.group(1).strip().split() | 70 files_list += files_match.group(1).strip().split() |
| 72 files_match = FILES_PATTERN.search(source, files_match.end()) | 71 files_match = FILES_PATTERN.search(source, files_match.end()) |
| 73 else: | 72 else: |
| 74 break | 73 break |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 219 |
| 221 def GetTestStatus(self, sections, defs): | 220 def GetTestStatus(self, sections, defs): |
| 222 status_file = join(self.root, 'mjsunit.status') | 221 status_file = join(self.root, 'mjsunit.status') |
| 223 if exists(status_file): | 222 if exists(status_file): |
| 224 test.ReadConfigurationInto(status_file, sections, defs) | 223 test.ReadConfigurationInto(status_file, sections, defs) |
| 225 | 224 |
| 226 | 225 |
| 227 | 226 |
| 228 def GetConfiguration(context, root): | 227 def GetConfiguration(context, root): |
| 229 return MjsunitTestConfiguration(context, root) | 228 return MjsunitTestConfiguration(context, root) |
| OLD | NEW |