| 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 | 5 |
| 6 """Runs a Dart unit test in different configurations. | 6 """Runs a Dart unit test in different configurations. |
| 7 | 7 |
| 8 Currently supported architectures include dartium, chromium, ia32, x64, | 8 Currently supported architectures include dartium, chromium, ia32, x64, |
| 9 arm, simarm, and dartc. | 9 arm, simarm, and dartc. |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 fail(e, trace); | 102 fail(e, trace); |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 """ | 105 """ |
| 106 | 106 |
| 107 | 107 |
| 108 # Patterns for matching test options in .dart files. | 108 # Patterns for matching test options in .dart files. |
| 109 DART_OPTIONS_PATTERN = re.compile(r"// DartOptions=(.*)") | 109 DART_OPTIONS_PATTERN = re.compile(r"// DartOptions=(.*)") |
| 110 | 110 |
| 111 # Pattern for checking if the test is a web test. | 111 # Pattern for checking if the test is a web test. |
| 112 DOM_IMPORT_PATTERN = re.compile(r'#import.*dart:(dom|html).*\);', | 112 DOM_IMPORT_PATTERN = re.compile(r'#import.*(dart:(dom|html)|html\.dart).*\);', |
| 113 re.MULTILINE) | 113 re.MULTILINE) |
| 114 | 114 |
| 115 # Pattern for matching the output of a browser test. | 115 # Pattern for matching the output of a browser test. |
| 116 BROWSER_OUTPUT_PASS_PATTERN = re.compile(r'^Content-Type: text/plain\nPASS$', | 116 BROWSER_OUTPUT_PASS_PATTERN = re.compile(r'^Content-Type: text/plain\nPASS$', |
| 117 re.MULTILINE) | 117 re.MULTILINE) |
| 118 | 118 |
| 119 # Pattern for checking if the test is a library in itself. | 119 # Pattern for checking if the test is a library in itself. |
| 120 LIBRARY_DEFINITION_PATTERN = re.compile(r'^#library\(.*\);', | 120 LIBRARY_DEFINITION_PATTERN = re.compile(r'^#library\(.*\);', |
| 121 re.MULTILINE) | 121 re.MULTILINE) |
| 122 SOURCE_OR_IMPORT_PATTERN = re.compile(r'^#(source|import)\(.*\);', | 122 SOURCE_OR_IMPORT_PATTERN = re.compile(r'^#(source|import)\(.*\);', |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 return ChromiumArchitecture(root_path, arch, mode, test) | 494 return ChromiumArchitecture(root_path, arch, mode, test) |
| 495 | 495 |
| 496 elif arch == 'dartium': | 496 elif arch == 'dartium': |
| 497 return DartiumArchitecture(root_path, arch, mode, test) | 497 return DartiumArchitecture(root_path, arch, mode, test) |
| 498 | 498 |
| 499 elif arch in ['ia32', 'x64', 'simarm', 'arm']: | 499 elif arch in ['ia32', 'x64', 'simarm', 'arm']: |
| 500 return RuntimeArchitecture(root_path, arch, mode, test) | 500 return RuntimeArchitecture(root_path, arch, mode, test) |
| 501 | 501 |
| 502 elif arch == 'dartc': | 502 elif arch == 'dartc': |
| 503 return DartcArchitecture(root_path, arch, mode, test) | 503 return DartcArchitecture(root_path, arch, mode, test) |
| OLD | NEW |