| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 * Classes and methods for enumerating and preparing tests. | 6 * Classes and methods for enumerating and preparing tests. |
| 7 * | 7 * |
| 8 * This library includes: | 8 * This library includes: |
| 9 * | 9 * |
| 10 * - Creating tests by listing all the Dart files in certain directories, | 10 * - Creating tests by listing all the Dart files in certain directories, |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 | 962 |
| 963 if (compiler == 'none' || compiler == 'dart2dart') { | 963 if (compiler == 'none' || compiler == 'dart2dart') { |
| 964 dartFlags.add('--ignore-unrecognized-flags'); | 964 dartFlags.add('--ignore-unrecognized-flags'); |
| 965 if (configuration["checked"]) { | 965 if (configuration["checked"]) { |
| 966 dartFlags.add('--enable_asserts'); | 966 dartFlags.add('--enable_asserts'); |
| 967 dartFlags.add("--enable_type_checks"); | 967 dartFlags.add("--enable_type_checks"); |
| 968 } | 968 } |
| 969 dartFlags.addAll(vmOptions); | 969 dartFlags.addAll(vmOptions); |
| 970 } | 970 } |
| 971 if (compiler == 'none') { | 971 if (compiler == 'none') { |
| 972 var packageRoot = packageRoot(optionsFromFile['packageRoot']); | 972 var packageRootPath = packageRoot(optionsFromFile['packageRoot']); |
| 973 if (packageRoot != null) { | 973 if (packageRootPath != null) { |
| 974 var absolutePath = TestUtils.absolutePath(new Path(packageRoot)); | 974 var absolutePath = |
| 975 TestUtils.absolutePath(new Path(packageRootPath)); |
| 975 packageRootUri = new Uri.fromComponents( | 976 packageRootUri = new Uri.fromComponents( |
| 976 scheme: 'file', | 977 scheme: 'file', |
| 977 path: absolutePath.toString()); | 978 path: absolutePath.toString()); |
| 978 } | 979 } |
| 979 } | 980 } |
| 980 | 981 |
| 981 if (expectedOutput != null) { | 982 if (expectedOutput != null) { |
| 982 if (expectedOutput.toNativePath().endsWith('.png')) { | 983 if (expectedOutput.toNativePath().endsWith('.png')) { |
| 983 // pixel tests are specified by running DRT "foo.html'-p" | 984 // pixel tests are specified by running DRT "foo.html'-p" |
| 984 dumpRenderTreeOptions.add('--notree'); | 985 dumpRenderTreeOptions.add('--notree'); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 return null; | 1191 return null; |
| 1191 } | 1192 } |
| 1192 String packageRoot = packageRootFromFile; | 1193 String packageRoot = packageRootFromFile; |
| 1193 if (packageRootFromFile == null) { | 1194 if (packageRootFromFile == null) { |
| 1194 packageRoot = "$buildDir/packages/"; | 1195 packageRoot = "$buildDir/packages/"; |
| 1195 } | 1196 } |
| 1196 return packageRoot; | 1197 return packageRoot; |
| 1197 } | 1198 } |
| 1198 | 1199 |
| 1199 String packageRootArgument(String packageRootFromFile) { | 1200 String packageRootArgument(String packageRootFromFile) { |
| 1200 var packageRoot = packageRoot(packageRootFromFile); | 1201 var packageRootPath = packageRoot(packageRootFromFile); |
| 1201 if (packageRoot == null) { | 1202 if (packageRootPath == null) { |
| 1202 return null; | 1203 return null; |
| 1203 } | 1204 } |
| 1204 return "--package-root=$packageRoot"; | 1205 return "--package-root=$packageRootPath"; |
| 1205 } | 1206 } |
| 1206 | 1207 |
| 1207 /** | 1208 /** |
| 1208 * Special options for individual tests are currently specified in various | 1209 * Special options for individual tests are currently specified in various |
| 1209 * ways: with comments directly in test files, by using certain imports, or by | 1210 * ways: with comments directly in test files, by using certain imports, or by |
| 1210 * creating additional files in the test directories. | 1211 * creating additional files in the test directories. |
| 1211 * | 1212 * |
| 1212 * Here is a list of options that are used by 'test.dart' today: | 1213 * Here is a list of options that are used by 'test.dart' today: |
| 1213 * - Flags can be passed to the vm or dartium process that runs the test by | 1214 * - Flags can be passed to the vm or dartium process that runs the test by |
| 1214 * adding a comment to the test file: | 1215 * adding a comment to the test file: |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 * $pass tests are expected to pass | 1793 * $pass tests are expected to pass |
| 1793 * $failOk tests are expected to fail that we won't fix | 1794 * $failOk tests are expected to fail that we won't fix |
| 1794 * $fail tests are expected to fail that we should fix | 1795 * $fail tests are expected to fail that we should fix |
| 1795 * $crash tests are expected to crash that we should fix | 1796 * $crash tests are expected to crash that we should fix |
| 1796 * $timeout tests are allowed to timeout | 1797 * $timeout tests are allowed to timeout |
| 1797 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 1798 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 1798 """; | 1799 """; |
| 1799 print(report); | 1800 print(report); |
| 1800 } | 1801 } |
| 1801 } | 1802 } |
| OLD | NEW |