| 34 | self._source_flags = self._parse_source_flags(source) |
| 35 | |
| 36 | def _parse_source_files(self, source): |
| 37 | files_list = [] # List of file names to append to command arguments. |
| 38 | files_match = FILES_PATTERN.search(source); |
| 39 | # Accept several lines of 'Files:'. |
| 40 | while True: |
| 41 | if files_match: |
| 42 | files_list += files_match.group(1).strip().split() |
| 43 | files_match = FILES_PATTERN.search(source, files_match.end()) |
| 44 | else: |
| 45 | break |
| 46 | |
| 47 | files = [] |
| 48 | files.append(self.suite.root.parent / "mjsunit" / "mjsunit.js") |
| 49 | files.append(self.suite.root / "test-api.js") |
| 50 | files.extend([self.suite.root.parents[1] / f for f in files_list]) |
| 51 | files.append(self._get_source_path()) |
| 52 | return files |
| 53 | |
| 54 | def _get_files_params(self): |
| 55 | files = self._source_files |