| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 if vm_options_list: | 73 if vm_options_list: |
| 74 tests = [] | 74 tests = [] |
| 75 for options in vm_options_list: | 75 for options in vm_options_list: |
| 76 tests.append(test_case.BrowserTestCase( | 76 tests.append(test_case.BrowserTestCase( |
| 77 self.context, test_path, filename, False, mode, arch, component, | 77 self.context, test_path, filename, False, mode, arch, component, |
| 78 options + self.flags)) | 78 options + self.flags)) |
| 79 return tests | 79 return tests |
| 80 else: | 80 else: |
| 81 return [test_case.BrowserTestCase( | 81 return [test_case.BrowserTestCase( |
| 82 self.context, test_path, filename, False, mode, arch, component, | 82 self.context, test_path, filename, False, mode, arch, component, |
| 83 options)] | 83 self.flags)] |
| 84 else: | 84 else: |
| 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, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 304 |
| 305 def GetTestStatus(self, sections, defs): | 305 def GetTestStatus(self, sections, defs): |
| 306 status = os.path.join(self.root, 'dartc.status') | 306 status = os.path.join(self.root, 'dartc.status') |
| 307 if os.path.exists(status): | 307 if os.path.exists(status): |
| 308 test.ReadConfigurationInto(status, sections, defs) | 308 test.ReadConfigurationInto(status, sections, defs) |
| 309 | 309 |
| 310 def _Cleanup(self, tests): | 310 def _Cleanup(self, tests): |
| 311 if not utils.Daemonize(): return | 311 if not utils.Daemonize(): return |
| 312 os.execlp('rm', *(['rm', '-rf'] + [t.temp_dir for t in tests])) | 312 os.execlp('rm', *(['rm', '-rf'] + [t.temp_dir for t in tests])) |
| 313 raise | 313 raise |
| OLD | NEW |