Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 the V8 project authors. All rights reserved. | 1 # Copyright 2016 the V8 project authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import os | 5 import os |
| 6 import re | 6 import re |
| 7 | 7 |
| 8 from testrunner.local import testsuite | 8 from testrunner.local import testsuite |
| 9 from testrunner.objects import testcase | 9 from testrunner.objects import testcase |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 files_match = FILES_PATTERN.search(source); | 44 files_match = FILES_PATTERN.search(source); |
| 45 # Accept several lines of 'Files:'. | 45 # Accept several lines of 'Files:'. |
| 46 while True: | 46 while True: |
| 47 if files_match: | 47 if files_match: |
| 48 files_list += files_match.group(1).strip().split() | 48 files_list += files_match.group(1).strip().split() |
| 49 files_match = FILES_PATTERN.search(source, files_match.end()) | 49 files_match = FILES_PATTERN.search(source, files_match.end()) |
| 50 else: | 50 else: |
| 51 break | 51 break |
| 52 | 52 |
| 53 files = [] | 53 files = [] |
| 54 files.append(os.path.normpath(os.path.join(self.root, "..", "mjsunit", "mjsu nit.js"))) | 54 if not context.no_harness and not NO_HARNESS_PATTERN.search(source): |
|
caitp
2017/05/08 13:26:21
This line throws for me since NO_HARNESS_PATTERN i
Michael Achenbach
2017/05/08 13:34:23
Yea - the right side isn't covered on our bots. I'
| |
| 55 files.append(os.path.normpath(os.path.join(self.root, "..", "mjsunit", "mj sunit.js"))) | |
| 55 files.append(os.path.join(self.root, "test-api.js")) | 56 files.append(os.path.join(self.root, "test-api.js")) |
| 56 files.extend([ os.path.normpath(os.path.join(self.root, '..', '..', f)) | 57 files.extend([ os.path.normpath(os.path.join(self.root, '..', '..', f)) |
| 57 for f in files_list ]) | 58 for f in files_list ]) |
| 58 if MODULE_PATTERN.search(source): | 59 if MODULE_PATTERN.search(source): |
| 59 files.append("--module") | 60 files.append("--module") |
| 60 files.append(os.path.join(self.root, testcase.path + self.suffix())) | 61 files.append(os.path.join(self.root, testcase.path + self.suffix())) |
| 61 | 62 |
| 62 flags += files | 63 flags += files |
| 63 if context.isolates: | 64 if context.isolates: |
| 64 flags.append("--isolate") | 65 flags.append("--isolate") |
| 65 flags += files | 66 flags += files |
| 66 | 67 |
| 67 return testcase.flags + flags | 68 return testcase.flags + flags |
| 68 | 69 |
| 69 def GetSourceForTest(self, testcase): | 70 def GetSourceForTest(self, testcase): |
| 70 filename = os.path.join(self.root, testcase.path + self.suffix()) | 71 filename = os.path.join(self.root, testcase.path + self.suffix()) |
| 71 with open(filename) as f: | 72 with open(filename) as f: |
| 72 return f.read() | 73 return f.read() |
| 73 | 74 |
| 74 def GetSuite(name, root): | 75 def GetSuite(name, root): |
| 75 return DebuggerTestSuite(name, root) | 76 return DebuggerTestSuite(name, root) |
| OLD | NEW |