| OLD | NEW |
| 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
| 3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Common Testconfiguration subclasses used to define a class of tests.""" | 5 """Common Testconfiguration subclasses used to define a class of tests.""" |
| 6 | 6 |
| 7 import atexit | 7 import atexit |
| 8 import fileinput | 8 import fileinput |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 tests = [] | 85 tests = [] |
| 86 if tags: | 86 if tags: |
| 87 for tag in sorted(tags): | 87 for tag in sorted(tags): |
| 88 kind, test_source = tags[tag] | 88 kind, test_source = tags[tag] |
| 89 if not self.Contains(path, test_path + [tag]): | 89 if not self.Contains(path, test_path + [tag]): |
| 90 continue | 90 continue |
| 91 tests.append(test_case.MultiTestCase(self.context, | 91 tests.append(test_case.MultiTestCase(self.context, |
| 92 test_path + [tag], | 92 test_path + [tag], |
| 93 test_source, | 93 test_source, |
| 94 kind, | 94 kind, |
| 95 mode, arch, component)) | 95 mode, arch, component, |
| 96 self.flags)) |
| 96 else: | 97 else: |
| 97 if vm_options_list: | 98 if vm_options_list: |
| 98 for options in vm_options_list: | 99 for options in vm_options_list: |
| 99 tests.append(test_case.StandardTestCase(self.context, | 100 tests.append(test_case.StandardTestCase(self.context, |
| 100 test_path, filename, mode, arch, component, | 101 test_path, filename, mode, arch, component, |
| 101 options + self.flags)) | 102 options + self.flags)) |
| 102 else: | 103 else: |
| 103 tests.append(test_case.StandardTestCase(self.context, | 104 tests.append(test_case.StandardTestCase(self.context, |
| 104 test_path, filename, mode, arch, component, self.flags)) | 105 test_path, filename, mode, arch, component, self.flags)) |
| 105 return tests | 106 return tests |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 305 |
| 305 def GetTestStatus(self, sections, defs): | 306 def GetTestStatus(self, sections, defs): |
| 306 status = os.path.join(self.root, 'dartc.status') | 307 status = os.path.join(self.root, 'dartc.status') |
| 307 if os.path.exists(status): | 308 if os.path.exists(status): |
| 308 test.ReadConfigurationInto(status, sections, defs) | 309 test.ReadConfigurationInto(status, sections, defs) |
| 309 | 310 |
| 310 def _Cleanup(self, tests): | 311 def _Cleanup(self, tests): |
| 311 if not utils.Daemonize(): return | 312 if not utils.Daemonize(): return |
| 312 os.execlp('rm', *(['rm', '-rf'] + [t.temp_dir for t in tests])) | 313 os.execlp('rm', *(['rm', '-rf'] + [t.temp_dir for t in tests])) |
| 313 raise | 314 raise |
| OLD | NEW |